Examples of PortalConfig


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

   {
      // Create the portal from the template
      createUserPortalConfig(PortalConfig.GROUP_TYPE, groupId, "group");

      // Need to insert the corresponding group site
      PortalConfig cfg = storage_.getPortalConfig(PortalConfig.GROUP_TYPE, groupId);
      if (cfg == null)
      {
         cfg = new PortalConfig(PortalConfig.GROUP_TYPE);
         cfg.setPortalLayout(new Container());
         cfg.setName(groupId);
         storage_.create(cfg);
      }
   }
View Full Code Here

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

    * @param ownerId   the portal name
    * @throws Exception any exception
    */
   public void removeUserPortalConfig(String ownerType, String ownerId) throws Exception
   {
      PortalConfig config = storage_.getPortalConfig(ownerType, ownerId);
      if (config != null)
      {
         storage_.remove(config);
      }
   }
View Full Code Here

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

   {
      List<String> list = storage_.getAllPortalNames();
      for (Iterator<String> i = list.iterator();i.hasNext();)
      {
         String name = i.next();
         PortalConfig config = storage_.getPortalConfig(name);
         if (config == null || !userACL_.hasPermission(config))
         {
            i.remove();
         }
      }
View Full Code Here

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

   public void createPortalConfig(NewPortalConfig config, String owner) throws Exception
   {
      try
      {
         String type = config.getOwnerType();
         PortalConfig pconfig = getConfig(config, owner, type, PortalConfig.class);

         if (pconfig == null)
         {
            // Ensure that the PortalConfig has been defined
            // The PortalConfig could be empty if the related PortalConfigListener
            // has been launched after starting this service
            PortalConfig cfg = dataStorage_.getPortalConfig(type, owner);
            if (cfg == null)
            {
               cfg = new PortalConfig(type);
               cfg.setPortalLayout(new Container());
               cfg.setName(owner);
               dataStorage_.create(cfg);
            }
            return;
         }

         // We use that owner value because it may have been fixed for group names
         owner = pconfig.getName();

         //
         PortalConfig currentPortalConfig = dataStorage_.getPortalConfig(type, owner);
         if (currentPortalConfig == null)
         {
            dataStorage_.create(pconfig);
         }
         else
View Full Code Here

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

         nav.setOwnerId(owner);
         fixOwnerName((PageNavigation)o);
      }
      else if (o instanceof PortalConfig)
      {
         PortalConfig portalConfig = (PortalConfig)o;
         portalConfig.setType(ownerType);
         portalConfig.setName(owner);
         fixOwnerName(portalConfig);
      }
      else if (o instanceof PortletPreferencesSet)
      {
         for (PortletPreferences portlet : ((PortletPreferencesSet)o).getPortlets())
View Full Code Here

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

         Bilto<PortalConfig, PortalData> bilto = new Bilto<PortalConfig, PortalData>((Query<PortalConfig>)q, PortalData.class, (Comparator<PortalConfig>)sortComparator)
         {
            @Override
            protected PortalConfig create(PortalData portalData)
            {
               return new PortalConfig(portalData);
            }
         };
         return (ListAccess<T>)bilto.execute();
      }
      else
View Full Code Here

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

   public PortalConfig getPortalConfig(String ownerType, String portalName) throws Exception
   {
      PortalKey key = new PortalKey(ownerType, portalName);
      PortalData data = delegate.getPortalConfig(key);
      return data != null ? new PortalConfig(data) : null;
   }
View Full Code Here

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

        return getUserPortalConfig(portalName, accessUser, NULL_CONTEXT);
    }

    public UserPortalConfig getUserPortalConfig(String portalName, String accessUser, UserPortalContext userPortalContext)
            throws Exception {
        PortalConfig portal = storage_.getPortalConfig(portalName);
        if (portal == null || !userACL_.hasPermission(portal)) {
            return null;
        }

        return new UserPortalConfig(portal, this, portalName, accessUser, userPortalContext);
View Full Code Here

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

    public void createUserSite(String userName) throws Exception {
        // Create the portal from the template
        createUserPortalConfig(PortalConfig.USER_TYPE, userName, "user");

        // Need to insert the corresponding user site if needed
        PortalConfig cfg = storage_.getPortalConfig(PortalConfig.USER_TYPE, userName);
        if (cfg == null) {
            cfg = new PortalConfig(PortalConfig.USER_TYPE);
            cfg.setPortalLayout(new Container());
            cfg.setName(userName);
            storage_.create(cfg);
        }

        // Create a blank navigation if needed
        SiteKey key = SiteKey.user(userName);
View Full Code Here

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

    public void createGroupSite(String groupId) throws Exception {
        // Create the portal from the template
        createUserPortalConfig(PortalConfig.GROUP_TYPE, groupId, "group");

        // Need to insert the corresponding group site
        PortalConfig cfg = storage_.getPortalConfig(PortalConfig.GROUP_TYPE, groupId);
        if (cfg == null) {
            cfg = new PortalConfig(PortalConfig.GROUP_TYPE);
            cfg.setPortalLayout(new Container());
            cfg.setName(groupId);
            storage_.create(cfg);
        }
    }
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.