Package org.exoplatform.portal.config.model

Examples of org.exoplatform.portal.config.model.Page


        toContainer(model, uiContainer);
        return model;
    }

    public static Page toPageModel(UIPage uiPage) {
        Page model = new Page(uiPage.getStorageId());
        toContainer(model, uiPage);
        model.setOwnerId(uiPage.getSiteKey().getName());
        model.setOwnerType(uiPage.getSiteKey().getTypeName());
        model.setIcon(uiPage.getIcon());
        model.setPageId(uiPage.getPageId());
        model.setTitle(uiPage.getTitle());
        model.setAccessPermissions(uiPage.getAccessPermissions());
        model.setEditPermission(uiPage.getEditPermission());
        model.setFactoryId(uiPage.getFactoryId());
        model.setShowMaxWindow(uiPage.isShowMaxWindow());
        model.setModifiable(uiPage.isModifiable());
        return model;
    }
View Full Code Here


            UIPage uiPage = event.getSource();
            String id = event.getRequestContext().getRequestParameter(UIComponent.OBJECTID);
            PortalRequestContext pcontext = (PortalRequestContext) event.getRequestContext();
            if (uiPage.isModifiable()) {
                uiPage.removeChildById(id);
                Page page = (Page) PortalDataMapper.buildModelObject(uiPage);
                if (page.getChildren() == null) {
                    page.setChildren(new ArrayList<ModelObject>());
                }

                //
                PageService pageService = uiPage.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 = uiPage.getApplicationComponent(DataStorage.class);
                dataService.save(page);
View Full Code Here

    * @return the page
    * @throws Exception any exception
    */
   public Page getPage(String pageId, String accessUser) throws Exception
   {
      Page page = getPage(pageId);
      if (page == null || !userACL_.hasPermission(page))
      {
         return null;
      }
      return page;
View Full Code Here

    * @throws Exception
    */
   public PageNode createNodeFromPageTemplate(String nodeName, String nodeLabel, String pageId, String ownerType,
                                              String ownerId) throws Exception
   {
      Page page = storage_.clonePage(pageId, nodeName, ownerType, ownerId);
      PageNode pageNode = new PageNode();
      if (nodeLabel == null || nodeLabel.trim().length() < 1)
      {
         nodeLabel = nodeName;
      }
      pageNode.setName(nodeName);
      pageNode.setLabel(nodeLabel);
      pageNode.setPageReference(page.getPageId());
      return pageNode;
   }
View Full Code Here

    * @return the page
    * @throws Exception any exception
    */
   public Page createPageTemplate(String temp, String ownerType, String ownerId) throws Exception
   {
      Page page = newPortalConfigListener_.createPageFromTemplate(ownerType, ownerId, temp);
      updateOwnership(page, ownerType, ownerId);
      return page;
   }
View Full Code Here

      if (object instanceof Container)
      {
         Container container = (Container)object;
         if (container instanceof Page)
         {
            Page page = (Page)container;
            page.setOwnerType(ownerType);
            page.setOwnerId(ownerId);
         }
         for (ModelObject child : container.getChildren())
         {
            updateOwnership(child, ownerType, ownerId);
         }
View Full Code Here

   public Page clonePage(String pageId, String clonedOwnerType, String clonedOwnerId, String clonedName) throws Exception
   {
      PageKey key = PageKey.create(pageId);
      PageKey cloneKey = new PageKey(clonedOwnerType, clonedOwnerId, clonedName);
      return new Page(delegate.clonePage(key, cloneKey));
   }
View Full Code Here

   public Page getPage(String pageId) throws Exception
   {
      PageKey key = PageKey.create(pageId);
      PageData data = delegate.getPage(key);
      return data != null ? new Page(data) : null;
   }
View Full Code Here

         Bilto<Page, PageData> bilto = new Bilto<Page, PageData>((Query<Page>)q, PageData.class, (Comparator<Page>)sortComparator)
         {
            @Override
            protected Page create(PageData pageData)
            {
               return new Page(pageData);
            }
         };
         return (ListAccess<T>)bilto.execute();
      }
      else if (type == PageNavigation.class)
View Full Code Here

    }

    public static UIPage toUIPage(String pageRef, UIComponent uiParent) throws Exception {
        UserPortalConfigService configService = uiParent.getApplicationComponent(UserPortalConfigService.class);
        PageContext pageContext = configService.getPage(PageKey.parse(pageRef));
        Page page = configService.getDataStorage().getPage(pageRef);
        pageContext.update(page);
        return toUIPage(page, uiParent);
    }
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.config.model.Page

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.