org.eclnt.jsfserver.util

## Class CCStateManager

- java.lang.Object
- - StateManager
  - - org.eclnt.jsfserver.util.CCStateManager

-     public class CCStateManager
      extends StateManager

  State manager that is used within CaptainCasa. The situation is: CaptainCasa components do not hold any state (aside technical state) on their owns, the full application state is always referenced via expressions. Therefore the strategy is:
  The view root is parked within the session state of the http session. Assuming that the next http request will hit the same virtual machine the view root will as consequence NOT be persisted all the time but is kept stable.
  If case the session state is not available (e.g. due to session migration) the view root will be re-built out of the current page context.
  What's the advantage? There is NO UIComponent state serialization with every roundtrip. So, the scenario is "optimal" if the session by default is kept up and running in a cerain application server node.
  Whats's the disadvantage? If a session is migrated from one node to the next, then the current request that the user invoked will be lost (because there is no component tree to take over events and data changed - the tree is rebuilt in the rendering phase).

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CCStateManager(StateManager parent)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.Object` | `getComponentStateToSave(FacesContext context)`
    `protected java.lang.Object` | `getTreeStructureToSave(FacesContext context)`
    `boolean` | `isSavingStateInClient(FacesContext context)`
    `protected void` | `restoreComponentState(FacesContext context, UIViewRoot viewRoot, java.lang.String renderKitId)`
    `protected UIViewRoot` | `restoreTreeStructure(FacesContext context, java.lang.String viewId, java.lang.String renderKitId)`
    `UIViewRoot` | `restoreView(FacesContext context, java.lang.String viewId, java.lang.String renderKitId)`
    `SerializedView` | `saveSerializedView(FacesContext context)`
    `java.lang.Object` | `saveView(FacesContext context)`
    `void` | `writeState(FacesContext context, java.lang.Object state)`
    `void` | `writeState(FacesContext context, SerializedView state)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CCStateManager

          public CCStateManager(StateManager parent)

  - ### Method Detail

    - #### restoreView

          public UIViewRoot restoreView(FacesContext context,
                                        java.lang.String viewId,
                                        java.lang.String renderKitId)

    - #### saveView

          public java.lang.Object saveView(FacesContext context)

    - #### isSavingStateInClient

          public boolean isSavingStateInClient(FacesContext context)

    - #### writeState

          public void writeState(FacesContext context,
                                 java.lang.Object state)
                          throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### writeState

          public void writeState(FacesContext context,
                                 SerializedView state)
                          throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### saveSerializedView

          public SerializedView saveSerializedView(FacesContext context)

    - #### getTreeStructureToSave

          protected java.lang.Object getTreeStructureToSave(FacesContext context)

    - #### getComponentStateToSave

          protected java.lang.Object getComponentStateToSave(FacesContext context)

    - #### restoreTreeStructure

          protected UIViewRoot restoreTreeStructure(FacesContext context,
                                                    java.lang.String viewId,
                                                    java.lang.String renderKitId)

    - #### restoreComponentState

          protected void restoreComponentState(FacesContext context,
                                               UIViewRoot viewRoot,
                                               java.lang.String renderKitId)

Copyright © CaptainCasa Gmbh. All Rights Reserved.