Package org.exoplatform.portal.mop.page

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


                    Page page = configService.createPageTemplate(PAGE_TEMPLATE, siteKey.getTypeName(), siteKey.getName());
                    page.setName(DEFAULT_TAB_NAME);
                    page.setTitle(DEFAULT_TAB_NAME);

                    //
                    PageState pageState = PageUtils.toPageState(page);
                    configService.getPageService().savePage(new PageContext(page.getPageKey(), pageState));

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


                uiEvent.broadcast();
                return;
            }

            // Perform model update
            PageState pageState = PageUtils.toPageState(page);
            PageContext pageContext = new PageContext(pageKey, pageState);
            try {
                if (!portalConfigService.getUserACL().hasPermission(pageContext)) {
                    editInlineWS.createActionConfirm("UIEditInlineWorkspace.confirm.finish.page", "ConfirmFinish", "AbortClose");
                    return;
View Full Code Here

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

            //
            PageKey pageKey = new PageKey(siteKey, page.getName());
            PageState pageState = new PageState(page.getTitle(), page.getDescription(), page.isShowMaxWindow(),
                    page.getFactoryId(), page.getAccessPermissions() != null ? Arrays.asList(page.getAccessPermissions())
                            : null, page.getEditPermission());
            configService.getPageService().savePage(new PageContext(pageKey, pageState));

            //
View Full Code Here

            // Rename the page only in basic label mode.
            // For "Extended label mode" use page editor.
            if (renamedNode.getPageRef() != null && renamedNode.getLabel() != null) {
                PageContext page = configService.getPageService().loadPage(renamedNode.getPageRef());
                if (page != null) {
                    PageState state = page.getState();
                    String encodedLabel = HTMLEntityEncoder.getInstance().encode(newNodeLabel);
                    page.setState(state.builder().displayName(encodedLabel).build());
                    configService.getPageService().savePage(page);
                    // Update UIPage cache on UIPortal.
                    uiPortal.setUIPage(renamedNode.getPageRef().format(), null);
                }
            }
View Full Code Here

            throw new EntityNotFoundException("Site " + pageId.getSiteId() + " doesn't exist");
        }

        Permission access = Permission.everyone();
        Permission edit = Permission.any("platform", "administrators");
        PageState pageState = new PageState(pageId.getPageName(), null, false, null, Arrays.asList(Util.from(access)),
            Util.from(edit)[0]);

        PageImpl p = new PageImpl(new PageContext(Util.from(pageId), pageState));
        p.setCreate(true);
        return p;
View Full Code Here

        }
        SiteKey siteKey = new SiteKey(siteType, siteName);

        PageKey pageKey = new PageKey(siteKey, name);

        PageState pageState = new PageState(displayName,
                description,
                showMaxWindow,
                null,
                Arrays.asList(Util.from(accessPermission)),
                Util.from(editPermission)[0], // this is the same as the createPage, but is it right?
View Full Code Here

        Permission accessPermissions = Container.DEFAULT_ACCESS_PERMISSION;
        Permission edit = Page.DEFAULT_EDIT_PERMISSION;
        Permission moveAppsPermissions = Container.DEFAULT_MOVE_APPS_PERMISSION;
        Permission moveContainersPermissions = Container.DEFAULT_MOVE_CONTAINERS_PERMISSION;

        PageState pageState = new PageState(pageId.getPageName(), null, false, null,
                Arrays.asList(Util.from(accessPermissions)),
                Util.from(edit)[0], Arrays.asList(Util.from(moveAppsPermissions)),
                Arrays.asList(Util.from(moveContainersPermissions)));

        PageImpl p = new PageImpl(this, new PageContext(Util.from(pageId), pageState));
View Full Code Here

        Permission edit = Permission.any("platform", "administrators");
        List<String> moveAppsPermissions = ProtectedContainer.DEFAULT_MOVE_APPLICATIONS_PERMISSIONS;
        List<String> moveContainersPermissions = ProtectedContainer.DEFAULT_MOVE_CONTAINERS_PERMISSIONS;

        PageState pageState = new PageState(pageId.getPageName(), null, false, null, Arrays.asList(Util.from(Permission
                .everyone())), Util.from(edit)[0], moveAppsPermissions, moveContainersPermissions);

        PageImpl p = new PageImpl(new PageContext(Util.from(pageId), pageState));
        p.setCreate(true);
        return p;
View Full Code Here

        return pages;
    }

    public static PageState toPageState(Page page) {
        return new PageState(page.getTitle(), page.getDescription(), page.isShowMaxWindow(), page.getFactoryId(),
                page.getAccessPermissions() != null ? Arrays.asList(page.getAccessPermissions()) : null,
                page.getEditPermission(), page.getMoveAppsPermissions() != null ? Arrays.asList(page.getMoveAppsPermissions()) : null,
                page.getMoveContainersPermissions() != null ? Arrays.asList(page.getMoveContainersPermissions()) : null);
    }
View Full Code Here

            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.PageState

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.