Coverage report

  %line %branch
org.apache.jetspeed.engine.servlet.ServletResponseImpl
0% 
0% 

 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to You under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  * 
 9  
  *      http://www.apache.org/licenses/LICENSE-2.0
 10  
  * 
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.apache.jetspeed.engine.servlet;
 18  
 
 19  
 import java.io.IOException;
 20  
 import java.util.Locale;
 21  
 
 22  
 import javax.servlet.http.Cookie;
 23  
 import javax.servlet.http.HttpServletResponse;
 24  
 import javax.servlet.http.HttpServletResponseWrapper;
 25  
 
 26  
 import org.apache.jetspeed.container.PortletDispatcherIncludeAware;
 27  
 
 28  
 /**
 29  
  * Factory implementation for creating HTTP Response Wrappers
 30  
  *
 31  
  * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
 32  
  * @version $Id: ServletResponseImpl.java 516448 2007-03-09 16:25:47Z ate $
 33  
  */
 34  
 public class ServletResponseImpl extends HttpServletResponseWrapper implements PortletDispatcherIncludeAware
 35  
 {
 36  
     private boolean included;
 37  
     
 38  
     public ServletResponseImpl(HttpServletResponse response)
 39  
     {
 40  0
         super(response);
 41  0
     }
 42  
 
 43  
     public void setResponse(HttpServletResponse response) 
 44  
     {
 45  0
         super.setResponse(response);
 46  0
     }   
 47  
 
 48  
     /**
 49  
      * @param included when true, JSR-168 PLT.16.3.3 rules need to be enforced
 50  
      */
 51  
     public void setPortletDispatcherIncluded(boolean included)
 52  
     {
 53  0
         this.included = included;
 54  0
     }
 55  
     
 56  
     /*
 57  
      * JSR-168 PLT.16.3.3 .cxxxviii
 58  
      * @deprecated use encodeRedirectURL instead
 59  
      */
 60  
     public String encodeRedirectUrl(String url)
 61  
     {
 62  0
         return (included ? null : super.encodeRedirectUrl(url));
 63  
     }
 64  
 
 65  
     /*
 66  
      * JSR-168 PLT.16.3.3 .cxxxviii
 67  
      */
 68  
     public String encodeRedirectURL(String url)
 69  
     {
 70  0
         return (included ? null : super.encodeRedirectURL(url));
 71  
     }
 72  
 
 73  
     /*
 74  
      * JSR-168 PLT.16.3.3 .cxl
 75  
      */
 76  
     public void addCookie(Cookie arg0)
 77  
     {
 78  0
         if (!included)
 79  
         {
 80  0
             super.addCookie(arg0);
 81  
         }
 82  0
     }
 83  
 
 84  
     /*
 85  
      * JSR-168 PLT.16.3.3 .cxl
 86  
      */
 87  
     public void addDateHeader(String arg0, long arg1)
 88  
     {
 89  0
         if (!included)
 90  
         {
 91  0
             super.addDateHeader(arg0, arg1);
 92  
         }
 93  0
     }
 94  
 
 95  
     /*
 96  
      * JSR-168 PLT.16.3.3 .cxl
 97  
      */
 98  
     public void addHeader(String arg0, String arg1)
 99  
     {
 100  0
         if (!included)
 101  
         {
 102  0
             super.addHeader(arg0, arg1);
 103  
         }
 104  0
     }
 105  
 
 106  
     /*
 107  
      * JSR-168 PLT.16.3.3 .cxl
 108  
      */
 109  
     public void addIntHeader(String arg0, int arg1)
 110  
     {
 111  0
         if (!included)
 112  
         {
 113  0
             super.addIntHeader(arg0, arg1);
 114  
         }
 115  0
     }
 116  
 
 117  
     /*
 118  
      * JSR-168 PLT.16.3.3 .cxl
 119  
      */
 120  
     public boolean containsHeader(String arg0)
 121  
     {
 122  0
         return (included ? false : super.containsHeader(arg0));
 123  
     }
 124  
 
 125  
     /*
 126  
      * JSR-168 PLT.16.3.3 .cxl
 127  
      */
 128  
     public void sendError(int arg0, String arg1) throws IOException
 129  
     {
 130  0
         if (!included)
 131  
         {
 132  0
             super.sendError(arg0, arg1);
 133  
         }
 134  0
     }
 135  
 
 136  
     /*
 137  
      * JSR-168 PLT.16.3.3 .cxl
 138  
      */
 139  
     public void sendRedirect(String arg0) throws IOException
 140  
     {
 141  0
         if (!included)
 142  
         {
 143  0
             super.sendRedirect(arg0);
 144  
         }
 145  0
     }
 146  
 
 147  
     /*
 148  
      * JSR-168 PLT.16.3.3 .cxl
 149  
      */
 150  
     public void setDateHeader(String arg0, long arg1)
 151  
     {
 152  0
         if (!included)
 153  
         {
 154  0
             super.setDateHeader(arg0, arg1);
 155  
         }
 156  0
     }
 157  
 
 158  
     /*
 159  
      * JSR-168 PLT.16.3.3 .cxl
 160  
      */
 161  
     public void setHeader(String arg0, String arg1)
 162  
     {
 163  0
         if (!included)
 164  
         {
 165  0
             super.setHeader(arg0, arg1);
 166  
         }
 167  0
     }
 168  
 
 169  
     /*
 170  
      * JSR-168 PLT.16.3.3 .cxl
 171  
      */
 172  
     public void setIntHeader(String arg0, int arg1)
 173  
     {
 174  0
         if (!included)
 175  
         {
 176  0
             super.setIntHeader(arg0, arg1);
 177  
         }
 178  0
     }
 179  
 
 180  
     /*
 181  
      * JSR-168 PLT.16.3.3 .cxl
 182  
      */
 183  
     public void setStatus(int arg0, String arg1)
 184  
     {
 185  0
         if (!included)
 186  
         {
 187  0
             super.setStatus(arg0, arg1);
 188  
         }
 189  0
     }
 190  
 
 191  
     /*
 192  
      * JSR-168 PLT.16.3.3 .cxl
 193  
      */
 194  
     public void setStatus(int arg0)
 195  
     {
 196  0
         if (!included)
 197  
         {
 198  0
             super.setStatus(arg0);
 199  
         }
 200  0
     }
 201  
 
 202  
     /*
 203  
      * JSR-168 PLT.16.3.3 .cxl
 204  
      */
 205  
     public void setContentLength(int arg0)
 206  
     {
 207  0
         if (!included)
 208  
         {
 209  0
             super.setContentLength(arg0);
 210  
         }
 211  0
     }
 212  
 
 213  
     /*
 214  
      * JSR-168 PLT.16.3.3 .cxl
 215  
      */
 216  
     public void setContentType(String arg0)
 217  
     {
 218  0
         if (!included)
 219  
         {
 220  0
             super.setContentType(arg0);
 221  
         }
 222  0
     }
 223  
 
 224  
     /*
 225  
      * JSR-168 PLT.16.3.3 .cxl
 226  
      */
 227  
     public void setLocale(Locale arg0)
 228  
     {
 229  0
         if (!included)
 230  
         {
 231  0
             super.setLocale(arg0);
 232  
         }
 233  0
     }
 234  
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.