org.apache.myfaces.application.pss
Class PssJspStateManagerImpl

java.lang.Object
  extended by javax.faces.application.StateManager
      extended by org.apache.myfaces.application.MyfacesStateManager
          extended by org.apache.myfaces.application.pss.PssJspStateManagerImpl

public class PssJspStateManagerImpl
extends MyfacesStateManager

Author:
Martin Haimberger

Nested Class Summary
protected static class PssJspStateManagerImpl.SerializedViewCollection
           
protected static class PssJspStateManagerImpl.SerializedViewKey
           
 
Nested classes/interfaces inherited from class javax.faces.application.StateManager
javax.faces.application.StateManager.SerializedView
 
Field Summary
 
Fields inherited from class javax.faces.application.StateManager
STATE_SAVING_METHOD_CLIENT, STATE_SAVING_METHOD_PARAM_NAME, STATE_SAVING_METHOD_SERVER
 
Constructor Summary
PssJspStateManagerImpl()
           
 
Method Summary
protected  javax.faces.component.UIOutput createUIOutputComponent(javax.faces.context.FacesContext context)
           
protected  javax.faces.component.UIComponent createUIOutputComponentFromString(javax.faces.context.FacesContext context, java.lang.String content)
           
protected  javax.faces.application.StateManager.SerializedView deserializeView(java.lang.Object state)
           
protected  java.lang.Object getComponentStateToSave(javax.faces.context.FacesContext facesContext)
           
protected  javax.faces.render.RenderKitFactory getRenderKitFactory()
           
protected  javax.faces.application.StateManager.SerializedView getSerializedViewFromServletSession(javax.faces.context.FacesContext context, java.lang.String viewId, java.lang.String sequenceStr)
           
protected  java.lang.Object getTreeStructureToSave(javax.faces.context.FacesContext facesContext)
          Return an object which contains info about the UIComponent type of each node in the view tree.
protected  java.lang.Object getTreeToSave(javax.faces.context.FacesContext facesContext)
          Return an object which contains info about the UIComponent type of each node in the view tree.
protected  boolean isCompressStateInSession(javax.faces.context.FacesContext context)
          Reads the value of the org.apache.myfaces.COMPRESS_STATE_IN_SESSION context parameter.
protected  boolean isSerializeStateInSession(javax.faces.context.FacesContext context)
          Reads the value of the org.apache.myfaces.SERIALIZE_STATE_IN_SESSION context parameter.
 java.lang.Object LoadTreeFromManager(javax.faces.context.FacesContext facesContext, java.lang.String viewID)
           
 java.lang.Object LoadUIViewRootFromManager(javax.faces.context.FacesContext facesContext, java.lang.String viewID)
           
protected  javax.faces.component.UIViewRoot restoreComponentState(javax.faces.context.FacesContext facesContext, java.lang.String viewID, java.lang.String renderKitId)
          Given a tree of UIComponent objects created the default constructor for each node, retrieve saved state info (from either the client or the server) and walk the tree restoring the members of each node from the saved state information.
protected  void restoreComponentState(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot viewRoot, java.lang.String renderKitId)
           
protected  javax.faces.component.UIViewRoot restoreTreeStructure(javax.faces.context.FacesContext facesContext, java.lang.String viewId, java.lang.String renderKitId)
          See getTreeStructureToSave.
 javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext facescontext, java.lang.String viewId, java.lang.String renderKitId)
           
protected  java.lang.Object restoreViewRoot(javax.faces.context.FacesContext facesContext, java.lang.Object storedView)
          Return an object which contains info about the UIComponent type of each node in the view tree.
 javax.faces.application.StateManager.SerializedView saveSerializedView(javax.faces.context.FacesContext facesContext)
           
protected  void saveSerializedViewInServletSession(javax.faces.context.FacesContext context, javax.faces.application.StateManager.SerializedView serializedView)
           
 void SaveTreeInManager(javax.faces.context.FacesContext facesContext)
           
protected  java.lang.Object serializeView(javax.faces.context.FacesContext context, javax.faces.application.StateManager.SerializedView serializedView)
           
 void writeState(javax.faces.context.FacesContext facesContext, javax.faces.application.StateManager.SerializedView serializedView)
           
 void writeStateAsUrlParams(javax.faces.context.FacesContext facesContext, javax.faces.application.StateManager.SerializedView serializedView)
          MyFaces extension
 
Methods inherited from class javax.faces.application.StateManager
isSavingStateInClient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PssJspStateManagerImpl

public PssJspStateManagerImpl()
Method Detail

getComponentStateToSave

protected java.lang.Object getComponentStateToSave(javax.faces.context.FacesContext facesContext)
Specified by:
getComponentStateToSave in class javax.faces.application.StateManager

getTreeStructureToSave

protected java.lang.Object getTreeStructureToSave(javax.faces.context.FacesContext facesContext)
Return an object which contains info about the UIComponent type of each node in the view tree. This allows an identical UIComponent tree to be recreated later, though all the components will have just default values for their members.

Specified by:
getTreeStructureToSave in class javax.faces.application.StateManager

getTreeToSave

