Examples of PageService


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

            Page page = new Page();
            uiPageForm.invokeSetBindingBean(page);
            DataStorage dataService = uiPageForm.getApplicationComponent(DataStorage.class);
            // create new page
            if (uiPage == null) {
                PageService pageService = uiPageForm.getApplicationComponent(PageService.class);
                PageContext existPage = pageService.loadPage(page.getPageKey());
                if (existPage != null) {
                    uiPortalApp.addMessage(new ApplicationMessage("UIPageForm.msg.sameName", null));
                    return;
                }
                page.setModifiable(true);
                if (page.getChildren() == null) {
                    page.setChildren(new ArrayList<ModelObject>());
                }

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

                //
                dataService.save(page);
                postSave(uiPortalApp, pcontext);
                return;
View Full Code Here

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

        UIPortalToolPanel uiToolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
        UIPortalComposer composer = uiWorkingWS.findFirstComponentOfType(UIPortalComposer.class);
        UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
        UIPortal uiPortal = uiPortalApp.getCurrentSite();
        DataStorage dataService = uiWorkingWS.getApplicationComponent(DataStorage.class);
        PageService pageService = uiWorkingWS.getApplicationComponent(PageService.class);

        UIPage uiPage;
        if (!UIPage.isFullPreview()) {
            uiPage = uiToolPanel.findFirstComponentOfType(UIPage.class);
        } else {
            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);

        //
        uiToolPanel.setUIComponent(null);
View Full Code Here

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

        UserNode createdNode = uiPageInfo.createUserNode(selectedNode);

        createdNode.setPageRef(page.getPageKey());

        //
        PageService pageService = getApplicationComponent(PageService.class);
        PageState pageState = PageUtils.toPageState(page);
        pageService.savePage(new PageContext(page.getPageKey(), pageState));

        //
        DataStorage dataService = getApplicationComponent(DataStorage.class);
        dataService.save(page);
View Full Code Here

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

            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

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

        page.setOwnerType(ownerType);
        page.setOwnerId(ownerId);
        page.setName(getUIStringInput("name").getValue());

        // Check if the page exists
        PageService pageService = getApplicationComponent(PageService.class);
        PageKey pageKey = new SiteKey(ownerType, ownerId).page(page.getName());

        if (pageService.loadPage(pageKey) == null) {
            // Set defaults only on new pages
            UserPortalConfigService configService = getApplicationComponent(UserPortalConfigService.class);
            configService.setDefaultPermissions(page);
        }
View Full Code Here

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

        DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
        if (dataStorage == null)
            throw new OperationException(operationName, "DataStorage was null");

        PageService pageService = operationContext.getRuntimeContext().getRuntimeComponent(PageService.class);
        if (pageService == null)
            throw new OperationException(operationName, "PageService was null");

        NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
        if (navigationService == null)
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.