View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  
20  package javax.faces.application;
21  
22  import java.io.IOException;
23  import javax.faces.component.UIViewRoot;
24  import javax.faces.context.FacesContext;
25  
26  /**
27   * see Javadoc of <a href="http://java.sun.com/j2ee/javaserverfaces/1.2/docs/api/index.html">JSF Specification</a>
28   *
29   * @author Stan Silvert
30   */
31  public abstract class StateManagerWrapper extends StateManager {
32      
33      protected abstract StateManager getWrapped();
34      
35      public StateManager.SerializedView saveSerializedView(FacesContext context) {
36          return getWrapped().saveSerializedView(context);
37      }
38      
39      public Object saveView(FacesContext context) {
40          return getWrapped().saveView(context);
41      }
42  
43      public boolean isSavingStateInClient(FacesContext context) {
44          return getWrapped().isSavingStateInClient(context);
45      }
46  
47      protected Object getTreeStructureToSave(FacesContext context) {
48          return getWrapped().getTreeStructureToSave(context);
49      }
50  
51      protected Object getComponentStateToSave(FacesContext context) {
52          return getWrapped().getComponentStateToSave(context);
53      }
54  
55      public void writeState(FacesContext context, StateManager.SerializedView state) throws IOException {
56          getWrapped().writeState(context, state);
57      }
58      
59      public void writeState(FacesContext context, Object state) throws IOException {
60          getWrapped().writeState(context, state);
61      }
62  
63      public UIViewRoot restoreView(FacesContext context, String viewId, String renderKitId) {
64          return getWrapped().restoreView(context, viewId, renderKitId);
65      }
66  
67      protected UIViewRoot restoreTreeStructure(FacesContext context, String viewId, String renderKitId) {
68          return getWrapped().restoreTreeStructure(context, viewId, renderKitId);
69      }
70  
71      protected void restoreComponentState(FacesContext context, UIViewRoot viewRoot, String renderKitId) {
72          getWrapped().restoreComponentState(context, viewRoot, renderKitId);
73      }
74      
75  }