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: 85   Methods: 8
NCLOC: 48   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
RequestGlobalsImpl.java - 100% 100% 100%
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.services.impl;
 16   
 17    import javax.servlet.http.HttpServletRequest;
 18    import javax.servlet.http.HttpServletResponse;
 19   
 20    import org.apache.tapestry.IRequestCycle;
 21    import org.apache.tapestry.services.RequestGlobals;
 22    import org.apache.tapestry.web.WebRequest;
 23    import org.apache.tapestry.web.WebResponse;
 24   
 25    /**
 26    * Wrapper around {@link org.apache.hivemind.service.ThreadLocalStorage}used to store and retrieve
 27    * Servlet API info.
 28    *
 29    * @author Howard Lewis Ship
 30    * @since 4.0
 31    */
 32    public class RequestGlobalsImpl implements RequestGlobals
 33    {
 34    private WebRequest _webRequest;
 35   
 36    private WebResponse _webResponse;
 37   
 38    private HttpServletRequest _request;
 39   
 40    private HttpServletResponse _response;
 41   
 42    private IRequestCycle _requestCycle;
 43   
 44  1994 public WebRequest getWebRequest()
 45    {
 46  1994 return _webRequest;
 47    }
 48   
 49  359 public WebResponse getWebResponse()
 50    {
 51  359 return _webResponse;
 52    }
 53   
 54  259 public HttpServletRequest getRequest()
 55    {
 56  259 return _request;
 57    }
 58   
 59  136 public HttpServletResponse getResponse()
 60    {
 61  136 return _response;
 62    }
 63   
 64  123 public void store(WebRequest request, WebResponse response)
 65    {
 66  123 _webRequest = request;
 67  123 _webResponse = response;
 68    }
 69   
 70  124 public void store(HttpServletRequest request, HttpServletResponse response)
 71    {
 72  124 _request = request;
 73  124 _response = response;
 74    }
 75   
 76  370 public IRequestCycle getRequestCycle()
 77    {
 78  370 return _requestCycle;
 79    }
 80   
 81  123 public void store(IRequestCycle cycle)
 82    {
 83  123 _requestCycle = cycle;
 84    }
 85    }