1/*2 * $Id: TilesApplicationContextWrapper.java 950476 2010-06-02 10:31:43Z apetrelli $3 *4 * Licensed to the Apache Software Foundation (ASF) under one5 * or more contributor license agreements. See the NOTICE file6 * distributed with this work for additional information7 * regarding copyright ownership. The ASF licenses this file8 * to you under the Apache License, Version 2.0 (the9 * "License"); you may not use this file except in compliance10 * with the License. You may obtain a copy of the License at11 *12 * http://www.apache.org/licenses/LICENSE-2.013 *14 * Unless required by applicable law or agreed to in writing,15 * software distributed under the License is distributed on an16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY17 * KIND, either express or implied. See the License for the18 * specific language governing permissions and limitations19 * under the License.20 */21package org.apache.tiles.context;
2223import java.io.IOException;
24import java.net.URL;
25import java.util.Map;
26import java.util.Set;
2728import org.apache.tiles.TilesApplicationContext;
2930/***31 * Delegate for ease of customization.32 *33 * @since Tiles 2.1.134 * @version $Rev: 950476 $ $Date: 2010-06-02 12:31:43 +0200 (mer, 02 giu 2010) $35 */36publicclassTilesApplicationContextWrapper implements TilesApplicationContext {
3738/***39 * The original context.40 */41private TilesApplicationContext context;
4243/***44 * Constructor.45 *46 * @param context The original context.47 */48publicTilesApplicationContextWrapper(TilesApplicationContext context) {
49this.context = context;
50 }
5152/***53 * Returns the wrapped application context.54 *55 * @return The wrapped application context.56 */57public TilesApplicationContext getWrappedApplicationContext() {
58return context;
59 }
6061/*** {@inheritDoc} */62public Map<String, Object> getApplicationScope() {
63return context.getApplicationScope();
64 }
6566/*** {@inheritDoc} */67public Object getContext() {
68return context.getContext();
69 }
7071/*** {@inheritDoc} */72public Map<String, String> getInitParams() {
73return context.getInitParams();
74 }
7576/*** {@inheritDoc} */77public URL getResource(String path) throws IOException {
78return context.getResource(path);
79 }
8081/*** {@inheritDoc} */82public Set<URL> getResources(String path) throws IOException {
83return context.getResources(path);
84 }
85 }