Coverage Report - org.apache.tapestry.services.impl.DefaultResponseContributorImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
DefaultResponseContributorImpl
0%
0/11
N/A
1
 
 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  
 package org.apache.tapestry.services.impl;
 15  
 
 16  
 import org.apache.tapestry.IRequestCycle;
 17  
 import org.apache.tapestry.asset.AssetFactory;
 18  
 import org.apache.tapestry.markup.MarkupWriterSource;
 19  
 import org.apache.tapestry.services.RequestLocaleManager;
 20  
 import org.apache.tapestry.services.ResponseBuilder;
 21  
 import org.apache.tapestry.services.ResponseContributor;
 22  
 import org.apache.tapestry.web.WebResponse;
 23  
 
 24  
 import java.io.IOException;
 25  
 
 26  
 /**
 27  
  * Factory that is used if no other has been chosen, handles normal html
 28  
  * responses.
 29  
  * 
 30  
  * TODO: Should probably implement this as a hivemind pipeline.
 31  
  * 
 32  
  * @author jkuhnert
 33  
  */
 34  0
 public class DefaultResponseContributorImpl implements ResponseContributor
 35  
 {
 36  
     protected RequestLocaleManager _localeManager;
 37  
     
 38  
     protected MarkupWriterSource _markupWriterSource;
 39  
 
 40  
     protected WebResponse _webResponse;
 41  
     
 42  
     protected AssetFactory _assetFactory;
 43  
     
 44  
     /**
 45  
      * {@inheritDoc}
 46  
      */
 47  
     public ResponseBuilder createBuilder(IRequestCycle cycle)
 48  
     throws IOException
 49  
     {
 50  0
         return new DefaultResponseBuilder(cycle, _localeManager, _markupWriterSource,
 51  
                 _webResponse, _assetFactory, _webResponse.getNamespace());
 52  
     }
 53  
     
 54  
     /**
 55  
      * {@inheritDoc}
 56  
      */
 57  
     public boolean handlesResponse(IRequestCycle cycle)
 58  
     {
 59  0
         return true;
 60  
     }
 61  
     
 62  
     public void setLocaleManager(RequestLocaleManager localeManager)
 63  
     {
 64  0
         _localeManager = localeManager;
 65  0
     }
 66  
     
 67  
     public void setMarkupWriterSource(MarkupWriterSource markupWriterSource)
 68  
     {
 69  0
         _markupWriterSource = markupWriterSource;
 70  0
     }
 71  
     
 72  
     public void setWebResponse(WebResponse webResponse)
 73  
     {
 74  0
         _webResponse = webResponse;
 75  0
     }
 76  
     
 77  
     public void setAssetFactory(AssetFactory factory)
 78  
     {
 79  0
         _assetFactory = factory;
 80  0
     }
 81  
 }