01: /*
02: * Copyright 2006 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package javax.faces.application;
18:
19: import java.io.IOException;
20: import java.util.Locale;
21: import javax.faces.FacesException;
22: import javax.faces.component.UIViewRoot;
23: import javax.faces.context.FacesContext;
24:
25: /**
26: * see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
27: *
28: * @author Stan Silvert
29: */
30: public abstract class ViewHandlerWrapper extends ViewHandler {
31:
32: @Override
33: public String calculateCharacterEncoding(FacesContext context) {
34: return getWrapped().calculateCharacterEncoding(context);
35: }
36:
37: @Override
38: public void initView(FacesContext context) throws FacesException {
39: getWrapped().initView(context);
40: }
41:
42: protected abstract ViewHandler getWrapped();
43:
44: public void renderView(FacesContext context, UIViewRoot viewToRender)
45: throws IOException, FacesException {
46: getWrapped().renderView(context, viewToRender);
47: }
48:
49: public void writeState(FacesContext context) throws IOException {
50: getWrapped().writeState(context);
51: }
52:
53: public String calculateRenderKitId(FacesContext context) {
54: return getWrapped().calculateRenderKitId(context);
55: }
56:
57: public Locale calculateLocale(FacesContext context) {
58: return getWrapped().calculateLocale(context);
59: }
60:
61: public UIViewRoot restoreView(FacesContext context, String viewId) {
62: return getWrapped().restoreView(context, viewId);
63: }
64:
65: public String getResourceURL(FacesContext context, String path) {
66: return getWrapped().getResourceURL(context, path);
67: }
68:
69: public String getActionURL(FacesContext context, String viewId) {
70: return getWrapped().getActionURL(context, viewId);
71: }
72:
73: public UIViewRoot createView(FacesContext context, String viewId) {
74: return getWrapped().createView(context, viewId);
75: }
76:
77: }
|