Package org.exoplatform.container

Examples of org.exoplatform.container.ExoContainer


    public void onInit(Application app) {
    }

    @SuppressWarnings("unused")
    public void onStartRequest(Application app, WebuiRequestContext rcontext) throws Exception {
        ExoContainer pcontainer = ExoContainerContext.getCurrentContainer();
        SessionContainer.setInstance(((SessionManagerContainer) pcontainer).getSessionManager().getSessionContainer(
                rcontext.getSessionId()));
    }
View Full Code Here


    @SuppressWarnings("unused")
    public void onStartRequest(final Application app, final WebuiRequestContext context) throws Exception {
        String user = context.getRemoteUser();
        UserProfile userProfile = null;
        if (user != null) {
            ExoContainer exoContainer = app.getApplicationServiceContainer();
            if (exoContainer != null) {
                OrganizationService organizationService = (OrganizationService) exoContainer
                        .getComponentInstanceOfType(OrganizationService.class);
                userProfile = organizationService.getUserProfileHandler().findUserProfileByName(user);
            }

            if (userProfile == null) {
View Full Code Here

   /**
    * @return actual ExoContainer instance.
    */
   protected ExoContainer getContainer() throws Exception
   {
      ExoContainer container = ExoContainerContext.getCurrentContainer();
      if (container instanceof RootContainer)
      {
         container = RootContainer.getInstance().getPortalContainer(portalContainerName);
         if (container == null)
         {
View Full Code Here

        PortletContext pcontext = config.getPortletContext();
        String contextName = pcontext.getPortletContextName();
        applicationId_ = contextName + "/" + config.getPortletName();

        // Dirty fix for GTNPORTAL-2700
        ExoContainer container = ExoContainerContext.getCurrentContainer();
        PortletConfigRegistry registry = (PortletConfigRegistry) container
                .getComponentInstanceOfType(PortletConfigRegistry.class);
        registry.putPortletConfig(config.getPortletName(), config);
    }
View Full Code Here

     * try to obtain the PortletApplication from the WebAppController.
     *
     * If it does not exist a new PortletApplication object is created, init and cached in the controller
     */
    private PortletApplication getPortletApplication() throws Exception {
        ExoContainer container = ExoContainerContext.getCurrentContainer();
        WebAppController controller = (WebAppController) container.getComponentInstanceOfType(WebAppController.class);
        PortletApplication application = controller.getApplication(applicationId_);
        if (application == null) {
            if (appProvider != null) {
                // We are only expecting one
                application = appProvider.createApplication(getPortletConfig());
View Full Code Here

     * When the portlet is destroyed by the portlet container, the onDestroy() method of the PortletApplication is called and
     * then the PortletApplication is removed from the cache inside th WebController
     */
    @SuppressWarnings("unchecked")
    public void destroy() {
        ExoContainer rootContainer = ExoContainerContext.getTopContainer();
        List<ExoContainer> containers = rootContainer.getComponentInstancesOfType(ExoContainer.class);
        containers.add(rootContainer);
        try {
            for (ExoContainer container : containers) {
                ExoContainerContext.setCurrentContainer(container);
                WebAppController controller = (WebAppController) container.getComponentInstanceOfType(WebAppController.class);
View Full Code Here

    * If it does not exist a new PortletApplication object is created, init and cached in the
    * controller
    */
   private PortletApplication getPortletApplication() throws Exception
   {
      ExoContainer container = ExoContainerContext.getCurrentContainer();
      WebAppController controller = (WebAppController)container.getComponentInstanceOfType(WebAppController.class);
      PortletApplication application = controller.getApplication(applicationId_);
      if (application == null)
      {
         application = new PortletApplication(getPortletConfig());
         application.onInit();
View Full Code Here

    * inside th WebController
    */
   @SuppressWarnings("unchecked")
   public void destroy()
   {
      ExoContainer rootContainer = ExoContainerContext.getTopContainer();
      List<ExoContainer> containers = rootContainer.getComponentInstancesOfType(ExoContainer.class);
      containers.add(rootContainer);
      try
      {
         for (ExoContainer container : containers)
         {
View Full Code Here

   private static JmxRegistrationManager getJmxRegistrationManager(Cache<?, ?> parentCache,
      String cacheName)
   {
      try
      {
         ExoContainer container = ExoContainerContext.getCurrentContainer();
         ObjectName containerObjectName = container.getScopingObjectName();
         final String objectNameBase =
            (containerObjectName != null ? containerObjectName.toString() + "," : "exo:") + "cache-name=" + cacheName;
         return new JmxRegistrationManager(container.getMBeanServer(), parentCache, objectNameBase)
         {
            public String getObjectName(String resourceName)
            {
               return objectNameBase + JMX_RESOURCE_KEY + resourceName;
            }
View Full Code Here

      if (pReplaceChar != null)
      {
         _replaceChar = pReplaceChar.getValue().charAt(0);
      }

      ExoContainer container = context.getContainer();
      if (container instanceof PortalContainer)
      {
         _portalContainer = ((PortalContainer)container);
      }
View Full Code Here

TOP

Related Classes of org.exoplatform.container.ExoContainer

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.