Examples of PageLayoutImpl


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

        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.setPageLayout(pagelayout);
        sourcePage.setName("Carol");
View Full Code Here

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

    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

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

        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(validUser, defaultPage, 1L);
        defaultPageUser.setPageStatus(PageInvitationStatus.OWNER);

        validUser.setDefaultPageLayout(validPageLayout);
View Full Code Here

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

  public void setup() {
    userService = createMock(UserService.class);
    pageService = createMock(PageService.class);
    profileController = new ProfileController(userService, pageService);

        validPageLayout = new PageLayoutImpl();
        validPageLayout.setCode(VALID_PAGE_LAYOUT_CODE);

        defaultPage = new PageImpl(DEFAULT_PAGE_ID);
        defaultPage.setPageLayout(validPageLayout);
        otherPage = new PageImpl(OTHER_PAGE_ID);
View Full Code Here

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

    final String username="canonical";
        user.setUsername(username);
        user.setId(USER_ID);
    String userProfile = new String(ModelKeys.USER_PROFILE);
        Page personProfile = new PageImpl();
        PageLayout pageLayout = new PageLayoutImpl();
        pageLayout.setCode(VALID_PAGE_LAYOUT_CODE);
        personProfile.setPageLayout(pageLayout);
        List<Person> personObjects = new ArrayList<Person>();

    expect(userService.getUserByUsername(username)).andReturn(user).once();
        expect(pageService.getPersonProfilePage(user.getId())).andReturn(personProfile);
View Full Code Here

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

    final String username="canonical";
        user.setUsername(username);
        user.setId(USER_ID);
    String userProfile = new String(ModelKeys.USER_PROFILE);
        Page personProfile = new PageImpl();
        PageLayout pageLayout = new PageLayoutImpl();
        pageLayout.setCode(VALID_PAGE_LAYOUT_CODE);
        personProfile.setPageLayout(pageLayout);
        List<Person> personObjects = new ArrayList<Person>();

    expect(userService.getUserById(USER_ID)).andReturn(user).once();
        expect(pageService.getPersonProfilePage(user.getId())).andReturn(personProfile);
View Full Code Here

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

        final User user = null;
        final ModelMap model = new ModelMap();
        final int modelSize = 4;
        final String username="Canonical";
        Page personProfile = new PageImpl();
        PageLayout pageLayout = new PageLayoutImpl();
        pageLayout.setCode("person_profile");
        personProfile.setPageLayout(pageLayout);

        expect(userService.getUserByUsername(username)).andThrow(new UsernameNotFoundException("Username does not exist"));

        replay(userService, pageService);
View Full Code Here

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

  public void setup() {
    userService = createMock(UserService.class);
    pageService = createMock(PageService.class);
    profileController = new ProfileController(userService, pageService);

        validPageLayout = new PageLayoutImpl();
        validPageLayout.setCode(VALID_PAGE_LAYOUT_CODE);

        defaultPage = new PageImpl(DEFAULT_PAGE_ID);
        defaultPage.setPageLayout(validPageLayout);
        otherPage = new PageImpl(OTHER_PAGE_ID);
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.