Coverage Report - org.apache.tiles.TilesContainerWrapper
 
Classes in this File Line Coverage Branch Coverage Complexity
TilesContainerWrapper
100%
24/24
100%
2/2
1.143
 
 1  
 /*
 2  
  * $Id: TilesContainerWrapper.java 1044659 2010-12-11 14:16:04Z apetrelli $
 3  
  *
 4  
  * Licensed to the Apache Software Foundation (ASF) under one
 5  
  * or more contributor license agreements.  See the NOTICE file
 6  
  * distributed with this work for additional information
 7  
  * regarding copyright ownership.  The ASF licenses this file
 8  
  * to you under the Apache License, Version 2.0 (the
 9  
  * "License"); you may not use this file except in compliance
 10  
  * with the License.  You may obtain a copy of the License at
 11  
  *
 12  
  * http://www.apache.org/licenses/LICENSE-2.0
 13  
  *
 14  
  * Unless required by applicable law or agreed to in writing,
 15  
  * software distributed under the License is distributed on an
 16  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 17  
  * KIND, either express or implied.  See the License for the
 18  
  * specific language governing permissions and limitations
 19  
  * under the License.
 20  
  */
 21  
 package org.apache.tiles;
 22  
 
 23  
 import java.io.IOException;
 24  
 
 25  
 import org.apache.tiles.request.ApplicationContext;
 26  
 import org.apache.tiles.request.Request;
 27  
 
 28  
 /**
 29  
  * Wraps a Tiles container to allow easy decoration.
 30  
  *
 31  
  * @version $Rev: 1044659 $ $Date: 2010-12-12 01:16:04 +1100 (Sun, 12 Dec 2010) $
 32  
  */
 33  
 public class TilesContainerWrapper implements TilesContainer {
 34  
 
 35  
     /**
 36  
      * The container to wrap.
 37  
      */
 38  
     protected TilesContainer container;
 39  
 
 40  
     /**
 41  
      * Constructor.
 42  
      *
 43  
      * @param container The container to wrap.
 44  
      */
 45  15
     public TilesContainerWrapper(TilesContainer container) {
 46  15
         this.container = container;
 47  15
         if (container == null) {
 48  1
             throw new NullPointerException("The wrapped container must be not null");
 49  
         }
 50  14
     }
 51  
 
 52  
     /**
 53  
      * Returns the wrapped container.
 54  
      *
 55  
      * @return The wrapped container.
 56  
      */
 57  
     public TilesContainer getWrappedContainer() {
 58  1
         return container;
 59  
     }
 60  
 
 61  
     @Override
 62  
     public void endContext(Request request) {
 63  1
         container.endContext(request);
 64  1
     }
 65  
 
 66  
     @Override
 67  
     public Object evaluate(Attribute attribute, Request request) {
 68  1
         return container.evaluate(attribute, request);
 69  
     }
 70  
 
 71  
     @Override
 72  
     public ApplicationContext getApplicationContext() {
 73  1
         return container.getApplicationContext();
 74  
     }
 75  
 
 76  
     @Override
 77  
     public AttributeContext getAttributeContext(Request request) {
 78  1
         return container.getAttributeContext(request);
 79  
     }
 80  
 
 81  
     @Override
 82  
     public Definition getDefinition(String definitionName, Request request) {
 83  1
         return container.getDefinition(definitionName, request);
 84  
     }
 85  
 
 86  
     @Override
 87  
     public boolean isValidDefinition(String definition, Request request) {
 88  1
         return container.isValidDefinition(definition, request);
 89  
     }
 90  
 
 91  
     @Override
 92  
     public void prepare(String preparer, Request request) {
 93  1
         container.prepare(preparer, request);
 94  1
     }
 95  
 
 96  
     @Override
 97  
     public void render(String definition, Request request) {
 98  1
         container.render(definition, request);
 99  1
     }
 100  
 
 101  
     @Override
 102  
     public void render(Definition definition, Request request) {
 103  1
         container.render(definition, request);
 104  1
     }
 105  
 
 106  
     @Override
 107  
     public void render(Attribute attribute, Request request) throws IOException {
 108  1
         container.render(attribute, request);
 109  1
     }
 110  
 
 111  
     @Override
 112  
     public void renderContext(Request request) {
 113  1
         container.renderContext(request);
 114  1
     }
 115  
 
 116  
     @Override
 117  
     public AttributeContext startContext(Request request) {
 118  1
         return container.startContext(request);
 119  
     }
 120  
 }