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
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  UIOutput createUIOutputComponent(FacesContext context)
           
protected  UIComponent createUIOutputComponentFromString(FacesContext context, String content)
           
protected  StateManager.SerializedView deserializeView(Object state)
           
protected  Object getComponentStateToSave(FacesContext facesContext)
           
protected  RenderKitFactory getRenderKitFactory()
           
protected  StateManager.SerializedView getSerializedViewFromServletSession(FacesContext context, String viewId, String sequenceStr)
           
protected  Object getTreeStructureToSave(FacesContext facesContext)
          Return an object which contains info about the UIComponent type of each node in the view tree.
protected  Object getTreeToSave(FacesContext facesContext)
          Return an object which contains info about the UIComponent type of each node in the view tree.
protected  boolean isCompressStateInSession(FacesContext context)
          Reads the value of the org.apache.myfaces.COMPRESS_STATE_IN_SESSION context parameter.
protected  boolean isSerializeStateInSession(FacesContext context)
          Reads the value of the org.apache.myfaces.SERIALIZE_STATE_IN_SESSION context parameter.
 Object LoadTreeFromManager(FacesContext facesContext, String viewID)
           
 Object LoadUIViewRootFromManager(FacesContext facesContext, String viewID)
           
protected  UIViewRoot restoreComponentState(FacesContext facesContext, String viewID, 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(FacesContext context, UIViewRoot viewRoot, String renderKitId)
           
protected  UIViewRoot restoreTreeStructure(FacesContext facesContext, String viewId, String renderKitId)
          See getTreeStructureToSave.
 UIViewRoot restoreView(FacesContext facescontext, String viewId, String renderKitId)
           
protected  Object restoreViewRoot(FacesContext facesContext, Object storedView)
          Return an object which contains info about the UIComponent type of each node in the view tree.
 StateManager.SerializedView saveSerializedView(FacesContext facesContext)
           
protected  void saveSerializedViewInServletSession(FacesContext context, StateManager.SerializedView serializedView)
           
 void SaveTreeInManager(FacesContext facesContext)
           
protected  Object serializeView(FacesContext context, StateManager.SerializedView serializedView)
           
 void writeState(FacesContext facesContext, StateManager.SerializedView serializedView)
           
 void writeStateAsUrlParams(FacesContext facesContext, 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 Object getComponentStateToSave(FacesContext facesContext)
Specified by:
getComponentStateToSave in class StateManager

getTreeStructureToSave

protected Object getTreeStructureToSave(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 StateManager

getTreeToSave

protected Object getTreeToSave(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 Object restoreViewRoot(FacesContext facesContext,
                                 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 UIViewRoot restoreComponentState(FacesContext facesContext,
                                           String viewID,
                                           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 UIViewRoot restoreTreeStructure(FacesContext facesContext,
                                          String viewId,
                                          String renderKitId)
See getTreeStructureToSave.

Specified by:
restoreTreeStructure in class StateManager

restoreComponentState

protected void restoreComponentState(FacesContext context,
                                     UIViewRoot viewRoot,
                                     String renderKitId)
Specified by:
restoreComponentState in class StateManager

restoreView

public UIViewRoot restoreView(FacesContext facescontext,
                              String viewId,
                              String renderKitId)
Specified by:
restoreView in class StateManager

createUIOutputComponentFromString

protected UIComponent createUIOutputComponentFromString(FacesContext context,
                                                        String content)

createUIOutputComponent

protected UIOutput createUIOutputComponent(FacesContext context)

SaveTreeInManager

public void SaveTreeInManager(FacesContext facesContext)
                       throws IllegalStateException
Throws:
IllegalStateException

LoadUIViewRootFromManager

public Object LoadUIViewRootFromManager(FacesContext facesContext,
                                        String viewID)
                                 throws IllegalStateException
Throws:
IllegalStateException

LoadTreeFromManager

public Object LoadTreeFromManager(FacesContext facesContext,
                                  String viewID)
                           throws IllegalStateException
Throws:
IllegalStateException

saveSerializedView

public StateManager.SerializedView saveSerializedView(FacesContext facesContext)
                                               throws IllegalStateException
Specified by:
saveSerializedView in class StateManager
Throws:
IllegalStateException

writeState

public void writeState(FacesContext facesContext,
                       StateManager.SerializedView serializedView)
                throws IOException
Specified by:
writeState in class StateManager
Throws:
IOException

writeStateAsUrlParams

public void writeStateAsUrlParams(FacesContext facesContext,
                                  StateManager.SerializedView serializedView)
                           throws IOException
MyFaces extension

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

getRenderKitFactory

protected RenderKitFactory getRenderKitFactory()

saveSerializedViewInServletSession

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

getSerializedViewFromServletSession

protected StateManager.SerializedView getSerializedViewFromServletSession(FacesContext context,
                                                                          String viewId,
                                                                          String sequenceStr)

serializeView

protected Object serializeView(FacesContext context,
                               StateManager.SerializedView serializedView)

isSerializeStateInSession

protected boolean isSerializeStateInSession(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(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 StateManager.SerializedView deserializeView(Object state)


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