Package org.exoplatform.container

Examples of org.exoplatform.container.RootContainer


   /**
    * Initializes and creates all the portal container that have been registered previously
    */
   public void contextInitialized(ServletContextEvent event)
   {
      final RootContainer rootContainer = RootContainer.getInstance();
      SecurityHelper.doPrivilegedAction(new PrivilegedAction<Void>()
      {
         public Void run()
         {
            rootContainer.createPortalContainers();
            return null;
         }
      });
   }
View Full Code Here


   {
      ServletContext ctx = event.getServletContext();
      try
      {
         EnvSpecific.initThreadEnv(ctx);
         RootContainer rootContainer = RootContainer.getInstance();
         rootContainer.createPortalContainers();
      }
      finally
      {
         EnvSpecific.cleanupThreadEnv(ctx);
      }
View Full Code Here

                  // The requested key is the name of current container
                  ExoContainer container = ExoContainerContext.getCurrentContainerIfPresent();
                  if (container instanceof PortalContainer)
                  {
                     // The current container is a portal container
                     RootContainer rootContainer = (RootContainer)ExoContainerContext.getTopContainer();
                     value = rootContainer.isPortalContainerConfigAware() ? "_" + container.getContext().getName() : "";
                  }
               }
               else if (key.startsWith(Deserializer.PORTAL_CONTAINER_VARIABLE_PREFIX))
               {
                  // We try to get a value tied to the current portal container.
View Full Code Here

            public void execute(ServletContext context, PortalContainer portalContainer) {
                onInit(config, portalContainer);
            }
        };
        ServletContext context = config.getServletContext();
        RootContainer rootContainer = RootContainer.getInstance();
        rootContainer.addInitTask(context, task);
        rootContainer.registerPortalContainer(context);
    }
View Full Code Here

                  // The requested key is the name of current container
                  ExoContainer container = ExoContainerContext.getCurrentContainerIfPresent();
                  if (container instanceof PortalContainer)
                  {
                     // The current container is a portal container
                     RootContainer rootContainer = (RootContainer)ExoContainerContext.getTopContainer();
                     value = rootContainer.isPortalContainerConfigAware() ? "_" + container.getContext().getName() : "";
                  }
               }
               else
               {
                  value = System.getProperty(key);
View Full Code Here

   {
      ServletContext ctx = event.getServletContext();
      try
      {
         EnvSpecific.initThreadEnv(ctx);
         RootContainer rootContainer = RootContainer.getInstance();
         rootContainer.createPortalContainers();
      }
      finally
      {
         EnvSpecific.cleanupThreadEnv(ctx);
      }
View Full Code Here

    SourceBean paramContSB = (SourceBean) securityconfSB.getAttribute(paramCont);
    SecurityProviderUtilities.debug(this.getClass(), "<init(Principal)>",
      " Param context name Source Bean " + "retrived: " + paramContSB);
    String nameCont = (String) paramContSB.getCharacters();
    SecurityProviderUtilities.debug(this.getClass(), "<init(Principal)>", " Use context name " + nameCont);
    RootContainer rootCont = RootContainer.getInstance();
    SecurityProviderUtilities.debug(this.getClass(), "<init(Principal)>", " Root container retrived: "
      + rootCont);
    container = rootCont.getPortalContainer(nameCont);
      }

      OrganizationService service = (OrganizationService) container
        .getComponentInstanceOfType(OrganizationService.class);
View Full Code Here

         {
            onInit(config, portalContainer);
         }
      };
      ServletContext context = config.getServletContext();
      RootContainer rootContainer = RootContainer.getInstance();
      rootContainer.addInitTask(context, task);
      rootContainer.registerPortalContainer(context);
   }
View Full Code Here

  
   public void testInitParams() throws Exception
   {
      URL url = getClass().getResource("../../../../xsd_1_1/test-validation.xml");
      assertNotNull(url);
      RootContainer container = new ContainerBuilder().withRoot(url).build();
      container.getComponentInstanceOfType(TestValidation.class);
   }
View Full Code Here

      System.setProperty("maven.exoplatform.dir", TestContainer.class.getResource("/").getFile());
   }

   public void testComponent() throws Exception
   {
      RootContainer rootContainer = RootContainer.getInstance();
      MockService mservice = (MockService)rootContainer.getComponentInstance("MockService");
      assertTrue(mservice != null);
      assertTrue(mservice.getPlugins().size() == 2);
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.container.RootContainer

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.