Examples of PageType


Examples of org.apache.isis.viewer.wicket.ui.pages.PageType

    private IsisWicketApplication application;

    @Test
    public void delegatesToPageClassRegistryToObtainPageTypes() {
        final PageType pageType = PageType.HOME;
        final Class<HomePage> expectedPageClass = HomePage.class;

        final PageClassRegistry mockPageClassRegistry = context.mock(PageClassRegistry.class);
        application = new IsisWicketApplication() {
            private static final long serialVersionUID = 1L;
View Full Code Here

Examples of org.apache.isis.viewer.wicket.ui.pages.PageType

    }

    @Test
    public void delegatesToPageClassRegistryToObtainPageTypes_ForSignIn() {

        final PageType pageType = PageType.SIGN_IN;
        final Class<WebPage> expectedPageClass = WebPage.class;

        final PageClassRegistry mockPageClassRegistry = context.mock(PageClassRegistry.class);
        application = new IsisWicketApplication() {
            private static final long serialVersionUID = 1L;
View Full Code Here

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

Examples of org.apache.rave.model.PageType

        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

Examples of org.apache.rave.model.PageType

        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

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

        return isPersonProfilePageOrSubPage(page) ||
               isPageOwner(authentication, page, trustedPageContainer, trustedDomainObject);
    }
   
    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

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

        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

Examples of org.apache.rave.portal.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
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.