public abstract class StateCache<K,V> extends Object
Constructor and Description |
---|
StateCache() |
Modifier and Type | Method and Description |
---|---|
abstract K |
encodeSerializedState(FacesContext facesContext,
Object serializedView)
Calculate the token to be used if server side state saving, or encode the view and return the
viewState that can be used by the underlying ResponseStateManager to write the state.
|
abstract boolean |
isWriteStateAfterRenderViewRequired(FacesContext facesContext)
Indicates if the call to ResponseStateManager.writeState should be done after the view is fully rendered.
|
abstract V |
restoreSerializedView(FacesContext facesContext,
String viewId,
K viewState)
Get the state from the cache is server side state saving is used,
or decode it from the passed viewState param if client side is used.
|
abstract K |
saveSerializedView(FacesContext facesContext,
V serializedView)
Put the state on the cache, to can be restored later.
|
public abstract K saveSerializedView(FacesContext facesContext, V serializedView)
facesContext
- serializedView
- public abstract V restoreSerializedView(FacesContext facesContext, String viewId, K viewState)
facesContext
- viewId
- The viewId of the view to be restoredviewState
- A token usually retrieved from a call to ResponseStateManager.getState that will be
used to identify or restore the state.public abstract K encodeSerializedState(FacesContext facesContext, Object serializedView)
facesContext
- state
- The state that will be used to derive the token returned.public abstract boolean isWriteStateAfterRenderViewRequired(FacesContext facesContext)
facesContext
- Copyright © 2016 The Apache Software Foundation. All Rights Reserved.