2011/08/05 - Jakarta Cactus has been retired.

For more information, please explore the Attic.

Clover coverage report - Cactus 1.8dev for J2EE API 1.3
Coverage timestamp: Sun Mar 26 2006 18:50:18 BRT
file stats: LOC: 97   Methods: 4
NCLOC: 38   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
AbstractHttpServletRequestWrapper23.java 0% 12.5% 25% 14.3%
coverage coverage
 1   
 /* 
 2   
  * ========================================================================
 3   
  * 
 4   
  * Copyright 2004 The Apache Software Foundation.
 5   
  *
 6   
  * Licensed under the Apache License, Version 2.0 (the "License");
 7   
  * you may not use this file except in compliance with the License.
 8   
  * You may obtain a copy of the License at
 9   
  * 
 10   
  *   http://www.apache.org/licenses/LICENSE-2.0
 11   
  * 
 12   
  * Unless required by applicable law or agreed to in writing, software
 13   
  * distributed under the License is distributed on an "AS IS" BASIS,
 14   
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 15   
  * See the License for the specific language governing permissions and
 16   
  * limitations under the License.
 17   
  * 
 18   
  * ========================================================================
 19   
  */
 20   
 package org.apache.cactus.server;
 21   
 
 22   
 import java.io.UnsupportedEncodingException;
 23   
 
 24   
 import java.util.Map;
 25   
 
 26   
 import javax.servlet.http.HttpServletRequest;
 27   
 
 28   
 import org.apache.cactus.ServletURL;
 29   
 
 30   
 /**
 31   
  * Extends {@link AbstractHttpServletRequestWrapper} by adding the new methods 
 32   
  * of the Servlet 2.3 API specifications.
 33   
  *
 34   
  * @see AbstractHttpServletRequestWrapper
 35   
  * @version $Id: AbstractHttpServletRequestWrapper23.java 238993 2004-05-22 16:39:34Z vmassol $
 36   
  */
 37   
 public abstract class AbstractHttpServletRequestWrapper23 
 38   
     extends AbstractHttpServletRequestWrapper
 39   
 {
 40   
     /**
 41   
      * Construct a {@link HttpServletRequest} instance that delegates
 42   
      * it's method calls to the request object passed as parameter and that
 43   
      * uses the URL passed as parameter to simulate a URL from which the 
 44   
      * request would come from.
 45   
      *
 46   
      * @param theRequest the real HTTP request
 47   
      * @param theURL the URL to simulate or <code>null</code> if none
 48   
      */
 49  24
     public AbstractHttpServletRequestWrapper23(HttpServletRequest theRequest, 
 50   
         ServletURL theURL)
 51   
     {
 52  24
         super(theRequest, theURL);
 53   
     }
 54   
 
 55   
     // Unmodified methods --------------------------------------------------
 56   
 
 57   
     /**
 58   
      * @return the URL from the simulated URL or the real URL
 59   
      *         if a simulation URL has not been defined.
 60   
      * @see HttpServletRequest#getRequestURL()
 61   
      */
 62  0
     public StringBuffer getRequestURL()
 63   
     {
 64  0
         StringBuffer result;
 65   
 
 66  0
         if (this.url != null)
 67   
         {
 68  0
             result = new StringBuffer(this.url.getProtocol() + "://"
 69   
                 + getServerName() + ":" + getServerPort()
 70   
                 + getRequestURI());
 71   
         }
 72   
         else
 73   
         {
 74  0
             result = this.request.getRequestURL();
 75   
         }
 76   
 
 77  0
         return result;
 78   
     }
 79   
 
 80   
     /**
 81   
      * @see HttpServletRequest#setCharacterEncoding(String)
 82   
      */
 83  0
     public void setCharacterEncoding(String theEnvironment)
 84   
         throws UnsupportedEncodingException
 85   
     {
 86  0
         this.request.setCharacterEncoding(theEnvironment);
 87   
     }
 88   
 
 89   
     /**
 90   
      * @see HttpServletRequest#getParameterMap()
 91   
      */
 92  0
     public Map getParameterMap()
 93   
     {
 94  0
         return this.request.getParameterMap();
 95   
     }
 96   
 }
 97