Coverage Report - org.apache.tapestry.services.impl.SetupServletApplicationGlobals
 
Classes in this File Line Coverage Branch Coverage Complexity
SetupServletApplicationGlobals
0%
0/4
0%
0/2
2
 
 1  
 // Copyright 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.impl;
 16  
 
 17  
 import javax.servlet.http.HttpServlet;
 18  
 
 19  
 import org.apache.tapestry.services.ApplicationInitializer;
 20  
 
 21  
 /**
 22  
  * Stores services and configurations into the
 23  
  * {@link org.apache.tapestry.services.ApplicationGlobals tapestry.globals.ApplicationGlobals}
 24  
  * service, which is used to see the
 25  
  * {@link org.apache.tapestry.services.Infrastructure tapestry.infrastructure} service. The mode to
 26  
  * use is normally "servlet", but this can be overriden by setting the
 27  
  * org.apache.tapestry.application-mode initialization parameter. WML applications should use the
 28  
  * mode "wml".
 29  
  * 
 30  
  * @author Howard M. Lewis Ship
 31  
  * @since 4.0
 32  
  */
 33  0
 public class SetupServletApplicationGlobals extends AbstractSetupApplicationGlobals implements
 34  
         ApplicationInitializer
 35  
 {
 36  
     public void initialize(HttpServlet servlet)
 37  
     {
 38  0
         String mode = servlet.getInitParameter("org.apache.tapestry.application-mode");
 39  
 
 40  0
         initialize(mode == null ? "servlet" : mode);
 41  0
     }
 42  
 }