Examples of PageLayoutImpl


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

        subPage2.setMembers(Lists.<PageUser>newLinkedList());
        subPage2.setRegions(Lists.<Region>newLinkedList());
        page.getSubPages().add(subPage1);
        page.getSubPages().add(subPage2);

        PageLayout pageLayout = new PageLayoutImpl();
        pageLayout.setCode("asdf");
        page.setPageLayoutCode(pageLayout.getCode());

        expect(pageLayoutRepository.getByPageLayoutCode(page.getPageLayoutCode())).andReturn(pageLayout);
        replay(pageLayoutRepository);

        converter.hydrate(page);
View Full Code Here

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

        passwordEncoder = createMock(PasswordEncoder.class);
        authorityService = createMock(AuthorityService.class);

        newAccountService = new DefaultNewAccountService(userService, pageLayoutService, authorityService);

        validPageLayout = new PageLayoutImpl();
        validPageLayout.setNumberOfRegions(4L);
        validPageLayout.setCode(VALID_LAYOUT_CODE);

        Authority role1 = new AuthorityImpl();
        role1.setAuthority("DEFAULT_ROLE1");
View Full Code Here

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

        template.setPageLayoutRepository(pageLayoutRepository);
    }

    @Test
    public void getPageLayout(){
        PageLayout p = new PageLayoutImpl();
         template.setPageLayoutCode("stinky");
        expect(pageLayoutRepository.getByPageLayoutCode("stinky")).andReturn(p);
        replay(pageLayoutRepository);

        assertThat(template.getPageLayout(), is(sameInstance(p)));
View Full Code Here

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

        assertNotNull(user.getAuthorityCodes());
    }

    @Test
    public void getDefaultPageLayout_Valid(){
        PageLayout layout = new PageLayoutImpl();
        user.setDefaultPageLayoutCode("dingus");
        expect(pageLayoutRepository.getByPageLayoutCode("dingus")).andReturn(layout);
        replay(pageLayoutRepository);

        assertThat(user.getDefaultPageLayout(), is(sameInstance(layout)));
View Full Code Here

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

        assertThat(user.getDefaultPageLayout(), is(sameInstance(layout)));
    }

    @Test
    public void getDefaultPageLayout_Null(){
        PageLayout layout = new PageLayoutImpl();
        user.setDefaultPageLayout(layout);
        assertThat(layout, is(sameInstance(user.getDefaultPageLayout())));
    }
View Full Code Here

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

    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

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

    @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

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

        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

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

        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

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

        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
TOP
Copyright © 2018 www.massapi.com. 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.