Coverage Report - org.apache.tapestry.portlet.ActionRequestServicerToWebRequestServicerBridge
 
Classes in this File Line Coverage Branch Coverage Complexity
ActionRequestServicerToWebRequestServicerBridge
0%
0/13
N/A
1.667
 
 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.ActionRequest;
 20  
 import javax.portlet.ActionResponse;
 21  
 import javax.portlet.PortletException;
 22  
 
 23  
 import org.apache.tapestry.services.WebRequestServicer;
 24  
 
 25  
 /**
 26  
  * Bridges from the <code>tapestry.portlet.ActionRequestServicerPipeline</code> to the standard
 27  
  * <code>tapestry.request.WebRequestServicerPipeline</code>.
 28  
  * 
 29  
  * @author Howard M. Lewis Ship
 30  
  * @since 4.0
 31  
  */
 32  0
 public class ActionRequestServicerToWebRequestServicerBridge implements ActionRequestServicer
 33  
 {
 34  
     private PortletRequestGlobals _portletRequestGlobals;
 35  
 
 36  
     private WebRequestServicer _webRequestServicer;
 37  
 
 38  
     public void service(ActionRequest request, ActionResponse response) throws IOException,
 39  
             PortletException
 40  
     {
 41  0
         _portletRequestGlobals.store(request, response);
 42  
 
 43  0
         PortletWebRequest webRequest = new PortletWebRequest(request);
 44  0
         PortletWebResponse webResponse = new PortletWebResponse(response);
 45  
 
 46  
         try
 47  
         {
 48  0
             _webRequestServicer.service(webRequest, webResponse);
 49  
         }
 50  0
         catch (RuntimeException ex)
 51  
         {
 52  0
             throw new PortletException(ex);
 53  0
         }
 54  0
     }
 55  
 
 56  
     public void setPortletRequestGlobals(PortletRequestGlobals portletRequestGlobals)
 57  
     {
 58  0
         _portletRequestGlobals = portletRequestGlobals;
 59  0
     }
 60  
 
 61  
     public void setWebRequestServicer(WebRequestServicer webRequestServicer)
 62  
     {
 63  0
         _webRequestServicer = webRequestServicer;
 64  0
     }
 65  
 }