|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.application.StateManager
javax.faces.application.StateManagerWrapper
org.apache.myfaces.trinidadinternal.application.StateManagerImpl
public class StateManagerImpl
StateManager that handles a hybrid client/server strategy: the state is stored on the server, and only a small token is stored on the client.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.faces.application.StateManager |
|---|
javax.faces.application.StateManager.SerializedView |
| Field Summary | |
|---|---|
static java.lang.String |
CACHE_VIEW_ROOT_INIT_PARAM
|
static java.lang.String |
CLIENT_STATE_MAX_TOKENS_PARAM_NAME
Servlet context initialization parameter used by StateManagerImpl to decide how many tokens can be stored per user. |
static java.lang.String |
CLIENT_STATE_METHOD_ALL
Value indicating that the entire component state will be stored on the client. |
static java.lang.String |
CLIENT_STATE_METHOD_PARAM_NAME
Servlet context initialization parameter used by StateManagerImpl to decide what sort of state should be saved on the client. |
static java.lang.String |
CLIENT_STATE_METHOD_TOKEN
Value indicating that only a simple token will be stored on the client. |
static java.lang.String |
COMPRESS_VIEW_STATE_PARAM_NAME
Servlet context initialization parameter used by StateManagerImpl to decide whether to zip state. |
static java.lang.String |
RESPONSE_STATE_MANAGER_STATE_KEY
|
| Fields inherited from class javax.faces.application.StateManager |
|---|
FULL_STATE_SAVING_VIEW_IDS_PARAM_NAME, PARTIAL_STATE_SAVING_PARAM_NAME, STATE_SAVING_METHOD_CLIENT, STATE_SAVING_METHOD_PARAM_NAME, STATE_SAVING_METHOD_SERVER |
| Constructor Summary | |
|---|---|
StateManagerImpl(javax.faces.application.StateManager delegate)
|
|
| Method Summary | |
|---|---|
static void |
clearReuseRequestTokenForResponse(javax.faces.context.ExternalContext ec)
Clears the flag indicating that the old request token should be used for the response. |
static java.lang.String |
getActivePageToken(org.apache.myfaces.trinidad.context.RequestContext trinContext,
javax.faces.context.ExternalContext external)
|
protected java.lang.Object |
getComponentStateToSave(javax.faces.context.FacesContext context)
|
static java.lang.String |
getStateToken(javax.faces.context.FacesContext context)
|
protected java.lang.Object |
getTreeStructureToSave(javax.faces.context.FacesContext context)
|
java.lang.String |
getViewState(javax.faces.context.FacesContext context)
|
javax.faces.application.StateManager |
getWrapped()
|
boolean |
isSavingStateInClient(javax.faces.context.FacesContext context)
|
static boolean |
isValidViewStateToken(javax.faces.context.ExternalContext external,
java.lang.String token)
Returns whether a token is a currently valid View State Token |
static void |
pinStateToRequest(javax.faces.context.FacesContext context,
java.lang.String stateToken)
Requests that an old state token be "pinned" to the state of the current request. |
static void |
remapViewState(javax.faces.context.ExternalContext external,
java.lang.String windowId,
java.lang.String token)
Give a valid state token not associated with a window, change it to be associated with the specified window Id. |
protected void |
restoreComponentState(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewRoot,
java.lang.String renderKitId)
|
static javax.faces.component.UIComponent |
restoreComponentTree(javax.faces.context.FacesContext context,
java.lang.Object savedState)
Take an object created by saveComponentTree() and instantiate it as a UIComponent. |
protected javax.faces.component.UIViewRoot |
restoreTreeStructure(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.lang.String renderKitId)
|
javax.faces.component.UIViewRoot |
restoreView(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.lang.String renderKitId)
|
static javax.faces.component.UIViewRoot |
restoreViewRoot(javax.faces.context.FacesContext context,
java.lang.Object saved)
|
static void |
reuseRequestTokenForResponse(javax.faces.context.ExternalContext ec)
Mark the the incoming request token should be used for the response |
static java.lang.Object |
saveComponentTree(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Save a component tree as an Object. |
java.lang.Object |
saveView(javax.faces.context.FacesContext context)
|
static java.lang.Object |
saveViewRoot(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot root)
Save a view root. |
void |
setPerViewStateSaving(java.lang.String perViewStateSaving)
The given parameter ( perViewStateSaving) indicates
if we need to enable client- OR server-side state-saving
for the current VIEW. |
| Methods inherited from class javax.faces.application.StateManagerWrapper |
|---|
saveSerializedView, writeState, writeState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String RESPONSE_STATE_MANAGER_STATE_KEY
public static final java.lang.String CACHE_VIEW_ROOT_INIT_PARAM
public static final java.lang.String CLIENT_STATE_METHOD_PARAM_NAME
public static final java.lang.String CLIENT_STATE_MAX_TOKENS_PARAM_NAME
public static final java.lang.String COMPRESS_VIEW_STATE_PARAM_NAME
public static final java.lang.String CLIENT_STATE_METHOD_TOKEN
public static final java.lang.String CLIENT_STATE_METHOD_ALL
| Constructor Detail |
|---|
public StateManagerImpl(javax.faces.application.StateManager delegate)
| Method Detail |
|---|
public javax.faces.application.StateManager getWrapped()
getWrapped in interface javax.faces.FacesWrapper<javax.faces.application.StateManager>getWrapped in class javax.faces.application.StateManagerWrapperpublic java.lang.String getViewState(javax.faces.context.FacesContext context)
getViewState in class javax.faces.application.StateManagerWrapperpublic java.lang.Object saveView(javax.faces.context.FacesContext context)
saveView in class javax.faces.application.StateManagerWrapper
public static java.lang.Object saveComponentTree(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
public static javax.faces.component.UIComponent restoreComponentTree(javax.faces.context.FacesContext context,
java.lang.Object savedState)
throws java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public static java.lang.Object saveViewRoot(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot root)
public static javax.faces.component.UIViewRoot restoreViewRoot(javax.faces.context.FacesContext context,
java.lang.Object saved)
throws java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
public static java.lang.String getActivePageToken(org.apache.myfaces.trinidad.context.RequestContext trinContext,
javax.faces.context.ExternalContext external)
public static void pinStateToRequest(javax.faces.context.FacesContext context,
java.lang.String stateToken)
public static java.lang.String getStateToken(javax.faces.context.FacesContext context)
public static void reuseRequestTokenForResponse(javax.faces.context.ExternalContext ec)
public static void clearReuseRequestTokenForResponse(javax.faces.context.ExternalContext ec)
public static boolean isValidViewStateToken(javax.faces.context.ExternalContext external,
java.lang.String token)
external - The ExternalContexttoken - The state token to check for validity
public static void remapViewState(javax.faces.context.ExternalContext external,
java.lang.String windowId,
java.lang.String token)
external - The ExternalContextwindowId - window id to store the state token undertoken - The state token to remap from windowless to windowed
public javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.lang.String renderKitId)
restoreView in class javax.faces.application.StateManagerWrapperpublic void setPerViewStateSaving(java.lang.String perViewStateSaving)
perViewStateSaving) indicates
if we need to enable client- OR server-side state-saving
for the current VIEW.
This is an internal method, that is ONLY called by the Trinidad Document
perViewStateSaving - default, server or client for stateSavingpublic boolean isSavingStateInClient(javax.faces.context.FacesContext context)
isSavingStateInClient in class javax.faces.application.StateManagerWrapperprotected java.lang.Object getTreeStructureToSave(javax.faces.context.FacesContext context)
getTreeStructureToSave in class javax.faces.application.StateManagerWrapperprotected java.lang.Object getComponentStateToSave(javax.faces.context.FacesContext context)
getComponentStateToSave in class javax.faces.application.StateManagerWrapper
protected javax.faces.component.UIViewRoot restoreTreeStructure(javax.faces.context.FacesContext context,
java.lang.String viewId,
java.lang.String renderKitId)
restoreTreeStructure in class javax.faces.application.StateManagerWrapper
protected void restoreComponentState(javax.faces.context.FacesContext context,
javax.faces.component.UIViewRoot viewRoot,
java.lang.String renderKitId)
restoreComponentState in class javax.faces.application.StateManagerWrapper
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||