Package org.apache.rave.model

Examples of org.apache.rave.model.PageType


               isPageOwner(authentication, page, trustedPageContainer, trustedDomainObject) ||
               isPageMember(authentication, page, trustedPageContainer, trustedDomainObject, false);
    }

    private boolean isPersonProfilePageOrSubPage(Page page) {
        PageType pageType = page.getPageType();
        PageType parentPageType = (page.getParentPage() == null) ? null : page.getParentPage().getPageType();
        return PageType.PERSON_PROFILE.equals(pageType) || PageType.PERSON_PROFILE.equals(parentPageType);
    }
View Full Code Here


        assertThat(returned, is(sameInstance(CollectionUtils.<PageTemplate>toBaseTypedList(templates))));
    }

    @Test
    public void getDefaultPage_Valid(){
        PageType pageType = PageType.get("user");
        MongoDbPageTemplate found = new MongoDbPageTemplate();
        expect(template.findOne(new Query(where("pageType").is(pageType.getPageType().toUpperCase()).andOperator(where("defaultTemplate").is(true))), MongoDbPageTemplate.class, CollectionNames.PAGE_TEMPLATE_COLLECTION)).andReturn(found);
        converter.hydrate(found, PageTemplate.class);
        expectLastCall();
        replay(converter, template);

        PageTemplate returned = templateRepository.getDefaultPage(pageType);
View Full Code Here

        assertThat(returned, is(sameInstance(CollectionUtils.<PageTemplate>toBaseTypedList(templates))));
    }

    @Test
    public void getDefaultPage_Valid(){
        PageType pageType = PageType.get("user");
        MongoDbPageTemplate found = new MongoDbPageTemplate();
        expect(template.findOne(new Query(where("pageType").is(pageType.getPageType().toUpperCase()).andOperator(where("defaultTemplate").is(true))))).andReturn(found);
        replay(template);

        PageTemplate returned = templateRepository.getDefaultPage(pageType.toString());

        assertThat((MongoDbPageTemplate)returned, is(sameInstance(found)));
    }
View Full Code Here

TOP

Related Classes of org.apache.rave.model.PageType

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.