Package org.exoplatform.web

Examples of org.exoplatform.web.WebAppController


      final ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
      boolean hasChanged = false;
      try
      {
         ServletConfig config = new PortalServletConfig(sConfig, portalContainer);
         WebAppController controller =
            (WebAppController)portalContainer.getComponentInstanceOfType(WebAppController.class);
         // Set the full classloader of the portal container
         Thread.currentThread().setContextClassLoader(portalContainer.getPortalClassLoader());
         hasChanged = true;
         PortalApplication application = new PortalApplication(config);
         application.onInit();
         controller.addApplication(application);
         controller.register(new PortalRequestHandler());
         log.info("The WebAppController has been successfully initialized for the portal '" + portalContainer.getName()
            + "'");
      }
      catch (Throwable t)
      {
View Full Code Here


   protected void onService(ExoContainer container, HttpServletRequest req, HttpServletResponse res)
      throws ServletException, IOException
   {
      try
      {
         WebAppController controller = (WebAppController)container.getComponentInstanceOfType(WebAppController.class);
         controller.service(req, res);
      }
      catch (Throwable t)
      {
         throw new ServletException(t);
      }
View Full Code Here

               uiApp.addMessage(new ApplicationMessage("UIGadgetManagement.msg.deleteGadgetInUse", null));
               return;
            }
         }
         service.removeGadget(name);
         WebAppController webController = uiManagement.getApplicationComponent(WebAppController.class);
         webController.removeApplication(GadgetApplication.EXO_GADGET_GROUP + "/" + name);
         Gadget gadget = uiManagement.getGadget(name);
         if (gadget.isLocal())
         {
            // get dir path of gadget
            String gadgetUrl = gadget.getUrl();
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) {
            if (appProvider != null) {
                // We are only expecting one
                application = appProvider.createApplication(getPortletConfig());
            } else {
                application = new PortletApplication(getPortletConfig());
            }
            application.onInit();
            application = controller.addApplication(application);
        }
        return application;
    }
View Full Code Here

        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);
                // TODO: figure out what is happening with the controller not existing during shutdown
                if (controller != null) {
                    PortletApplication application = controller.getApplication(applicationId_);
                    if (application != null) {
                        application.onDestroy();
                        controller.removeApplication(applicationId_);
                    }
                }

                PortletConfigRegistry registry = (PortletConfigRegistry) container
                        .getComponentInstanceOfType(PortletConfigRegistry.class);
View Full Code Here

    * 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();
         controller.addApplication(application);
      }
      return application;
   }
View Full Code Here

      try
      {
         for (ExoContainer container : containers)
         {
            ExoContainerContext.setCurrentContainer(container);
            WebAppController controller =
               (WebAppController)container.getComponentInstanceOfType(WebAppController.class);
            //TODO: figure out what is happening with the controller not existing during shutdown
            if (controller != null)
            {
               PortletApplication application = controller.getApplication(applicationId_);
               if (application != null)
               {
                  application.onDestroy();
                  controller.removeApplication(applicationId_);
               }
            }
         }
      }
      catch (Exception ex)
View Full Code Here

        // Keep the old ClassLoader
        final ClassLoader currentClassLoader = Thread.currentThread().getContextClassLoader();
        boolean hasChanged = false;
        try {
            ServletConfig config = new PortalServletConfig(sConfig, portalContainer);
            WebAppController controller = (WebAppController) portalContainer.getComponentInstanceOfType(WebAppController.class);
            // Set the full classloader of the portal container
            Thread.currentThread().setContextClassLoader(portalContainer.getPortalClassLoader());
            hasChanged = true;

            controller.onHandlersInit(config);
            log.info("The WebAppController has been successfully initialized for the portal '" + portalContainer.getName()
                    + "'");
        } catch (Throwable t) {
            log.error("The WebAppController could not be initialized for the portal '" + portalContainer.getName() + "'", t);
        } finally {
View Full Code Here

     */
    @Override
    protected void onService(ExoContainer container, HttpServletRequest req, HttpServletResponse res) throws ServletException,
            IOException {
        try {
            WebAppController controller = (WebAppController) container.getComponentInstanceOfType(WebAppController.class);
            controller.service(req, res);
        } catch (Throwable t) {
            throw new ServletException(t);
        }
    }
View Full Code Here

                    uiApp.addMessage(new ApplicationMessage("UIGadgetManagement.msg.deleteGadgetInUse", null));
                    return;
                }
            }
            service.removeGadget(name);
            WebAppController webController = uiManagement.getApplicationComponent(WebAppController.class);
            webController.removeApplication(EXO_GADGET_GROUP + "/" + name);
            Gadget gadget = uiManagement.getGadget(name);
            if (gadget.isLocal()) {
                // get dir path of gadget
                String gadgetUrl = gadget.getUrl();
                String[] gaggetUrlPart = gadgetUrl.split("/");
View Full Code Here

TOP

Related Classes of org.exoplatform.web.WebAppController

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.