Top Description Fields Constructors Methods
javax.faces.application

public abstract Class StateManagerWrapper

extends StateManager
implements FacesWrapper<StateManager>
Class Inheritance
All Implemented Interfaces
javax.faces.FacesWrapper
Imports
java.io.IOException, javax.faces.FacesWrapper, javax.faces.component.UIViewRoot, javax.faces.context.FacesContext

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 push the implementation being wrapped to the constructor and use getWrapped to access the instance being wrapped.

Since
1.2

Field Summary

Modifier and TypeField and Description
private StateManager
Inherited from javax.faces.application.StateManager:
FULL_STATE_SAVING_VIEW_IDS_PARAM_NAMEIS_BUILDING_INITIAL_STATEIS_SAVING_STATEPARTIAL_STATE_SAVING_PARAM_NAMESERIALIZE_SERVER_STATE_PARAM_NAMESTATE_SAVING_METHOD_CLIENTSTATE_SAVING_METHOD_PARAM_NAMESTATE_SAVING_METHOD_SERVER

Constructor Summary

AccessConstructor and Description
public
StateManagerWrapper()

Deprecated Use the other constructor taking the implementation being wrapped.
public
StateManagerWrapper(StateManager
The implementation being wrapped.
wrapped
)

If this state manager has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor.

Method Summary

Modifier and TypeMethod and Description
protected Object
protected Object
public String
getViewState(FacesContext
FacesContext for the current request
context
)

Overrides javax.faces.application.StateManager.getViewState.

The default behavior of this method is to call StateManager#getViewState(javax.faces.context.FacesContext) on the wrapped StateManager object.

public StateManager
getWrapped()

Implements javax.faces.FacesWrapper.getWrapped.

A class that implements this interface uses this method to return an instance of the class being wrapped.

public boolean
protected void
restoreComponentState(FacesContext
FacesContext for the current request
context
,
UIViewRoot
UIViewRoot returned by a previous call to restoreTreeStructure()
viewRoot
,
String
the renderKitId used to render this response. Must not be null.
renderKitId
)

Overrides javax.faces.application.StateManager.restoreComponentState.

The default behavior of this method is to call StateManager#restoreComponentState(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot, String) on the wrapped StateManager object.

protected UIViewRoot
restoreTreeStructure(FacesContext
FacesContext for the current request
context
,
String
View identifier of the view to be restored
viewId
,
String
the renderKitId used to render this response. Must not be null.
renderKitId
)

Overrides javax.faces.application.StateManager.restoreTreeStructure.

The default behavior of this method is to call StateManager#restoreTreeStructure(javax.faces.context.FacesContext, String, String) on the wrapped StateManager object.

public UIViewRoot
restoreView(FacesContext
FacesContext for the current request
context
,
String
View identifier of the view to be restored
viewId
,
String
the renderKitId used to render this response. Must not be null.
renderKitId
)

Implements abstract javax.faces.application.StateManager.restoreView.

The default behavior of this method is to call StateManager#restoreView(javax.faces.context.FacesContext, String, String) on the wrapped StateManager object.

public StateManager.SerializedView
saveSerializedView(FacesContext
FacesContext for the current request
context
)

Overrides javax.faces.application.StateManager.saveSerializedView.

Deprecated as a consequence of StateManager.SerializedView being deprecated.

The default behavior of this method is to call StateManager#saveSerializedView(javax.faces.context.FacesContext) on the wrapped StateManager object.

public Object
saveView(FacesContext
FacesContext for the current request
context
)

Overrides javax.faces.application.StateManager.saveView.

The default behavior of this method is to call StateManager#saveView(javax.faces.context.FacesContext) on the wrapped StateManager object.

public void
writeState(FacesContext
FacesContext for the current request
context
,
Object
the Serializable state to be written, as returned by saveSerializedView
state
)

Overrides javax.faces.application.StateManager.writeState.

The default behavior of this method is to call StateManager#writeState(javax.faces.context.FacesContext, java.lang.Object) on the wrapped StateManager object.

public void
writeState(FacesContext
FacesContext for the current request
context
,
StateManager.SerializedView
the serialized state to be written
state
)

Overrides javax.faces.application.StateManager.writeState.

Deprecated as a consequence of StateManager.SerializedView being deprecated.

The default behavior of this method is to call StateManager#writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView) on the wrapped StateManager object.

Field Detail

wrappedback to summary
private StateManager wrapped

Constructor Detail

StateManagerWrapperback to summary
public StateManagerWrapper()

Deprecated

