Package org.apache.rave.portal.model

Examples of org.apache.rave.portal.model.PageUser


    @Test
    public void convertPage_valid() {

        MongoDbPage results;
        PageUser pageUser = new PageUserImpl(USER1ID);
        Page sourcePage = new PageImpl();
        pageUser.setUserId(USER2ID);

        List<PageUser> pageMembers = Lists.newArrayList();
        pageMembers.add(pageUser);
        sourcePage.setMembers(pageMembers);
View Full Code Here


    //Convert user test
    @Test
    public void convertUser_valid() {

        PageUserImpl mongoUser;
        PageUser sourceUser = new PageUserImpl(USER1ID);
        sourceUser.setUserId(USER2ID);
        sourceUser.setEditor(true);
        sourceUser.setPageStatus(PageInvitationStatus.OWNER);
        sourceUser.setRenderSequence(1234L);

        mongoUser = converter.convert(sourceUser);
        assertThat(mongoUser.getId(), is(equalTo(USER1ID)));
        assertThat(mongoUser.getUserId(), is(equalTo(USER2ID)));
        assertTrue(mongoUser.isEditor());
View Full Code Here

    }//end convertUser_valid

    @Test
    public void convertUser_MongoInstance(){
        PageUser sourceUser = new PageUserImpl();
        sourceUser.setUserId("1234");

        PageUserImpl converted = converter.convert(sourceUser);
        assertNotNull(converted.getId());
    }
View Full Code Here

        page.getRegions().add(region1);
        page.getRegions().add(region2);

        page.setMembers(Lists.<PageUser>newLinkedList());
        PageUserImpl member1 = new PageUserImpl();
        PageUser member2 = new PageUserImpl();
        page.getMembers().add(member1);
        page.getMembers().add(member2);

        Region subRegion = new RegionImpl();
        subRegion.setRegionWidgets(Lists.<RegionWidget>newLinkedList());
View Full Code Here

        expectedPage.setName(PAGE_NAME);
        expectedPage.setOwnerId(user.getId());
        expectedPage.setPageLayout(pageLayout);
        expectedPage.setRegions(createEmptyRegionList(pageLayout.getNumberOfRegions()));
        expectedPage.setPageType(PageType.USER);
        PageUser lPageUser = new PageUserImpl(user.getId(), expectedPage, EXPECTED_RENDER_SEQUENCE);
        List<PageUser> members = new ArrayList<PageUser>();
        members.add(lPageUser);
        expectedPage.setMembers(members);

        expect(userService.getAuthenticatedUser()).andReturn(user);
View Full Code Here

        expectedPage.setName(PAGE_NAME);
        expectedPage.setOwnerId(user.getId());
        expectedPage.setPageLayout(pageLayout);
        expectedPage.setRegions(createEmptyRegionList(pageLayout.getNumberOfRegions()));
        expectedPage.setPageType(PageType.USER);
        PageUser lPageUser = new PageUserImpl(user.getId(), expectedPage, EXPECTED_RENDER_SEQUENCE);
        List<PageUser> members = new ArrayList<PageUser>();
        members.add(lPageUser);
        userPage.setMembers(members);

        expect(userService.getAuthenticatedUser()).andReturn(user);
View Full Code Here

        Page expectedPage = new PageImpl();
        expectedPage.setName(PAGE_NAME);
        expectedPage.setOwnerId(user.getId());
        expectedPage.setPageLayout(pageLayout);
        expectedPage.setRegions(createEmptyRegionList(pageLayout.getNumberOfRegions()));
        PageUser lPageUser = new PageUserImpl(user.getId(), expectedPage, EXPECTED_RENDER_SEQUENCE);
        List<PageUser> members = new ArrayList<PageUser>();
        members.add(lPageUser);
        expectedPage.setMembers(members);

        expect(userService.getAuthenticatedUser()).andReturn(user);
View Full Code Here

        Page expectedPage = new PageImpl();
        expectedPage.setName(defaultPageName);
        expectedPage.setOwnerId(user.getId());
        expectedPage.setPageLayout(pageLayout);
        expectedPage.setRegions(createEmptyRegionList(pageLayout.getNumberOfRegions()));
        PageUser lPageUser = new PageUserImpl(user.getId(), expectedPage, EXPECTED_RENDER_SEQUENCE);
        List<PageUser> members = new ArrayList<PageUser>();
        members.add(lPageUser);
        expectedPage.setMembers(members);

        expect(userService.getUserById(user.getId())).andReturn(user);
View Full Code Here

        validUser = new User(USER_ID);

        defaultPage = new Page(DEFAULT_PAGE_ID, validUser);
        defaultPage.setPageLayout(validPageLayout);
        defaultPageUser = new PageUser(validUser, defaultPage, 1L);
        defaultPageUser.setPageStatus(PageInvitationStatus.OWNER);
        defaultPage.setMembers(new ArrayList<PageUser>());
        defaultPage.getMembers().add(defaultPageUser);

        otherPage = new Page(OTHER_PAGE_ID, validUser);
        otherPage.setPageLayout(validPageLayout);
        otherPageUser = new PageUser(validUser, otherPage, 2L);
        otherPageUser.setPageStatus(PageInvitationStatus.OWNER);
        otherPage.setMembers(new ArrayList<PageUser>());
        otherPage.getMembers().add(otherPageUser);

        allPages = new ArrayList<Page>();
View Full Code Here

        page.setPageLayout(pageLayout);
        page.setRegions(regions);
        // set this as a "sub-page" page type
        page.setPageType(PageType.SUB_PAGE);

        PageUser pageUser = new PageUser(page.getOwner(), page, renderSequence);
        pageUser.setPageStatus(PageInvitationStatus.OWNER);
        List<PageUser> members = new ArrayList<PageUser>();
        members.add(pageUser);
        page.setMembers(members);

        // Properly sets both sides of the circular parent-child reference
View Full Code Here

TOP

Related Classes of org.apache.rave.portal.model.PageUser

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.