Class StateManagerWrapper
- All Implemented Interfaces:
FacesWrapper<StateManager>
Provides a simple implementation of StateManager that can
be subclassed by developers wishing to provide specialized behavior
to an existing StateManager instance. The default
implementation of all methods is to call through to the wrapped
StateManager.
Usage: extend this class and override getWrapped() to
return the instance we are wrapping.
- Since:
- 1.2
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.faces.application.StateManager
StateManager.SerializedView -
Field Summary
Fields inherited from class javax.faces.application.StateManager
FULL_STATE_SAVING_VIEW_IDS_PARAM_NAME, IS_BUILDING_INITIAL_STATE, IS_SAVING_STATE, PARTIAL_STATE_SAVING_PARAM_NAME, SERIALIZE_SERVER_STATE_PARAM_NAME, STATE_SAVING_METHOD_CLIENT, STATE_SAVING_METHOD_PARAM_NAME, STATE_SAVING_METHOD_SERVER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectgetComponentStateToSave(FacesContext context) The default behavior of this method is to callStateManager.getComponentStateToSave(javax.faces.context.FacesContext)on the wrappedStateManagerobject.protected ObjectgetTreeStructureToSave(FacesContext context) The default behavior of this method is to callStateManager.getTreeStructureToSave(javax.faces.context.FacesContext)on the wrappedStateManagerobject.getViewState(FacesContext context) The default behavior of this method is to callStateManager.getViewState(javax.faces.context.FacesContext)on the wrappedStateManagerobject.abstract StateManagerA class that implements this interface uses this method to return an instance of the class being wrapped.booleanisSavingStateInClient(FacesContext context) The default behavior of this method is to callStateManager.isSavingStateInClient(javax.faces.context.FacesContext)on the wrappedStateManagerobject.protected voidrestoreComponentState(FacesContext context, UIViewRoot viewRoot, String renderKitId) The default behavior of this method is to callStateManager.restoreComponentState(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot, String)on the wrappedStateManagerobject.protected UIViewRootrestoreTreeStructure(FacesContext context, String viewId, String renderKitId) The default behavior of this method is to callStateManager.restoreTreeStructure(javax.faces.context.FacesContext, String, String)on the wrappedStateManagerobject.restoreView(FacesContext context, String viewId, String renderKitId) The default behavior of this method is to callStateManager.restoreView(javax.faces.context.FacesContext, String, String)on the wrappedStateManagerobject.saveSerializedView(FacesContext context) The default behavior of this method is to callStateManager.saveSerializedView(javax.faces.context.FacesContext)on the wrappedStateManagerobject.saveView(FacesContext context) The default behavior of this method is to callStateManager.saveView(javax.faces.context.FacesContext)on the wrappedStateManagerobject.voidwriteState(FacesContext context, Object state) The default behavior of this method is to callStateManager.writeState(javax.faces.context.FacesContext, java.lang.Object)on the wrappedStateManagerobject.voidwriteState(FacesContext context, StateManager.SerializedView state) The default behavior of this method is to callStateManager.writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView)on the wrappedStateManagerobject.
-
Constructor Details
-
StateManagerWrapper
public StateManagerWrapper()
-
-
Method Details
-
getWrapped
Description copied from interface:FacesWrapperA class that implements this interface uses this method to return an instance of the class being wrapped.
- Specified by:
getWrappedin interfaceFacesWrapper<StateManager>- Returns:
- the instance that we are wrapping.
-
saveSerializedView
The default behavior of this method is to call
StateManager.saveSerializedView(javax.faces.context.FacesContext)on the wrappedStateManagerobject.- Overrides:
saveSerializedViewin classStateManager- Parameters:
context-FacesContextfor the current request- Since:
- 1.2
- See Also:
-
saveView
The default behavior of this method is to call
StateManager.saveView(javax.faces.context.FacesContext)on the wrappedStateManagerobject.- Overrides:
saveViewin classStateManager- Parameters:
context-FacesContextfor the current request- Since:
- 1.2
- See Also:
-
getTreeStructureToSave
The default behavior of this method is to call
StateManager.getTreeStructureToSave(javax.faces.context.FacesContext)on the wrappedStateManagerobject.- Overrides:
getTreeStructureToSavein classStateManager- Parameters:
context-FacesContextfor the current request- Since:
- 1.2
- See Also:
-
getComponentStateToSave
The default behavior of this method is to call
StateManager.getComponentStateToSave(javax.faces.context.FacesContext)on the wrappedStateManagerobject.- Overrides:
getComponentStateToSavein classStateManager- Parameters:
context-FacesContextfor the current request- Since:
- 1.2
- See Also:
-
writeState
The default behavior of this method is to call
StateManager.writeState(javax.faces.context.FacesContext, java.lang.Object)on the wrappedStateManagerobject.- Overrides:
writeStatein classStateManager- Parameters:
context-FacesContextfor the current requeststate- the Serializable state to be written, as returned byStateManager.saveSerializedView(javax.faces.context.FacesContext)- Throws:
IOException- Since:
- 1.2
- See Also:
-
writeState
The default behavior of this method is to call
StateManager.writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView)on the wrappedStateManagerobject.- Overrides:
writeStatein classStateManager- Parameters:
context-FacesContextfor the current requeststate- the serialized state to be written- Throws:
IOException- Since:
- 1.2
- See Also:
-
restoreView
The default behavior of this method is to call
StateManager.restoreView(javax.faces.context.FacesContext, String, String)on the wrappedStateManagerobject.- Specified by:
restoreViewin classStateManager- Parameters:
context-FacesContextfor the current requestviewId- View identifier of the view to be restoredrenderKitId- the renderKitId used to render this response. Must not benull.- Since:
- 1.2
- See Also:
-
restoreTreeStructure
The default behavior of this method is to call
StateManager.restoreTreeStructure(javax.faces.context.FacesContext, String, String)on the wrappedStateManagerobject.- Overrides:
restoreTreeStructurein classStateManager- Parameters:
context-FacesContextfor the current requestviewId- View identifier of the view to be restoredrenderKitId- the renderKitId used to render this response. Must not benull.- Since:
- 1.2
- See Also:
-
restoreComponentState
The default behavior of this method is to call
StateManager.restoreComponentState(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot, String)on the wrappedStateManagerobject.- Overrides:
restoreComponentStatein classStateManager- Parameters:
context-FacesContextfor the current requestviewRoot-UIViewRootreturned by a previous call torestoreTreeStructure()renderKitId- the renderKitId used to render this response. Must not benull.- Since:
- 1.2
- See Also:
-
isSavingStateInClient
The default behavior of this method is to call
StateManager.isSavingStateInClient(javax.faces.context.FacesContext)on the wrappedStateManagerobject.- Overrides:
isSavingStateInClientin classStateManager- Returns:
trueif and only if the value of theServletContextinit parameter named by the value of the constantStateManager.STATE_SAVING_METHOD_PARAM_NAMEis equal to the value of the constantStateManager.STATE_SAVING_METHOD_CLIENT.falseotherwise.- Since:
- 1.2
- See Also:
-
getViewState
The default behavior of this method is to call
StateManager.getViewState(javax.faces.context.FacesContext)on the wrappedStateManagerobject.- Overrides:
getViewStatein classStateManager- Parameters:
context-FacesContextfor the current request- Since:
- 2.0
-