Clover coverage report - Code Coverage for tapestry release 3.1-alpha-1
Coverage timestamp: Mon Feb 21 2005 09:16:14 EST
file stats: LOC: 332   Methods: 47
NCLOC: 238   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
InfrastructureImpl.java - 93.6% 93.6% 93.6%
coverage 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.ServletContext;
 18   
 import javax.servlet.http.HttpServletRequest;
 19   
 import javax.servlet.http.HttpServletResponse;
 20   
 
 21   
 import org.apache.hivemind.ClassResolver;
 22   
 import org.apache.hivemind.Resource;
 23   
 import org.apache.hivemind.util.ContextResource;
 24   
 import org.apache.tapestry.engine.IPageSource;
 25   
 import org.apache.tapestry.engine.IPropertySource;
 26   
 import org.apache.tapestry.engine.IScriptSource;
 27   
 import org.apache.tapestry.engine.ISpecificationSource;
 28   
 import org.apache.tapestry.engine.state.ApplicationStateManager;
 29   
 import org.apache.tapestry.services.ComponentMessagesSource;
 30   
 import org.apache.tapestry.services.ComponentPropertySource;
 31   
 import org.apache.tapestry.services.DataSqueezer;
 32   
 import org.apache.tapestry.services.Infrastructure;
 33   
 import org.apache.tapestry.services.LinkFactory;
 34   
 import org.apache.tapestry.services.ObjectPool;
 35   
 import org.apache.tapestry.services.RequestCycleFactory;
 36   
 import org.apache.tapestry.services.RequestExceptionReporter;
 37   
 import org.apache.tapestry.services.ResetEventCoordinator;
 38   
 import org.apache.tapestry.services.ResponseRenderer;
 39   
 import org.apache.tapestry.services.ServiceMap;
 40   
 import org.apache.tapestry.services.TemplateSource;
 41   
 import org.apache.tapestry.spec.IApplicationSpecification;
 42   
 
 43   
 /**
 44   
  * Allows access to selected HiveMind services.
 45   
  * 
 46   
  * @author Howard Lewis Ship
 47   
  * @since 3.1
 48   
  */
 49   
 public class InfrastructureImpl implements Infrastructure
 50   
 {
 51   
     private IApplicationSpecification _applicationSpecification;
 52   
 
 53   
     private IPropertySource _applicationPropertySource;
 54   
 
 55   
     private IPropertySource _globalPropertySource;
 56   
 
 57   
     private ResetEventCoordinator _resetEventCoordinator;
 58   
 
 59   
     private ComponentMessagesSource _componentMessagesSource;
 60   
 
 61   
     private TemplateSource _templateSource;
 62   
 
 63   
     private ISpecificationSource _specificationSource;
 64   
 
 65   
     private ObjectPool _objectPool;
 66   
 
 67   
     private IPageSource _pageSource;
 68   
 
 69   
     private ClassResolver _classResolver;
 70   
 
 71   
     private DataSqueezer _dataSqueezer;
 72   
 
 73   
     private IScriptSource _scriptSource;
 74   
 
 75   
     private ServiceMap _serviceMap;
 76   
 
 77   
     private RequestExceptionReporter _requestExceptionReporter;
 78   
 
 79   
     private ResponseRenderer _responseRenderer;
 80   
 
 81   
     private LinkFactory _linkFactory;
 82   
 
 83   
     private RequestCycleFactory _requestCycleFactory;
 84   
 
 85   
     private ApplicationStateManager _applicationStateManager;
 86   
 
 87   
     private HttpServletRequest _request;
 88   
 
 89   
     private HttpServletResponse _response;
 90   
 
 91   
     private ServletContext _context;
 92   
 
 93   
     private String _applicationId;
 94   
 
 95   
     private ComponentPropertySource _componentPropertySource;
 96   
 
 97  7
     public IScriptSource getScriptSource()
 98   
     {
 99  7
         return _scriptSource;
 100   
     }
 101   
 
 102  52
     public void setScriptSource(IScriptSource scriptSource)
 103   
     {
 104  52
         _scriptSource = scriptSource;
 105   
     }
 106   
 
 107  52
     public DataSqueezer getDataSqueezer()
 108   
     {
 109  52
         return _dataSqueezer;
 110   
 
 111   
     }
 112   
 
 113  52
     public void setDataSqueezer(DataSqueezer dataSqueezer)
 114   
     {
 115  52
         _dataSqueezer = dataSqueezer;
 116   
     }
 117   
 
 118  52
     public void setApplicationPropertySource(IPropertySource source)
 119   
     {
 120  52
         _applicationPropertySource = source;
 121   
     }
 122   
 
 123  652
     public IPropertySource getApplicationPropertySource()
 124   
     {
 125  652
         return _applicationPropertySource;
 126   
     }
 127   
 
 128  52
     public ComponentMessagesSource getComponentMessagesSource()
 129   
     {
 130  52
         return _componentMessagesSource;
 131   
     }
 132   
 
 133  0
     public ResetEventCoordinator getResetEventCoordinator()
 134   
     {
 135  0
         return _resetEventCoordinator;
 136   
     }
 137   
 
 138  52
     public void setComponentMessagesSource(ComponentMessagesSource source)
 139   
     {
 140  52
         _componentMessagesSource = source;
 141   
     }
 142   
 
 143  52
     public void setResetEventCoordinator(ResetEventCoordinator coordinator)
 144   
     {
 145  52
         _resetEventCoordinator = coordinator;
 146   
     }
 147   
 
 148  52
     public TemplateSource getTemplateSource()
 149   
     {
 150  52
         return _templateSource;
 151   
     }
 152   
 
 153  52
     public void setTemplateSource(TemplateSource source)
 154   
     {
 155  52
         _templateSource = source;
 156   
     }
 157   
 
 158  52
     public ISpecificationSource getSpecificationSource()
 159   
     {
 160  52
         return _specificationSource;
 161   
     }
 162   
 
 163  52
     public void setSpecificationSource(ISpecificationSource source)
 164   
     {
 165  52
         _specificationSource = source;
 166   
     }
 167   
 
 168  0
     public ObjectPool getObjectPool()
 169   
     {
 170  0
         return _objectPool;
 171   
     }
 172   
 
 173  52
     public void setObjectPool(ObjectPool pool)
 174   
     {
 175  52
         _objectPool = pool;
 176   
     }
 177   
 
 178  58
     public IApplicationSpecification getApplicationSpecification()
 179   
     {
 180  58
         return _applicationSpecification;
 181   
     }
 182   
 
 183  52
     public void setApplicationSpecification(IApplicationSpecification specification)
 184   
     {
 185  52
         _applicationSpecification = specification;
 186   
     }
 187   
 
 188  185
     public IPageSource getPageSource()
 189   
     {
 190  185
         return _pageSource;
 191   
     }
 192   
 
 193  52
     public void setPageSource(IPageSource source)
 194   
     {
 195  52
         _pageSource = source;
 196   
     }
 197   
 
 198  52
     public ClassResolver getClassResolver()
 199   
     {
 200  52
         return _classResolver;
 201   
     }
 202   
 
 203  52
     public void setClassResolver(ClassResolver resolver)
 204   
     {
 205  52
         _classResolver = resolver;
 206   
     }
 207   
 
 208  396
     public ServiceMap getServiceMap()
 209   
     {
 210  396
         return _serviceMap;
 211   
     }
 212   
 
 213  52
     public void setServiceMap(ServiceMap serviceMap)
 214   
     {
 215  52
         _serviceMap = serviceMap;
 216   
     }
 217   
 
 218  55
     public RequestExceptionReporter getRequestExceptionReporter()
 219   
     {
 220  55
         return _requestExceptionReporter;
 221   
     }
 222   
 
 223  52
     public void setRequestExceptionReporter(RequestExceptionReporter requestExceptionReporter)
 224   
     {
 225  52
         _requestExceptionReporter = requestExceptionReporter;
 226   
     }
 227   
 
 228  101
     public ResponseRenderer getResponseRenderer()
 229   
     {
 230  101
         return _responseRenderer;
 231   
     }
 232   
 
 233  52
     public void setResponseRenderer(ResponseRenderer responseRenderer)
 234   
     {
 235  52
         _responseRenderer = responseRenderer;
 236   
     }
 237   
 
 238  52
     public LinkFactory getLinkFactory()
 239   
     {
 240  52
         return _linkFactory;
 241   
     }
 242   
 
 243  52
     public void setLinkFactory(LinkFactory linkFactory)
 244   
     {
 245  52
         _linkFactory = linkFactory;
 246   
     }
 247   
 
 248  185
     public RequestCycleFactory getRequestCycleFactory()
 249   
     {
 250  185
         return _requestCycleFactory;
 251   
     }
 252   
 
 253  52
     public void setRequestCycleFactory(RequestCycleFactory requestCycleFactory)
 254   
     {
 255  52
         _requestCycleFactory = requestCycleFactory;
 256   
     }
 257   
 
 258  189
     public ApplicationStateManager getApplicationStateManager()
 259   
     {
 260  189
         return _applicationStateManager;
 261   
     }
 262   
 
 263  52
     public void setApplicationStateManager(ApplicationStateManager applicationStateManager)
 264   
     {
 265  52
         _applicationStateManager = applicationStateManager;
 266   
     }
 267   
 
 268  52
     public HttpServletRequest getRequest()
 269   
     {
 270  52
         return _request;
 271   
     }
 272   
 
 273  52
     public void setRequest(HttpServletRequest request)
 274   
     {
 275  52
         _request = request;
 276   
     }
 277   
 
 278  52
     public HttpServletResponse getResponse()
 279   
     {
 280  52
         return _response;
 281   
     }
 282   
 
 283  52
     public void setResponse(HttpServletResponse response)
 284   
     {
 285  52
         _response = response;
 286   
     }
 287   
 
 288  52
     public String getContextPath()
 289   
     {
 290  52
         return _request.getContextPath();
 291   
     }
 292   
 
 293  52
     public String getApplicationId()
 294   
     {
 295  52
         return _applicationId;
 296   
     }
 297   
 
 298  52
     public void setApplicationId(String applicationId)
 299   
     {
 300  52
         _applicationId = applicationId;
 301   
     }
 302   
 
 303  52
     public void setContext(ServletContext context)
 304   
     {
 305  52
         _context = context;
 306   
     }
 307   
 
 308  52
     public Resource getContextRoot()
 309   
     {
 310  52
         return new ContextResource(_context, "/");
 311   
     }
 312   
 
 313  0
     public IPropertySource getGlobalPropertySource()
 314   
     {
 315  0
         return _globalPropertySource;
 316   
     }
 317   
 
 318  52
     public void setGlobalPropertySource(IPropertySource globalPropertySource)
 319   
     {
 320  52
         _globalPropertySource = globalPropertySource;
 321   
     }
 322   
 
 323  52
     public ComponentPropertySource getComponentPropertySource()
 324   
     {
 325  52
         return _componentPropertySource;
 326   
     }
 327   
 
 328  52
     public void setComponentPropertySource(ComponentPropertySource componentPropertySource)
 329   
     {
 330  52
         _componentPropertySource = componentPropertySource;
 331   
     }
 332   
 }