Clover coverage report - Code Coverage for tapestry release 4.0-rc-2
Coverage timestamp: Sat Dec 17 2005 09:39:46 PST
file stats: LOC: 42   Methods: 1
NCLOC: 11   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
SetupServletApplicationGlobals.java 100% 100% 100% 100%
coverage
 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    public class SetupServletApplicationGlobals extends AbstractSetupApplicationGlobals implements
 34    ApplicationInitializer
 35    {
 36  39 public void initialize(HttpServlet servlet)
 37    {
 38  39 String mode = servlet.getInitParameter("org.apache.tapestry.application-mode");
 39   
 40  39 initialize(mode == null ? "servlet" : mode);
 41    }
 42    }