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 = new PageState(page.getTitle(), page.getDescription(), page.isShowMaxWindow(),
                        page.getFactoryId(), page.getAccessPermissions() != null ? Arrays.asList(page.getAccessPermissions())
                                : null, page.getEditPermission());
                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

        UserNode createdNode = uiPageInfo.createUserNode(selectedNode);

        createdNode.setPageRef(page.getPageKey());

        //
        PageService pageService = getApplicationComponent(PageService.class);
        PageState pageState = new PageState(page.getTitle(), page.getDescription(), page.isShowMaxWindow(),
                page.getFactoryId(), page.getAccessPermissions() != null ? Arrays.asList(page.getAccessPermissions()) : null,
                page.getEditPermission());
        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

    public void setMaximizedUIPortlet(UIPortlet maximizedUIPortlet) {
        this.maximizedUIPortlet = maximizedUIPortlet;
    }

    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 {
View Full Code Here

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

    }

    public boolean hasNext() {
        if (hasNext && currentIndex == 0) {
            ExoContainer container = PortalContainer.getInstance();
            PageService pageService = (PageService) container.getComponentInstance(PageService.class);
            QueryResult<PageContext> result = pageService.findPages(0, 1, SiteType.valueOf(ownerType.toUpperCase()), ownerId,
                    name, title);

            hasNext = result.getSize() > 0;
        }
View Full Code Here

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

     *
     * @return Returns a list of pages or returns null if has not any page.
     */
    public List<PageModel> next() {
        ExoContainer container = PortalContainer.getInstance();
        PageService pageService = (PageService) container.getComponentInstance(PageService.class);
        QueryResult<PageContext> result = pageService.findPages(currentIndex, pageSize + 1,
                SiteType.valueOf(ownerType.toUpperCase()), ownerId, name, title);

        int size = result.getSize();
        hasNext = size > pageSize;

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

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

            }

            resultHandler.completed(new ReadResourceModel("List of all available pages for site '"
                    + rootPage.getSite().getName() + "'", children));
        } else {
            PageService pageService = operationContext.getRuntimeContext().getRuntimeComponent(PageService.class);
            PageKey pageKey = new PageKey(getSiteKey(rootPage.getSite()), pageName);

            if (pageService.loadPage(pageKey) == null) {
                throw new ResourceNotFoundException("No page found for " + pageKey);
            }

            resultHandler.completed(new ReadResourceModel("List of child pages for page '" + pageName + "'", Collections
                    .<String> emptySet()));
View Full Code Here

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

    protected void execute(OperationContext operationContext, ResultHandler resultHandler, Page pages)
            throws ResourceNotFoundException, OperationException {
        SiteKey siteKey = getSiteKey(pages.getSite());

        DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
        PageService pageService = operationContext.getRuntimeContext().getRuntimeComponent(PageService.class);
        BindingProvider bindingProvider = operationContext.getBindingProvider();

        Collection<Page> pagesList = pages.getChildren();
        List<ExportTask> tasks = new ArrayList<ExportTask>(pagesList.size());
View Full Code Here

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

    protected void execute(OperationContext operationContext, ResultHandler resultHandler,
            org.gatein.mop.api.workspace.Page rootPage) throws ResourceNotFoundException, OperationException {
        String operationName = operationContext.getOperationName();
        SiteKey siteKey = getSiteKey(rootPage.getSite());
        DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
        PageService pageService = operationContext.getRuntimeContext().getRuntimeComponent(PageService.class);

        String pageName = operationContext.getAddress().resolvePathTemplate("page-name");
        if (pageName == null) { // retrieve pages
            try {
                resultHandler.completed(PageUtils.getAllPages(dataStorage, pageService, siteKey));
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 = new PageState(page.getTitle(), page.getDescription(), page.isShowMaxWindow(),
                page.getFactoryId(), page.getAccessPermissions() != null ? Arrays.asList(page.getAccessPermissions()) : null,
                page.getEditPermission());
        pageService.savePage(new PageContext(page.getPageKey(), pageState));

        //
        DataStorage dataService = getApplicationComponent(DataStorage.class);
        dataService.save(page);
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.