Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ApplicationContextWrapper |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: ApplicationContextWrapper.java 1306435 2012-03-28 15:39:11Z nlebas $ | |
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.request; | |
22 | ||
23 | import java.util.Collection; | |
24 | import java.util.Locale; | |
25 | import java.util.Map; | |
26 | ||
27 | ||
28 | /** | |
29 | * Delegate for ease of customization. | |
30 | * | |
31 | * @version $Rev: 933750 $ $Date: 2010-04-13 21:16:06 +0200 (Tue, 13 Apr 2010) $ | |
32 | */ | |
33 | public class ApplicationContextWrapper implements ApplicationContext { | |
34 | ||
35 | /** | |
36 | * The original context. | |
37 | */ | |
38 | private ApplicationContext context; | |
39 | ||
40 | /** | |
41 | * Constructor. | |
42 | * | |
43 | * @param context The original context. | |
44 | */ | |
45 | 6 | public ApplicationContextWrapper(ApplicationContext context) { |
46 | 6 | this.context = context; |
47 | 6 | } |
48 | ||
49 | /** | |
50 | * Returns the wrapped application context. | |
51 | * | |
52 | * @return The wrapped application context. | |
53 | */ | |
54 | public ApplicationContext getWrappedApplicationContext() { | |
55 | 1 | return context; |
56 | } | |
57 | ||
58 | /** {@inheritDoc} */ | |
59 | public Map<String, Object> getApplicationScope() { | |
60 | 1 | return context.getApplicationScope(); |
61 | } | |
62 | ||
63 | /** {@inheritDoc} */ | |
64 | public Object getContext() { | |
65 | 1 | return context.getContext(); |
66 | } | |
67 | ||
68 | /** {@inheritDoc} */ | |
69 | public Map<String, String> getInitParams() { | |
70 | 1 | return context.getInitParams(); |
71 | } | |
72 | ||
73 | /** {@inheritDoc} */ | |
74 | public ApplicationResource getResource(String localePath) { | |
75 | 1 | return context.getResource(localePath); |
76 | } | |
77 | ||
78 | /** {@inheritDoc} */ | |
79 | public ApplicationResource getResource(ApplicationResource base, Locale locale) { | |
80 | 1 | return context.getResource(base, locale); |
81 | } | |
82 | ||
83 | /** {@inheritDoc} */ | |
84 | public Collection<ApplicationResource> getResources(String path) { | |
85 | 1 | return context.getResources(path); |
86 | } | |
87 | } |