protected java.lang.Object getTreeToSave(javax.faces.context.FacesContext facesContext)
Return an object which contains info about the UIComponent type of each node in the view tree. This allows an identical UIComponent tree to be recreated later, though all the components will have just default values for their members.


restoreViewRoot

protected java.lang.Object restoreViewRoot(javax.faces.context.FacesContext facesContext,
                                           java.lang.Object storedView)
Return an object which contains info about the UIComponent type of each node in the view tree. This allows an identical UIComponent tree to be recreated later, though all the components will have just default values for their members.


restoreComponentState

protected javax.faces.component.UIViewRoot restoreComponentState(javax.faces.context.FacesContext facesContext,
                                                                 java.lang.String viewID,
                                                                 java.lang.String renderKitId)
Given a tree of UIComponent objects created the default constructor for each node, retrieve saved state info (from either the client or the server) and walk the tree restoring the members of each node from the saved state information.


restoreTreeStructure

protected javax.faces.component.UIViewRoot restoreTreeStructure(javax.faces.context.FacesContext facesContext,
                                                                java.lang.String viewId,
                                                                java.lang.String renderKitId)
See getTreeStructureToSave.

Specified by:
restoreTreeStructure in class javax.faces.application.StateManager

restoreComponentState

protected void restoreComponentState(javax.faces.context.FacesContext context,
                                     javax.faces.component.UIViewRoot viewRoot,
                                     java.lang.String renderKitId)
Specified by:
restoreComponentState in class javax.faces.application.StateManager

restoreView

public javax.faces.component.UIViewRoot restoreView(javax.faces.context.FacesContext facescontext,
                                                    java.lang.String viewId,
                                                    java.lang.String renderKitId)
Specified by:
restoreView in class javax.faces.application.StateManager

createUIOutputComponentFromString

protected javax.faces.component.UIComponent createUIOutputComponentFromString(javax.faces.context.FacesContext context,
                                                                              java.lang.String content)

createUIOutputComponent

protected javax.faces.component.UIOutput createUIOutputComponent(javax.faces.context.FacesContext context)

SaveTreeInManager

public void SaveTreeInManager(javax.faces.context.FacesContext facesContext)
                       throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

LoadUIViewRootFromManager

public java.lang.Object LoadUIViewRootFromManager(javax.faces.context.FacesContext facesContext,
                                                  java.lang.String viewID)
                                           throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

LoadTreeFromManager

public java.lang.Object LoadTreeFromManager(javax.faces.context.FacesContext facesContext,
                                            java.lang.String viewID)
                                     throws java.lang.IllegalStateException
Throws:
java.lang.IllegalStateException

saveSerializedView

public javax.faces.application.StateManager.SerializedView saveSerializedView(javax.faces.context.FacesContext facesContext)
                                                                       throws java.lang.IllegalStateException
Specified by:
saveSerializedView in class javax.faces.application.StateManager
Throws:
java.lang.IllegalStateException

writeState

public void writeState(javax.faces.context.FacesContext facesContext,
                       javax.faces.application.StateManager.SerializedView serializedView)
                throws java.io.IOException
Specified by:
writeState in class javax.faces.application.StateManager
Throws:
java.io.IOException

writeStateAsUrlParams

public void writeStateAsUrlParams(javax.faces.context.FacesContext facesContext,
                                  javax.faces.application.StateManager.SerializedView serializedView)
                           throws java.io.IOException
MyFaces extension

Specified by:
writeStateAsUrlParams in class MyfacesStateManager
Parameters:
facesContext -
serializedView -
Throws:
java.io.IOException

getRenderKitFactory

protected javax.faces.render.RenderKitFactory getRenderKitFactory()

saveSerializedViewInServletSession

protected void saveSerializedViewInServletSession(javax.faces.context.FacesContext context,
                                                  javax.faces.application.StateManager.SerializedView serializedView)

getSerializedViewFromServletSession

protected javax.faces.application.StateManager.SerializedView getSerializedViewFromServletSession(javax.faces.context.FacesContext context,
                                                                                                  java.lang.String viewId,
                                                                                                  java.lang.String sequenceStr)

serializeView

protected java.lang.Object serializeView(javax.faces.context.FacesContext context,
                                         javax.faces.application.StateManager.SerializedView serializedView)

isSerializeStateInSession

protected boolean isSerializeStateInSession(javax.faces.context.FacesContext context)
Reads the value of the org.apache.myfaces.SERIALIZE_STATE_IN_SESSION context parameter.

Parameters:
context - FacesContext for the request we are processing.
Returns:
boolean true, if the server state should be serialized in the session
See Also:
SERIALIZE_STATE_IN_SESSION_PARAM

isCompressStateInSession

protected boolean isCompressStateInSession(javax.faces.context.FacesContext context)
Reads the value of the org.apache.myfaces.COMPRESS_STATE_IN_SESSION context parameter.

Parameters:
context - FacesContext for the request we are processing.
Returns:
boolean true, if the server state steam should be compressed
See Also:
COMPRESS_SERVER_STATE_PARAM

deserializeView

protected javax.faces.application.StateManager.SerializedView deserializeView(java.lang.Object state)


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.