Package org.exoplatform.portal.mop.page

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


            if (node != null) {
                ExoContainer container = getApplication().getApplicationServiceContainer();
                container.getComponentInstanceOfType(UserPortalConfigService.class);
                UserPortalConfigService configService = (UserPortalConfigService) container
                        .getComponentInstanceOfType(UserPortalConfigService.class);
                PageKey pageRef = node.getPageRef();
                PageContext page = configService.getPage(pageRef);

                //
                if (page != null) {
                    title = page.getState().getDisplayName();
View Full Code Here


        }

        private String clonePageFromNode(TreeNode node, String pageName, SiteKey siteKey) {
            String pageId = node.getPageRef();
            if (pageId != null) {
                PageKey sourceKey = PageKey.parse(pageId);
                PageContext page = pageService.loadPage(sourceKey);
                if (page != null) {
                    page = pageService.clone(sourceKey, siteKey.page(pageName));
                    return page.getKey().format();
                }
View Full Code Here

            PageState pageState = new PageState(uiPageTitle.getValue(), null, false, null,
                    accessPermission != null ? Arrays.asList(accessPermission) : null, editPermission);

            // check page is exist
            PageKey pageKey = PageKey.parse(uiForm.getOwnerType().getName() + "::" + ownerId + "::" + uiPageName.getValue());
            PageService pageService = uiForm.getApplicationComponent(PageService.class);
            PageContext existPage = pageService.loadPage(pageKey);
            if (existPage != null) {
                uiPortalApp.addMessage(new ApplicationMessage("UIPageForm.msg.sameName", null));
                return;
View Full Code Here

                    uiPage.getEditPermission());
        } else {
            UIPortal currentUIPortal = portalApp.<UIWorkingWorkspace> findComponentById(UIPortalApplication.UI_WORKING_WS_ID)
                    .findFirstComponentOfType(UIPortal.class);
            UserNode currentNode = currentUIPortal.getSelectedUserNode();
            PageKey pageKey = currentNode.getPageRef();
            if (pageKey == null) {
                return false;
            } else {
                PageService pageService = portalApp.getApplicationComponent(PageService.class);
                PageContext page = pageService.loadPage(pageKey);
View Full Code Here

            if (node != null) {
                ExoContainer container = getApplication().getApplicationServiceContainer();
                container.getComponentInstanceOfType(UserPortalConfigService.class);
                UserPortalConfigService configService = (UserPortalConfigService) container
                        .getComponentInstanceOfType(UserPortalConfigService.class);
                PageKey pageRef = node.getPageRef();
                PageContext page = configService.getPage(pageRef);

                //
                if (page != null) {
                    title = page.getState().getDisplayName();
View Full Code Here

            /*
             * if it is a edition of the current page and it is not available to current remote user anymore.
             */
            PortalRequestContext pContext = Util.getPortalRequestContext();
            PageKey pageKey = PageKey.parse(pageId);
            if (page.getStorageId() != null && portalConfigService.getPageService().loadPage(pageKey) == null) {
                uiPortalApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.PageNotExist", new String[] { pageId },
                        ApplicationMessage.WARNING));
                uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
                uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
View Full Code Here

                uiPage.setMoveAppsPermissions(page.getMoveAppsPermissions());
                uiPage.setMoveContainersPermissions(page.getMoveContainersPermissions());
            } else {
                /* set defaults if the page does not exist yet */
                UserPortalConfigService configService = uiPageForm.getApplicationComponent(UserPortalConfigService.class);
                PageKey pageKey = new PageKey(new SiteKey(page.getOwnerType(), page.getOwnerId()), page.getName());
                if (configService.getPageService().loadPage(pageKey) == null) {
                    configService.setDefaultPermissions(page);
                    uiPage.setMoveAppsPermissions(page.getMoveAppsPermissions());
                    uiPage.setMoveContainersPermissions(page.getMoveContainersPermissions());
                }
View Full Code Here

    public void switchToEditMode() throws Exception {
        PageService pageService = this.getApplicationComponent(PageService.class);
        DataStorage dataStorage = this.getApplicationComponent(DataStorage.class);

        PageKey pageKey = new PageKey(getSiteKey(), getName());
        PageContext pageContext = pageService.loadPage(pageKey);
        if (pageContext == null) {
            UIPortalApplication uiApp = Util.getUIPortalApplication();
            ApplicationMessage msg = new ApplicationMessage("UIPageBrowser.msg.PageNotExist", new String[] { pageKey.format() }, 1);
            uiApp.addMessage(msg);
        } else {
            Page page = dataStorage.getPage(pageKey.format());
            pageContext.update(page);
            switchToEditMode(page);
        }
    }
View Full Code Here

            uiPage = uiWorkingWS.findFirstComponentOfType(UIPage.class);
        }

        Page page = (Page) PortalDataMapper.buildModelObject(uiPage);
        String pageId = page.getPageId();
        PageKey pageKey = PageKey.parse(pageId);
        PageState pageState = PageUtils.toPageState(page);
        PageContext pageContext = new PageContext(pageKey, pageState);
        pageService.savePage(pageContext);
        dataService.save(page);
        composer.setEditted(false);
View Full Code Here

            String ownerType = pageNavi.getKey().getTypeName();
            String ownerId = pageNavi.getKey().getName();
            String pageName = "page" + UUID.randomUUID().hashCode();

            // Check if the page exists
            PageKey pageKey = new SiteKey(ownerType, ownerId).page(pageName);
            PageService pageService = uiWizard.getApplicationComponent(PageService.class);
            if (pageService.loadPage(pageKey) != null) {
                uiPortalApp.addMessage(new ApplicationMessage("UIPageCreationWizard.msg.NameNotSame", null));
                uiWizard.viewStep(FIRST_STEP);
                uiWizard.updateWizardComponent();
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.