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

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


        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());
        RegionWidget subRegionWidget = new RegionWidgetImpl();
        subRegion.getRegionWidgets().add(subRegionWidget);

        page.setSubPages(Lists.<Page>newLinkedList());
        MongoDbPage subPage1 = new MongoDbPage();
        PageUserImpl subMember = new PageUserImpl();
        subPage1.setMembers(Lists.<PageUser>newLinkedList());
        subPage1.setRegions(Lists.<Region>newLinkedList());
        subPage1.getMembers().add(subMember);
        subPage1.getRegions().add(subRegion);
        Page subPage2 = new PageImpl();
View Full Code Here


                                             pageLayoutRepository, userService, defaultPageName);

        validWidget = new WidgetImpl("1", "http://dummy.apache.org/widgets/widget.xml");

        page = new PageImpl(PAGE_ID, user.getId());
        pageUser = new PageUserImpl(user.getId(), page, 1L);
        page.setMembers(new ArrayList<PageUser>());
        page.getMembers().add(pageUser);

        page2 = new PageImpl(PAGE_ID2, user.getId());
        pageUser2 = new PageUserImpl(user.getId(), page2, 2L);
        page2.setMembers(new ArrayList<PageUser>());
        page2.getMembers().add(pageUser2);

        targetRegion = new RegionImpl("2");
        targetRegion.setLocked(false);
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

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

        PageUser pageUser = new PageUserImpl(page.getOwnerId(), 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

    }

    @Transactional
    public Boolean addMemberToPage(String pageId, String userId){
        Page page = getPage(pageId);
        PageUser pageUser = new PageUserImpl();
        pageUser.setUserId(userService.getUserById(userId).getId());
        pageUser.setPage(page);
        pageUser.setPageStatus(PageInvitationStatus.PENDING);
        List<PageUser> thisUsersPages = pageRepository.getPagesForUser(userService.getUserById(userId).getId(), PageType.USER);
        pageUser.setRenderSequence(new Long(thisUsersPages.size() + 1));
        page.getMembers().add(pageUser);
        if(pageRepository.save(page) != null){
            return Boolean.TRUE;
        }else{
            return Boolean.FALSE;
View Full Code Here

        long renderSequence = defaultUserPage.size() + 1;
        page = new PageImpl();
        page.setName(pageName);
        page.setOwnerId(user.getId());
        page.setPageLayout(pageLayout);
        PageUser pageUser = new PageUserImpl(page.getOwnerId(), page, renderSequence);
        pageUser.setPageStatus(PageInvitationStatus.OWNER);
        pageUser.setEditor(true);

        List<PageUser> members = new ArrayList<PageUser>();
        members.add(pageUser);
        page.setMembers(members);
View Full Code Here

        Page subPage2 = new PageImpl();
        subPage2.setId(SUB_PAGE_2_ID);
        subPage2.setOwnerId(testOwner.getId());

        List<PageUser> pageUsers1 = new ArrayList<PageUser>();
        PageUser pageUser1 = new PageUserImpl();
        pageUser1.setUserId(id);
        pageUser1.setPage(subPage1);
        pageUser1.setRenderSequence(2L);
        pageUsers1.add(pageUser1);
        subPage1.setMembers(pageUsers1);

        List<PageUser> pageUsers2 = new ArrayList<PageUser>();
        PageUser pageUser2 = new PageUserImpl();
        pageUser2.setUserId("");
        pageUser2.setPage(subPage2);
        pageUser2.setRenderSequence(19L);
        pageUsers2.add(pageUser2);

        PageUser pageUser3 = new PageUserImpl();
        pageUser3.setUserId(testOwner.getId());
        pageUser3.setPage(subPage2);
        pageUser3.setRenderSequence(1L);
        pageUsers2.add(pageUser3);
        subPage2.setMembers(pageUsers2);

        subPages.add(subPage1);
        subPages.add(subPage2);
    pageLayout=new PageLayoutImpl();
    renderSequence=1223L;

    regions=new ArrayList<Region>();
    regions.add(new RegionImpl());
    regions.add(new RegionImpl());

    page.setName(testName);
    page.setOwnerId(testOwner.getId());
    page.setParentPage(parentPage);
    page.setSubPages(subPages);
    page.setPageLayout(pageLayout);
    page.setRegions(regions);

    pageUser = new PageUserImpl();
    pageUser.setPage(page);
    pageUser.setUserId(id);
    pageUser.setRenderSequence(renderSequence);
  }
View Full Code Here

TOP

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

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.