Coverage Report - org.apache.tapestry.services.ApplicationGlobals
 
Classes in this File Line Coverage Branch Coverage Complexity
ApplicationGlobals
N/A
N/A
1
 
 1  
 // Copyright 2004, 2005 The Apache Software Foundation
 2  
 //
 3  
 // Licensed under the Apache License, Version 2.0 (the "License");
 4  
 // you may not use this file except in compliance with the License.
 5  
 // You may obtain a copy of the License at
 6  
 //
 7  
 //     http://www.apache.org/licenses/LICENSE-2.0
 8  
 //
 9  
 // Unless required by applicable law or agreed to in writing, software
 10  
 // distributed under the License is distributed on an "AS IS" BASIS,
 11  
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12  
 // See the License for the specific language governing permissions and
 13  
 // limitations under the License.
 14  
 
 15  
 package org.apache.tapestry.services;
 16  
 
 17  
 import java.util.List;
 18  
 
 19  
 import javax.servlet.ServletContext;
 20  
 
 21  
 import org.apache.tapestry.spec.IApplicationSpecification;
 22  
 import org.apache.tapestry.web.WebActivator;
 23  
 import org.apache.tapestry.web.WebContext;
 24  
 
 25  
 /**
 26  
  * A "global" holder for various services and configurations. In many cases, these values end up as
 27  
  * properties of the {@link org.apache.tapestry.services.Infrastructure} . The servlet and portlet
 28  
  * implementations differentiate themselves by storing different values into these properties.
 29  
  * 
 30  
  * @author Howard Lewis Ship
 31  
  * @since 4.0
 32  
  */
 33  
 public interface ApplicationGlobals
 34  
 {
 35  
     /**
 36  
      * Invoked by the (indirectly) by the servlet at init(), after parsing the application
 37  
      * specification.
 38  
      */
 39  
     void storeActivator(WebActivator activator);
 40  
 
 41  
     void storeSpecification(IApplicationSpecification applicationSpecification);
 42  
 
 43  
     /**
 44  
      * Invoked (indirectly) by the servlet at init().
 45  
      */
 46  
     void storeServletContext(ServletContext context);
 47  
 
 48  
     /**
 49  
      * Invoked (indirectly) by the servlet at init().
 50  
      */
 51  
 
 52  
     void storeWebContext(WebContext context);
 53  
 
 54  
     /**
 55  
      * Returns the previously stored context.
 56  
      * 
 57  
      * @see #storeWebContext(WebContext) .
 58  
      */
 59  
 
 60  
     WebContext getWebContext();
 61  
 
 62  
     /**
 63  
      * Returns the previously stored context.
 64  
      * 
 65  
      * @see #storeServletContext(ServletContext)
 66  
      */
 67  
     ServletContext getServletContext();
 68  
 
 69  
     WebActivator getActivator();
 70  
 
 71  
     IApplicationSpecification getSpecification();
 72  
 
 73  
     String getActivatorName();
 74  
 
 75  
     /**
 76  
      * Stores the default set of engine service definitions. Application services override factory
 77  
      * services with the same {@link org.apache.tapestry.engine.IEngineService#getName()} .
 78  
      * 
 79  
      * @param factoryServices
 80  
      *            List of {@link org.apache.tapestry.engine.IEngineService}.
 81  
      */
 82  
 
 83  
     void storeFactoryServices(List factoryServices);
 84  
 
 85  
     /**
 86  
      * Returns the factory default services as a List of
 87  
      * {@link org.apache.tapestry.engine.IEngineService}.
 88  
      */
 89  
 
 90  
     List getFactoryServices();
 91  
 }