Clover coverage report - Code Coverage for tapestry release 3.1-alpha-1
Coverage timestamp: Mon Feb 21 2005 09:16:14 EST
file stats: LOC: 186   Methods: 0
NCLOC: 27   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
IEngine.java - - - -
coverage
 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;
 16   
 
 17   
 import java.io.IOException;
 18   
 import java.util.Locale;
 19   
 
 20   
 import javax.servlet.ServletException;
 21   
 
 22   
 import org.apache.hivemind.ClassResolver;
 23   
 import org.apache.tapestry.engine.IEngineService;
 24   
 import org.apache.tapestry.engine.IPropertySource;
 25   
 import org.apache.tapestry.engine.IScriptSource;
 26   
 import org.apache.tapestry.engine.ISpecificationSource;
 27   
 import org.apache.tapestry.request.RequestContext;
 28   
 import org.apache.tapestry.spec.IApplicationSpecification;
 29   
 
 30   
 /**
 31   
  * Defines the core, session-persistant object used to run a Tapestry application for a single
 32   
  * client (each client will have its own instance of the engine).
 33   
  * <p>
 34   
  * The engine exists to provide core services to the pages and components that make up the
 35   
  * application. The engine is a delegate to the {@link ApplicationServlet}via the
 36   
  * {@link #service(RequestContext)}method.
 37   
  * <p>
 38   
  * Starting in release 3.1, the engine is kept around only for compatibility (with release
 39   
  * 3.0). It's functions have been moved over into a collection of HiveMind
 40   
  * services (or are in the process of doing so). 
 41   
  * 
 42   
  * @deprecated To be removed in 3.2.
 43   
  * 
 44   
  * @author Howard Lewis Ship
 45   
  */
 46   
 
 47   
 public interface IEngine
 48   
 {
 49   
     /**
 50   
      * Returns the locale for the engine. This locale is used when selecting templates and assets.
 51   
      */
 52   
 
 53   
     public Locale getLocale();
 54   
 
 55   
     /**
 56   
      * Changes the engine's locale. Any subsequently loaded pages will be in the new locale (though
 57   
      * pages already loaded stay in the old locale). Generally, you should render a new page after
 58   
      * changing the locale, to show that the locale has changed.
 59   
      */
 60   
 
 61   
     public void setLocale(Locale value);
 62   
 
 63   
     /**
 64   
      * Gets the named service, or throws an {@link org.apache.tapestry.ApplicationRuntimeException}
 65   
      * if the engine can't provide the named service.
 66   
      * 
 67   
      * @deprecated To be removed in 3.2. Engine service can now be injected.
 68   
      */
 69   
 
 70   
     public IEngineService getService(String name);
 71   
 
 72   
     /**
 73   
      * Returns the application specification that defines the application and its pages.
 74   
      * 
 75   
      * @deprecated To be removed in 3.2.
 76   
      */
 77   
 
 78   
     public IApplicationSpecification getSpecification();
 79   
 
 80   
     /**
 81   
      * Returns the source of all component specifications for the application. The source is shared
 82   
      * between sessions.
 83   
      * 
 84   
      * @see org.apache.tapestry.engine.AbstractEngine#createSpecificationSource(RequestContext)
 85   
      * @deprecated To be removed in 3.2.
 86   
      */
 87   
 
 88   
     public ISpecificationSource getSpecificationSource();
 89   
 
 90   
     /**
 91   
      * Method invoked from the {@link org.apache.tapestry.ApplicationServlet}to perform processing
 92   
      * of the request. In release 3.0, this has become more of a dirty flag, indicating if any state
 93   
      * stored by the engine instance itself has changed.
 94   
      * 
 95   
      * @return true if the state of the engine was, or could have been, changed during processing.
 96   
      */
 97   
 
 98   
     public boolean service(RequestContext context) throws ServletException, IOException;
 99   
 
 100   
     /**
 101   
      * Returns an object that can resolve resources and classes.
 102   
      * 
 103   
      * @deprecated To be removed in 3.2.
 104   
      */
 105   
 
 106   
     public ClassResolver getClassResolver();
 107   
 
 108   
     /**
 109   
      * Returns the visit object, an object that represents the client's visit to the application.
 110   
      * This is where most server-side state is stored (with the exception of persistent page
 111   
      * properties).
 112   
      * <p>
 113   
      * Returns the visit, if it exists, or null if it has not been created.
 114   
      * 
 115   
      * @deprecated To be removed in 3.2.
 116   
      */
 117   
 
 118   
     public Object getVisit();
 119   
 
 120   
     /**
 121   
      * Returns the visit object, creating it if necessary.
 122   
      * 
 123   
      * @deprecated To be removed in 3.2.
 124   
      */
 125   
 
 126   
     public Object getVisit(IRequestCycle cycle);
 127   
 
 128   
     /**
 129   
      * Allows the visit object to be removed; typically done when "shutting down" a user's session
 130   
      * (by setting the visit to null).
 131   
      */
 132   
 
 133   
     public void setVisit(Object value);
 134   
 
 135   
     /**
 136   
      * Returns the globally shared application object. The global object is stored in the servlet
 137   
      * context and shared by all instances of the engine for the same application (within the same
 138   
      * JVM; the global is <em>not</em> shared between nodes in a cluster).
 139   
      * <p>
 140   
      * Returns the global object, if it exists, or null if not defined.
 141   
      * 
 142   
      * @since 2.3
 143   
      * @deprecated To be removed in 3.2.
 144   
      */
 145   
 
 146   
     public Object getGlobal();
 147   
 
 148   
     /**
 149   
      * Returns a source for parsed {@link org.apache.tapestry.IScript}s. The source is shared
 150   
      * between all sessions.
 151   
      * 
 152   
      * @since 1.0.2
 153   
      * @deprecated To be removed in 3.2.
 154   
      */
 155   
 
 156   
     public IScriptSource getScriptSource();
 157   
 
 158   
     /**
 159   
      * Returns a {@link org.apache.tapestry.engine.IPropertySource}that should be used to obtain
 160   
      * configuration data. The returned source represents a search path that includes (at a
 161   
      * minimum):
 162   
      * <ul>
 163   
      * <li>Properties of the {@link org.apache.tapestry.spec.ApplicationSpecification}
 164   
      * <li>Initial Parameters of servlet (configured in the <code>web.xml</code> deployment
 165   
      * descriptor)
 166   
      * <li>Initial Parameter of the servlet context (also configured in <code>web.xml</code>)
 167   
      * <li>System properties (defined with the <code>-D</code> JVM command line parameter)
 168   
      * <li>Hard-coded "factory defaults" (for some properties)
 169   
      * </ul>
 170   
      * 
 171   
      * @since 2.3
 172   
      * @see org.apache.tapestry.engine.AbstractEngine#createPropertySource(RequestContext)
 173   
      * @deprecated To be removed in 3.2.
 174   
      */
 175   
 
 176   
     public IPropertySource getPropertySource();
 177   
 
 178   
     /**
 179   
      * Returns the encoding to be used to generate the servlet responses and accept the servlet
 180   
      * requests.
 181   
      * 
 182   
      * @since 3.0
 183   
      */
 184   
 
 185   
     public String getOutputEncoding();
 186   
 }