Package org.gatein.wci

Examples of org.gatein.wci.WebApp


      if (webAppEvent instanceof WebAppLifeCycleEvent)
      {
         WebAppLifeCycleEvent lfEvent = (WebAppLifeCycleEvent)webAppEvent;
         if (lfEvent.getType() == WebAppLifeCycleEvent.ADDED)
         {
            WebApp webApp = webAppEvent.getWebApp();
            ServletContext scontext = webApp.getServletContext();
            try
            {
               final URL url = scontext.getResource("/WEB-INF/gadget.xml");
               if (url != null)
               {
View Full Code Here


   public void onEvent(WebAppEvent event)
   {
      if (event instanceof WebAppLifeCycleEvent)
      {
         WebApp webApp = event.getWebApp();
         WebAppLifeCycleEvent lfEvent = (WebAppLifeCycleEvent)event;
         if (lfEvent.getType() == WebAppLifeCycleEvent.ADDED)
         {
            map.put(webApp.getContextPath(), webApp);
         }
         else
         {
            map.remove(webApp.getContextPath());
         }
      }
   }
View Full Code Here

            return false;
         }
         webAppListeners.add(listener);
         for (Object response : webAppMap.values())
         {
            WebApp webApp = (WebApp)response;
            WebAppLifeCycleEvent event = new WebAppLifeCycleEvent(webApp, WebAppLifeCycleEvent.ADDED);
            safeFireEvent(listener, event);
         }
         return true;
      }
View Full Code Here

   {
      Module module = resource.getModule(moduleName);
      if (module instanceof Module.Local)
      {
         Module.Local localModule = (Module.Local)module;
         final WebApp webApp = contexts.get(localModule.getContextPath());
         if (webApp != null)
         {
            ServletContext sc = webApp.getServletContext();
            return localModule.read(locale, sc, webApp.getClassLoader());
         }
      }
      return null;
   }
View Full Code Here

    }

    public void onEvent(WebAppEvent event) {
        if (event instanceof WebAppLifeCycleEvent) {
            WebAppLifeCycleEvent lifeCycleEvent = (WebAppLifeCycleEvent) event;
            WebApp webApp = event.getWebApp();
            ServletContext context = webApp.getServletContext();

            // if we see the WSRP admin GUI being deployed or undeployed, inject or remove services
            if (WSRP_ADMIN_GUI_CONTEXT_PATH.equals(webApp.getContextPath())) {
                switch (lifeCycleEvent.getType()) {
                    case WebAppLifeCycleEvent.ADDED:
                        context.setAttribute("ConsumerRegistry", consumerRegistry);
                        context.setAttribute("ProducerConfigurationService", producer.getConfigurationService());
                        break;
View Full Code Here

    }

    private Reader getJavascript(Module module, Locale locale) {
        if (module instanceof Module.Local) {
            Module.Local localModule = (Module.Local) module;
            final WebApp webApp = contexts.get(localModule.getContextPath());
            if (webApp != null) {
                ServletContext sc = webApp.getServletContext();
                return localModule.read(locale, sc, webApp.getClassLoader());
            }
        }
        return null;
    }
View Full Code Here

    }

    public void onEvent(WebAppEvent event) {
        if (event instanceof WebAppLifeCycleEvent) {
            WebAppLifeCycleEvent lifeCycleEvent = (WebAppLifeCycleEvent) event;
            WebApp webApp = event.getWebApp();
            ServletContext context = webApp.getServletContext();

            // if we see the WSRP admin GUI being deployed or undeployed, inject or remove services
            if (WSRP_ADMIN_GUI_CONTEXT_PATH.equals(webApp.getContextPath())) {
                switch (lifeCycleEvent.getType()) {
                    case WebAppLifeCycleEvent.ADDED:
                        context.setAttribute("ConsumerRegistry", consumerRegistry);
                        context.setAttribute("ProducerConfigurationService", producer.getConfigurationService());
                        break;
View Full Code Here

      {
         throw new AssertionFailedError("The newly deployed web application should be /deployment-war and it is " + key);
      }

      //
      WebApp webApp = registry.getWebApp("/deploymentnative");
      if (webApp == null)
      {
         throw new AssertionFailedError("The web app /deploymentnative was not found");
      }
      if (!"/deploymentnative".equals(webApp.getContextPath()))
      {
         throw new AssertionFailedError("The web app context is not equals to the expected value but has the value " + webApp.getContextPath());
      }
   }
View Full Code Here

    }

    private Reader getJavascript(Module module, Locale locale) {
        if (module instanceof Module.Local) {
            Module.Local localModule = (Module.Local) module;
            final WebApp webApp = contexts.get(localModule.getContextPath());
            if (webApp != null) {
                ServletContext sc = webApp.getServletContext();
                return localModule.read(locale, sc, webApp.getClassLoader());
            }
        }
        return null;
    }
View Full Code Here

     * @see org.gatein.wci.WebAppListener#onEvent(org.gatein.wci.WebAppEvent)
     */
    public void onEvent(WebAppEvent event) {
        if (event instanceof WebAppLifeCycleEvent) {
            WebAppLifeCycleEvent lifeCycleEvent = (WebAppLifeCycleEvent) event;
            WebApp webApp = null;
            URL url = null;
            switch (lifeCycleEvent.getType()) {
                case WebAppLifeCycleEvent.ADDED:
                    webApp = event.getWebApp();
                    url = getGateinResourcesXml(webApp);
View Full Code Here

TOP

Related Classes of org.gatein.wci.WebApp

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.