Package org.exoplatform.container.definition

Examples of org.exoplatform.container.definition.PortalContainerConfig


         ServletContainerFactory.getServletContainer().addWebAppListener(this);
         ServletContainerFactory.getServletContainer().addAuthenticationListener(this);
      }
      else
      {
         PortalContainerConfig config = getPortalContainerConfig();
         for (String portalContainerName : initTasks.keySet())
         {
            if (config.isPortalContainerName(portalContainerName))
            {
               // Unregister name of portal container that doesn't exist
               LOG.warn("The portal container '" + portalContainerName + "' doesn't exist or"
                  + " it has not yet been registered, please check your PortalContainerDefinitions and "
                  + "the loading order.");
               config.unregisterPortalContainerName(portalContainerName);           
            }
         }
         // remove all the registered web application contexts
         // corresponding to the portal containers
         portalContexts.clear();
View Full Code Here


    * expect the old behavior, thus the portal container will be initialized synchronously
    * @param context the context of the portal container
    */
   public void registerPortalContainer(ServletContext context)
   {
      PortalContainerConfig config = getPortalContainerConfig();
      // Ensure that the portal container has been registered
      config.registerPortalContainerName(context.getServletContextName());
      if (config.hasDefinition())
      {
         // The new behavior has been detected thus, the creation will be done at the end asynchronously
         portalContexts.add(new WebAppInitContext(context));
         // We assume that a ServletContext of a portal container owns configuration files
         final PortalContainerPreInitTask task = new PortalContainerPreInitTask()
View Full Code Here

         {
            // Re-set the old classloader
            Thread.currentThread().setContextClassLoader(currentClassLoader);
         }
      }
      PortalContainerConfig config = getPortalContainerConfig();
      for (String portalContainerName : initTasks.keySet())
      {
         // Unregister name of portal container that doesn't exist
         log.warn("The portal container '" + portalContainerName + "' doesn't not exist or"
            + " it has not yet been registered, please check your PortalContainerDefinitions and "
            + "the loading order.");
         config.unregisterPortalContainerName(portalContainerName);
      }
      // remove all the unneeded tasks
      initTasks.clear();
   }
View Full Code Here

   {
      SecurityManager security = System.getSecurityManager();
      if (security != null)
         security.checkPermission(ContainerPermissions.MANAGE_CONTAINER_PERMISSION);    
     
      PortalContainerConfig config = getPortalContainerConfig();
      if (config.hasDefinition())
      {
         // The new behavior has been detected thus, the creation will be done at the end asynchronously
         if (config.isPortalContainerName(context.getServletContextName()))
         {
            // The portal context has been registered has a portal container
            portalContexts.add(new WebAppInitContext(context));
         }
         else
         {
            if (PropertyManager.isDevelopping())
            {
               log.info("We assume that the ServletContext '" + context.getServletContextName()
                  + "' is not a portal since no portal container definition with the same name has been"
                  + " registered to the component PortalContainerConfig. The related portal container"
                  + " will be declared as disabled.");
            }
            config.disablePortalContainer(context.getServletContextName());
         }
         // We assume that a ServletContext of a portal container owns configuration files
         final PortalContainerPreInitTask task = new PortalContainerPreInitTask()
         {

            public void execute(ServletContext context, PortalContainer portalContainer)
            {
               portalContainer.registerContext(context);
            }
         };
         PortalContainer.addInitTask(context, task);
      }
      else
      {
         // Ensure that the portal container has been registered
         config.registerPortalContainerName(context.getServletContextName());
         // The old behavior has been detected thus, the creation will be done synchronously
         createPortalContainer(context);
      }
   }
View Full Code Here

         {
            // Re-set the old classloader
            Thread.currentThread().setContextClassLoader(currentClassLoader);
         }
      }
      PortalContainerConfig config = getPortalContainerConfig();
      for (String portalContainerName : initTasks.keySet())
      {
         if (config.isPortalContainerName(portalContainerName))
         {
            // Unregister name of portal container that doesn't exist
            log.warn("The portal container '" + portalContainerName + "' doesn't not exist or"
               + " it has not yet been registered, please check your PortalContainerDefinitions and "
               + "the loading order.");
            config.unregisterPortalContainerName(portalContainerName);           
         }
      }
      // remove all the unneeded tasks
      initTasks.clear();
   }
View Full Code Here

            registerComponentInstance(ServletContext.class, portalContext);
            registerComponentInstance(PortalContainerInfo.class, pinfo_);
            return null;
         }
      });
      final PortalContainerConfig config = parent.getPortalContainerConfig();
      final List<String> dependencies = config == null ? null : config.getDependencies(name);
      if (dependencies == null || dependencies.isEmpty())
      {
         // No order is required
         this.webAppComparator = null;
      }
View Full Code Here

    * expect the old behavior, thus the portal container will be initialized synchronously
    * @param context the context of the portal container
    */
   public void registerPortalContainer(ServletContext context)
   {
      PortalContainerConfig config = getPortalContainerConfig();
      // Ensure that the portal container has been registered
      config.registerPortalContainerName(context.getServletContextName());
      if (config.hasDefinition())
      {
         // The new behavior has been detected thus, the creation will be done at the end asynchronously
         portalContexts.add(new WebAppInitContext(context));
         // We assume that a ServletContext of a portal container owns configuration files
         final PortalContainerPreInitTask task = new PortalContainerPreInitTask()
View Full Code Here

         {
            // Re-set the old classloader
            Thread.currentThread().setContextClassLoader(currentClassLoader);
         }
      }
      PortalContainerConfig config = getPortalContainerConfig();
      for (String portalContainerName : initTasks.keySet())
      {
         // Unregister name of portal container that doesn't exist
         log.warn("The portal container '" + portalContainerName + "' doesn't not exist or"
            + " it has not yet been registered, please check your PortalContainerDefinitions and "
            + "the loading order.");
         config.unregisterPortalContainerName(portalContainerName);
      }
      // remove all the unneeded tasks
      initTasks.clear();
   }
View Full Code Here

      registerComponentInstance(ServletContext.class, portalContext);
      context.setName(portalContext.getServletContextName());
      pinfo_ = new PortalContainerInfo(portalContext);
      registerComponentInstance(PortalContainerInfo.class, pinfo_);
      this.name = portalContext.getServletContextName();
      final PortalContainerConfig config = parent.getPortalContainerConfig();
      final List<String> dependencies = config == null ? null : config.getDependencies(name);
      if (dependencies == null || dependencies.isEmpty())
      {
         // No order is required
         this.webAppComparator = null;
      }
View Full Code Here

            registerComponentInstance(ServletContext.class, portalContext);
            registerComponentInstance(PortalContainerInfo.class, pinfo_);
            return null;
         }
      });
      final PortalContainerConfig config = parent.getPortalContainerConfig();
      final List<String> dependencies = config == null ? null : config.getDependencies(name);
      if (dependencies == null || dependencies.isEmpty())
      {
         // No order is required
         this.webAppComparator = null;
      }
View Full Code Here

TOP

Related Classes of org.exoplatform.container.definition.PortalContainerConfig

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.