Package org.apache.rave.portal.model.impl

Examples of org.apache.rave.portal.model.impl.PageLayoutImpl


        pageController = new PageController(pageService, userService, pageLayoutService);
        model = new ExtendedModelMap();
        request = new MockHttpServletRequest();

        validUser = new UserImpl(USER_ID);
        validPageLayout = new PageLayoutImpl();
        validPageLayout.setCode(VALID_PAGE_LAYOUT_CODE);
        defaultPageUser = new PageUserImpl(USER_ID, defaultPage, 1L);
        defaultPageUser.setPageStatus(PageInvitationStatus.OWNER);

        validUser.setDefaultPageLayout(validPageLayout);
View Full Code Here


    private List<PageUser> pageUserList;

    @Before
    public void setup() {

        pageLayout = new PageLayoutImpl();
        pageLayout.setCode(PAGE_LAYOUT_CODE);
        pageLayout.setNumberOfRegions(3L);

        user = new UserImpl();
        user.setUsername("acarlucci");
View Full Code Here

    @Test
    public void updatePage_nameUpdate() {
        String newName = "new page name";
        String layoutName = "layout name";

        PageLayoutImpl layout = createStrictMock(PageLayoutImpl.class);
        expect(layout.getNumberOfRegions()).andReturn(Long.valueOf(2L)).anyTimes();
        replay(layout);

        //create a strict mock that ensures that the appropriate setters are
        //called, rather than checking the return value from the function
        Page curPage = createStrictMock(PageImpl.class);
View Full Code Here

    public void updatePage_properties() {
        String newName = "new page name";
        String layoutName = "layout name";
        Map<String, Object> props = Maps.newHashMap();

        PageLayoutImpl layout = createStrictMock(PageLayoutImpl.class);
        expect(layout.getNumberOfRegions()).andReturn(Long.valueOf(2L)).anyTimes();
        replay(layout);

        //create a strict mock that ensures that the appropriate setters are
        //called, rather than checking the return value from the function
        Page curPage = createStrictMock(PageImpl.class);
View Full Code Here

        Region region = new RegionImpl("99");
        region.setRenderOrder(1);
        regions.add(new RegionImpl());
        regions.add(region);

        PageLayout prevLayout = new PageLayoutImpl();
        prevLayout.setNumberOfRegions(2L);
        prevLayout.setCode("NEW");

        PageLayoutImpl layout = new PageLayoutImpl();
        layout.setNumberOfRegions(3L);
        layout.setCode(layoutCode);


        //create a strict mock that ensures that the appropriate setters are
        //called, rather than checking the return value from the function
        Page curPage = createStrictMock(Page.class);
View Full Code Here

        PageLayout prevLayout = createStrictMock(PageLayoutImpl.class);
        expect(prevLayout.getNumberOfRegions()).andReturn(new Long(2)).anyTimes();
        replay(prevLayout);

        PageLayoutImpl layout = createStrictMock(PageLayoutImpl.class);
        expect(layout.getNumberOfRegions()).andReturn(new Long(1)).anyTimes();
        replay(layout);

        regionRepository.delete(deletedRegion);
        expect(regionRepository.save(region)).andReturn(region);
        replay(regionRepository);
View Full Code Here

        PageLayout prevLayout = createStrictMock(PageLayoutImpl.class);
        expect(prevLayout.getNumberOfRegions()).andReturn(new Long(2)).anyTimes();
        replay(prevLayout);

        PageLayoutImpl layout = createStrictMock(PageLayoutImpl.class);
        expect(layout.getNumberOfRegions()).andReturn(new Long(1)).anyTimes();
        replay(layout);

        regionRepository.delete(deletedRegion);
        expect(regionRepository.save(region)).andReturn(region);
        replay(regionRepository);
View Full Code Here

        PageLayout prevLayout = createStrictMock(PageLayoutImpl.class);
        expect(prevLayout.getNumberOfRegions()).andReturn(new Long(2)).anyTimes();
        replay(prevLayout);

        PageLayoutImpl layout = createStrictMock(PageLayoutImpl.class);
        expect(layout.getNumberOfRegions()).andReturn(new Long(1)).anyTimes();
        replay(layout);

        regionRepository.delete(deletedRegion);
        expect(regionRepository.save(region)).andReturn(region);
        replay(regionRepository);
View Full Code Here

        region.getRegionWidgets().add(rw);
        sourcePage.setRegions(Lists.<Region>newLinkedList());
        sourcePage.getRegions().add(region);

        Page parentPage = new PageImpl();
        PageLayout pagelayout = new PageLayoutImpl();
        pagelayout.setCode("asdf");

        sourcePage.setId(PAGEID);
        sourcePage.setOwnerId(USER2ID);
        sourcePage.setContextId(USER2ID);
        sourcePage.setPageLayout(pagelayout);
View Full Code Here

    public void convertPage_Id_Null(){
        Page sourcePage = new MongoDbPage();
        RegionImpl region = new RegionImpl();
        region.setId("123");
        sourcePage.setRegions(Arrays.<Region>asList(region));
        sourcePage.setPageLayout(new PageLayoutImpl());
        sourcePage.setOwnerId(USER1ID);
        sourcePage.setMembers(new ArrayList<PageUser>());


        Page subPage = new MongoDbPage();
        List<Page> subPages = Arrays.asList(subPage);
        subPage.setPageLayout(new PageLayoutImpl());
        subPage.setOwnerId(USER1ID);
        subPage.setId("321");
        subPage.setMembers(new ArrayList<PageUser>());
        subPage.setRegions(new ArrayList<Region>());
        sourcePage.setSubPages(subPages);
View Full Code Here

TOP

Related Classes of org.apache.rave.portal.model.impl.PageLayoutImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.