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 javax.faces.component.UIViewRoot;
21: import javax.faces.context.FacesContext;
22:
23: /**
24: * see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
25: *
26: * @author Stan Silvert
27: */
28: public abstract class StateManagerWrapper extends StateManager {
29:
30: protected abstract StateManager getWrapped();
31:
32: public StateManager.SerializedView saveSerializedView(
33: FacesContext context) {
34: return getWrapped().saveSerializedView(context);
35: }
36:
37: public Object saveView(FacesContext context) {
38: return getWrapped().saveView(context);
39: }
40:
41: public boolean isSavingStateInClient(FacesContext context) {
42: return getWrapped().isSavingStateInClient(context);
43: }
44:
45: protected Object getTreeStructureToSave(FacesContext context) {
46: return getWrapped().getTreeStructureToSave(context);
47: }
48:
49: protected Object getComponentStateToSave(FacesContext context) {
50: return getWrapped().getComponentStateToSave(context);
51: }
52:
53: public void writeState(FacesContext context,
54: StateManager.SerializedView state) throws IOException {
55: getWrapped().writeState(context, state);
56: }
57:
58: public void writeState(FacesContext context, Object state)
59: throws IOException {
60: getWrapped().writeState(context, state);
61: }
62:
63: public UIViewRoot restoreView(FacesContext context, String viewId,
64: String renderKitId) {
65: return getWrapped().restoreView(context, viewId, renderKitId);
66: }
67:
68: protected UIViewRoot restoreTreeStructure(FacesContext context,
69: String viewId, String renderKitId) {
70: return getWrapped().restoreTreeStructure(context, viewId,
71: renderKitId);
72: }
73:
74: protected void restoreComponentState(FacesContext context,
75: UIViewRoot viewRoot, String renderKitId) {
76: getWrapped().restoreComponentState(context, viewRoot,
77: renderKitId);
78: }
79:
80: }
|