Clover coverage report - Code Coverage for tapestry-portlet release 4.0-beta-9
Coverage timestamp: Sat Oct 1 2005 08:41:31 EDT
file stats: LOC: 67   Methods: 3
NCLOC: 33   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
RenderRequestServicerToWebRequestServicerBridge.java - 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.portlet;
 16   
 17    import java.io.IOException;
 18   
 19    import javax.portlet.PortletException;
 20    import javax.portlet.RenderRequest;
 21    import javax.portlet.RenderResponse;
 22   
 23    import org.apache.tapestry.services.WebRequestServicer;
 24   
 25    /**
 26    * Bridges from the <code>tapestry.portlet.RenderRequestServicerPipeline</code> to the standard
 27    * <code>tapestry.request.WebRequestServicerPipeline</code>.
 28    *
 29    * @author Howard M. Lewis Ship
 30    * @since 4.0
 31    */
 32    public class RenderRequestServicerToWebRequestServicerBridge implements RenderRequestServicer
 33    {
 34   
 35    private PortletRequestGlobals _portletRequestGlobals;
 36   
 37    private WebRequestServicer _webRequestServicer;
 38   
 39  2 public void service(RenderRequest request, RenderResponse response) throws IOException,
 40    PortletException
 41    {
 42  2 _portletRequestGlobals.store(request, response);
 43   
 44  2 PortletWebRequest webRequest = new PortletWebRequest(request);
 45  2 PortletWebResponse webResponse = new RenderWebResponse(response);
 46   
 47  2 try
 48    {
 49  2 _webRequestServicer.service(webRequest, webResponse);
 50    }
 51    catch (RuntimeException ex)
 52    {
 53  1 throw new PortletException(ex);
 54    }
 55    }
 56   
 57  2 public void setPortletRequestGlobals(PortletRequestGlobals portletRequestGlobals)
 58    {
 59  2 _portletRequestGlobals = portletRequestGlobals;
 60    }
 61   
 62  2 public void setWebRequestServicer(WebRequestServicer webRequestServicer)
 63    {
 64  2 _webRequestServicer = webRequestServicer;
 65    }
 66   
 67    }