Top Description Fields Constructors Methods
jakarta.faces.application

public abstract Class StateManagerWrapper

extends StateManager
implements FacesWrapper<StateManager>
Class Inheritance
All Implemented Interfaces
jakarta.faces.FacesWrapper
Imports
java.io.IOException, jakarta.faces.FacesWrapper, jakarta.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 jakarta.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(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
public String
getViewState(FacesContext
FacesContext for the current request
context
)

Overrides jakarta.faces.application.StateManager.getViewState.

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

public StateManager
getWrapped()

Implements jakarta.faces.FacesWrapper.getWrapped.

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

public boolean
public void
writeState(FacesContext
FacesContext for the current request
context
,
Object
the state to be written
state
)

Overrides jakarta.faces.application.StateManager.writeState.

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

Field Detail

wrappedback to summary
private StateManager wrapped

Constructor Detail

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

getViewStateback to summary
public String getViewState(FacesContext context)

Overrides jakarta.faces.application.StateManager.getViewState.

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

Parameters
context:FacesContext

Doc from jakarta.faces.application.StateManager.getViewState.

FacesContext for the current request

Returns:String

Doc from jakarta.faces.application.StateManager.getViewState.

the view state.

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

Implements jakarta.faces.FacesWrapper.getWrapped.

Doc from jakarta.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 jakarta.faces.application.StateManager.isSavingStateInClient.

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

Parameters
context:FacesContext

Doc from jakarta.faces.application.StateManager.isSavingStateInClient.

the Faces context.

Returns:boolean

Doc from jakarta.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(jakarta.faces.context.FacesContext)
writeStateback to summary
public void writeState(FacesContext context, Object state) throws IOException

Overrides jakarta.faces.application.StateManager.writeState.

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

Parameters
context:FacesContext

Doc from jakarta.faces.application.StateManager.writeState.

FacesContext for the current request

state:Object

Doc from jakarta.faces.application.StateManager.writeState.

the state to be written

Annotations
@Override
Exceptions
IOException:

Doc from jakarta.faces.application.StateManager.writeState.

when an I/O error occurs.

Since
1.2
See Also
StateManager#writeState(jakarta.faces.context.FacesContext, java.lang.Object)