Save This Page
Home » tiles-2.0.6-src » org.apache » tiles » context » [javadoc | source]
    1   /*
    2    * $Id: TilesRequestContextWrapper.java 527536 2007-04-11 15:44:51Z 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.context;
   22   
   23   import java.util.Map;
   24   import java.util.Locale;
   25   import java.io.IOException;
   26   
   27   /**
   28    * Delegate for ease of customization.
   29    *
   30    * @since Tiles 2.0
   31    * @version $Rev: 527536 $ $Date: 2007-04-11 17:44:51 +0200 (Wed, 11 Apr 2007) $
   32    */
   33   public class TilesRequestContextWrapper implements TilesRequestContext {
   34   
   35       /**
   36        * The wrapper request context object.
   37        */
   38       private TilesRequestContext context;
   39   
   40   
   41       /**
   42        * Constructor.
   43        *
   44        * @param context The request context to wrap.
   45        */
   46       public TilesRequestContextWrapper(TilesRequestContext context) {
   47           this.context = context;
   48       }
   49   
   50       /** {@inheritDoc} */
   51       public Map<String, String> getHeader() {
   52           return context.getHeader();
   53       }
   54   
   55       /** {@inheritDoc} */
   56       public Map<String, String[]> getHeaderValues() {
   57           return context.getHeaderValues();
   58       }
   59   
   60       /** {@inheritDoc} */
   61       public Map<String, Object> getRequestScope() {
   62           return context.getRequestScope();
   63       }
   64   
   65       /** {@inheritDoc} */
   66       public Map<String, Object> getSessionScope() {
   67           return context.getSessionScope();
   68       }
   69   
   70       /** {@inheritDoc} */
   71       public void dispatch(String path) throws IOException {
   72           context.dispatch(path);
   73       }
   74   
   75       /** {@inheritDoc} */
   76       public void include(String path) throws IOException {
   77           context.include(path);
   78       }
   79   
   80       /** {@inheritDoc} */
   81       public Map<String, String> getParam() {
   82           return context.getParam();
   83       }
   84   
   85       /** {@inheritDoc} */
   86       public Map<String, String[]> getParamValues() {
   87           return context.getParamValues();
   88       }
   89   
   90       /** {@inheritDoc} */
   91       public Locale getRequestLocale() {
   92           return context.getRequestLocale();
   93       }
   94   
   95       /** {@inheritDoc} */
   96       public boolean isUserInRole(String role) {
   97           return context.isUserInRole(role);
   98       }
   99   
  100   
  101       /** {@inheritDoc} */
  102       public Object getResponse() {
  103           return context.getResponse();
  104       }
  105   
  106       /** {@inheritDoc} */
  107       public Object getRequest() {
  108           return context.getRequest();
  109       }
  110   }

Save This Page
Home » tiles-2.0.6-src » org.apache » tiles » context » [javadoc | source]