Package org.exoplatform.portal.mop.page

Examples of org.exoplatform.portal.mop.page.PageKey


        page.setModifiable(false);
        return false;
    }

    public boolean hasEditPermission(PageContext page) {
        PageKey key = page.getKey();
        Identity identity = getIdentity();
        if (SiteType.USER == key.getSite().getType()) {
            return key.getSite().getName().equals(identity.getUserId());
        } else {
            return hasPermission(identity, page.getState().getEditPermission());
        }
    }
View Full Code Here


            Navigation sourceNav = session.findObjectById(ObjectType.NAVIGATION, source.data.id);

            //
            toEvict.add(sourceNav.getObjectId());
            Workspace workspace = sourceNav.getSite().getWorkspace();
            PageKey reference = state.getPageRef();
            if (reference != null) {
                ObjectType<? extends Site> siteType = Utils.objectType(reference.getSite().getType());
                Site site = workspace.getSite(siteType, reference.getSite().getName());
                org.gatein.mop.api.workspace.Page target = site.getRootPage().getChild("pages").getChild(reference.getName());
                PageLink link = sourceNav.linkTo(ObjectType.PAGE_LINK);
                link.setPage(target);
            } else {
                PageLink link = sourceNav.linkTo(ObjectType.PAGE_LINK);
                link.setPage(null);
View Full Code Here

            startPublicationDate = restrictAccess.getStartPublicationDate();
            endPublicationDate = restrictAccess.getEndPublicationDate();
        }

        //
        PageKey pageRef = null;
        Link link = navigation.getLink();
        if (link instanceof PageLink) {
            PageLink pageLink = (PageLink) link;
            org.gatein.mop.api.workspace.Page target = pageLink.getPage();
            if (target != null) {
View Full Code Here

                        break;
                    }
                    prevNode = child;
                }

                PageKey pageRef = tobeRemoved.getPageRef();
                if (pageRef != null) {
                    PageContext page = configService.getPageService().loadPage(pageRef);
                    if (page != null) {
                        configService.getPageService().destroyPage(pageRef);
                    }
                    UIPortal uiPortal = Util.getUIPortal();
                    // Remove from cache
                    uiPortal.setUIPage(pageRef.format(), null);
                }
                getUserPortal().saveNode(parentNode, null);
            } else {
                getAncestorOfType(UIApplication.class).addMessage(
                        new ApplicationMessage("UITabPaneDashboard.msg.cannotDeleteLastTab", null));
View Full Code Here

                    siteKey.getName());
            page.setTitle(HTMLEntityEncoder.getInstance().encode(nodeLabel));
            page.setName(uniqueNodeName + page.hashCode());

            //
            PageKey pageKey = new PageKey(siteKey, page.getName());
            PageState pageState = PageUtils.toPageState(page);
            configService.getPageService().savePage(new PageContext(pageKey, pageState));

            //
            dataService.save(page);
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.mop.page.PageKey

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.