Use the other constructor taking the implementation being wrapped.

Annotations
@Deprecated
StateManagerWrapperback to summary
public StateManagerWrapper(StateManager wrapped)

If this state manager has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. The getWrapped() will then return the implementation being wrapped.

Parameters
wrapped:StateManager

The implementation being wrapped.

Since
2.3

Method Detail

getComponentStateToSaveback to summary
protected Object getComponentStateToSave(FacesContext context)

Overrides javax.faces.application.StateManager.getComponentStateToSave.

The default behavior of this method is to call StateManager#getComponentStateToSave(javax.faces.context.FacesContext) on the wrapped StateManager object.

Parameters
context:FacesContext

Doc from javax.faces.application.StateManager.getComponentStateToSave.

FacesContext for the current request

Returns:Object

Doc from javax.faces.application.StateManager.getComponentStateToSave.

the component state, or null.

Annotations
@Override
Since
1.2
See Also
StateManager#getComponentStateToSave(javax.faces.context.FacesContext)
getTreeStructureToSaveback to summary
protected Object getTreeStructureToSave(FacesContext context)

Overrides javax.faces.application.StateManager.getTreeStructureToSave.

The default behavior of this method is to call StateManager#getTreeStructureToSave(javax.faces.context.FacesContext) on the wrapped StateManager object.

Parameters
context:FacesContext

Doc from javax.faces.application.StateManager.getTreeStructureToSave.

FacesContext for the current request

Returns:Object

Doc from javax.faces.application.StateManager.getTreeStructureToSave.

the tree structure, or null.

Annotations
@Override
Since
1.2
See Also
StateManager#getTreeStructureToSave(javax.faces.context.FacesContext)
getViewStateback to summary
public String getViewState(FacesContext context)

Overrides javax.faces.application.StateManager.getViewState.

The default behavior of this method is to call StateManager#getViewState(javax.faces.context.FacesContext) on the wrapped StateManager object.

Parameters
context:FacesContext

Doc from javax.faces.application.StateManager.getViewState.

FacesContext for the current request

Returns:String

Doc from javax.faces.application.StateManager.getViewState.

the view state.

Annotations
@Override
Since
2.0
getWrappedback to summary
public StateManager getWrapped()

Implements javax.faces.FacesWrapper.getWrapped.

Doc from javax.faces.FacesWrapper.getWrapped.

A class that implements this interface uses this method to return an instance of the class being wrapped.

Returns:StateManager

the wrapped instance.

Annotations
@Override
isSavingStateInClientback to summary
public boolean isSavingStateInClient(FacesContext context)

Overrides javax.faces.application.StateManager.isSavingStateInClient.

The default behavior of this method is to call StateManager#isSavingStateInClient(javax.faces.context.FacesContext) on the wrapped StateManager object.

Parameters
context:FacesContext

Doc from javax.faces.application.StateManager.isSavingStateInClient.

the Faces context.

Returns:boolean

Doc from javax.faces.application.StateManager.isSavingStateInClient.

true if and only if the value of the ServletContext init parameter named by the value of the constant STATE_SAVING_METHOD_PARAM_NAME is equal (ignoring case) to the value of the constant STATE_SAVING_METHOD_CLIENT. false otherwise.

Annotations
@Override
Since
1.2
See Also
StateManager#isSavingStateInClient(javax.faces.context.FacesContext)
restoreComponentStateback to summary
protected void restoreComponentState(FacesContext context, UIViewRoot viewRoot, String renderKitId)

Overrides javax.faces.application.StateManager.restoreComponentState.

The default behavior of this method is to call StateManager#restoreComponentState(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot, String) on the wrapped StateManager object.

Parameters
context:FacesContext

Doc from javax.faces.application.StateManager.restoreComponentState.

FacesContext for the current request

viewRoot:UIViewRoot

Doc from javax.faces.application.StateManager.restoreComponentState.

UIViewRoot returned by a previous call to restoreTreeStructure()

renderKitId:String

Doc from javax.faces.application.StateManager.restoreComponentState.

the renderKitId used to render this response. Must not be null.

Annotations
@Override
Since
1.2
See Also
StateManager#restoreComponentState(javax.faces.context.FacesContext, javax.faces.component.UIViewRoot, String)
restoreTreeStructureback to summary
protected UIViewRoot restoreTreeStructure(FacesContext context, String viewId, String renderKitId)

Overrides javax.faces.application.StateManager.restoreTreeStructure.

