Package org.gatein.wci

Examples of org.gatein.wci.WebApp


   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);
View Full Code Here


            return false;
         }
         listeners.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

            return false;
         }
         listeners.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

   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

         {
            fail("Cannot get access to the /test-spi-app servlet context");
         }

         //
         WebApp webApp = registry.getWebApp("/test-spi-app");
         NormalCallback cb1 = new NormalCallback(appContext, webApp.getClassLoader());
         Exception ex = new Exception();
         ExceptionCallback cb2 = new ExceptionCallback(appContext, ex, ex);
         Error err = new Error();
         ExceptionCallback cb3 = new ExceptionCallback(appContext, err, err);
         RuntimeException rex = new RuntimeException();
View Full Code Here

         {
            return new FailureResponse(Failure.createAssertionFailure("The newly deployed web application should be /test-spi-war and it is " + key));
         }

         //
         WebApp webApp = registry.getWebApp("/test-spi-app");
         if (webApp == null)
         {
            return new FailureResponse(Failure.createAssertionFailure("The web app /test-spi-app was not found"));
         }
         if (!"/test-spi-app".equals(webApp.getContextPath()))
         {
            return new FailureResponse(Failure.createAssertionFailure("The web app context is not equals to the expected value but has the value " + webApp.getContextPath()));
         }

         //
         return new InvokeGetResponse("/test-spi-server");
      }
View Full Code Here

           {
             return new FailureResponse(Failure.createErrorFailure("Could not find the requested webapp [" + appContext + "] in the list of depoyed webapps."));
           }

           //
           WebApp webApp = registry.getWebApp(appContext);
           if (webApp == null)
           {
              return new FailureResponse(Failure.createAssertionFailure("The web app " + appContext + " was not found"));
           }
           if (!appContext.equals(webApp.getContextPath()))
           {
              return new FailureResponse(Failure.createAssertionFailure("The web app context is not equals to the expected value [" + appContext + "] but has the value " + webApp.getContextPath()));
           }
          
           return null;
     }
View Full Code Here

         {
            fail("Cannot get access to the /test-native-skip-with-gateinservlet-app context");
         }

         //
         WebApp webApp = registry.getWebApp("/test-native-skip-with-gateinservlet-app");
         NormalCallback cb1 = new NormalCallback(appContext, webApp.getClassLoader());
         Exception ex = new Exception();
         ExceptionCallback cb2 = new ExceptionCallback(appContext, ex, ex);
         Error err = new Error();
         ExceptionCallback cb3 = new ExceptionCallback(appContext, err, err);
         RuntimeException rex = new RuntimeException();
View Full Code Here

         {
            return new FailureResponse(Failure.createAssertionFailure("The size of the new web application deployed should be 1, it is " + diff.size() + " instead." +
            "The previous set was " + keys + " and the new set is " + registry.getKeys()));
         }
        
         WebApp webapp = registry.getWebApp("/test-native-skip-with-gateinservlet-app");
         //make sure the test-native-skip-with-gateinservlet-app.war is picked up
         if (webapp== null)
         {
            return new FailureResponse(Failure.createAssertionFailure("The test-native-skip-with-gateinservler-app.war should be seen."));
         }
         if (!webapp.getContextPath().equals("/test-native-skip-with-gateinservlet-app"))
         {
            return new FailureResponse(Failure.createAssertionFailure("The web app context is not equals to the expected value but has the value " + webapp.getContextPath()));
         }
         return new InvokeGetResponse("/test-spi-server");
      }
      else
      {
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

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.