The default behavior of this method is to call StateManager#restoreTreeStructure(javax.faces.context.FacesContext, String, String) on the wrapped StateManager object.

Parameters
context:FacesContext

Doc from javax.faces.application.StateManager.restoreTreeStructure.

FacesContext for the current request

viewId:String

Doc from javax.faces.application.StateManager.restoreTreeStructure.

View identifier of the view to be restored

renderKitId:String

Doc from javax.faces.application.StateManager.restoreTreeStructure.

the renderKitId used to render this response. Must not be null.

Returns:UIViewRoot

Doc from javax.faces.application.StateManager.restoreTreeStructure.

the view root, or null.

Annotations
@Override
Since
1.2
See Also
StateManager#restoreTreeStructure(javax.faces.context.FacesContext, String, String)
restoreViewback to summary
public UIViewRoot restoreView(FacesContext context, String viewId, String renderKitId)

Implements abstract javax.faces.application.StateManager.restoreView.

The default behavior of this method is to call StateManager#restoreView(javax.faces.context.FacesContext, String, String) on the wrapped StateManager object.

Parameters
context:FacesContext

Doc from javax.faces.application.StateManager.restoreView.

FacesContext for the current request

viewId:String

Doc from javax.faces.application.StateManager.restoreView.

View identifier of the view to be restored

renderKitId:String

Doc from javax.faces.application.StateManager.restoreView.

the renderKitId used to render this response. Must not be null.

Returns:UIViewRoot

Doc from javax.faces.application.StateManager.restoreView.

the view root, or null.

Annotations
@Override
Since
1.2
See Also
StateManager#restoreView(javax.faces.context.FacesContext, String, String)
saveSerializedViewback to summary
public StateManager.SerializedView saveSerializedView(FacesContext context)

Overrides javax.faces.application.StateManager.saveSerializedView.

Deprecated

as a consequence of StateManager.SerializedView being deprecated. See corresponding docs for further information.

The default behavior of this method is to call StateManager#saveSerializedView(javax.faces.context.FacesContext) on the wrapped StateManager object.

Parameters
context:FacesContext

Doc from javax.faces.application.StateManager.saveSerializedView.

FacesContext for the current request

Returns:StateManager.SerializedView

Doc from javax.faces.application.StateManager.saveSerializedView.

the serialized view, or null.

Annotations
@Override
Since
1.2
See Also
StateManager#saveSerializedView(javax.faces.context.FacesContext)
saveViewback to summary
public Object saveView(FacesContext context)

Overrides javax.faces.application.StateManager.saveView.

The default behavior of this method is to call StateManager#saveView(javax.faces.context.FacesContext) on the wrapped StateManager object.

Parameters
context:FacesContext

Doc from javax.faces.application.StateManager.saveView.

FacesContext for the current request

Returns:Object

Doc from javax.faces.application.StateManager.saveView.

the saved view.

Annotations
@Override
Since
1.2
See Also
StateManager#saveView(javax.faces.context.FacesContext)
writeStateback to summary
public void writeState(FacesContext context, Object state) throws IOException

Overrides javax.faces.application.StateManager.writeState.

The default behavior of this method is to call StateManager#writeState(javax.faces.context.FacesContext, java.lang.Object) on the wrapped StateManager object.

Parameters
context:FacesContext

Doc from javax.faces.application.StateManager.writeState.

FacesContext for the current request

state:Object

Doc from javax.faces.application.StateManager.writeState.

the Serializable state to be written, as returned by saveSerializedView

Annotations
@Override
Exceptions
IOException:

Doc from javax.faces.application.StateManager.writeState.

when an I/O error occurs.

Since
1.2
See Also
StateManager#writeState(javax.faces.context.FacesContext, java.lang.Object)
writeStateback to summary
public void writeState(FacesContext context, StateManager.SerializedView state) throws IOException

Overrides javax.faces.application.StateManager.writeState.

Deprecated

as a consequence of StateManager.SerializedView being deprecated. See corresponding docs for further information.

The default behavior of this method is to call StateManager#writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView) on the wrapped StateManager object.

Parameters
context:FacesContext

Doc from javax.faces.application.StateManager.writeState.

FacesContext for the current request

state:StateManager.SerializedView

Doc from javax.faces.application.StateManager.writeState.

the serialized state to be written

Annotations
@Override
Exceptions
IOException:

Doc from javax.faces.application.StateManager.writeState.

when an I/O error occurs.

Since
1.2
See Also
StateManager#writeState(javax.faces.context.FacesContext, javax.faces.application.StateManager.SerializedView)