DynamicState Class
Utility Class to create Dynamic state objects with three properties: objectName, className, sessionState
Item Index
Methods
- alterSessionStateToBypassDiff static
- create static
- isDynamicState static
- isDynamicStateArray static
Properties
- BYPASS_DIFF static
- CLASS_NAME static
- OBJECT_NAME static
- SESSION_STATE static
Methods
alterSessionStateToBypassDiff
-
state
Alters a session state object to bypass special diff logic for dynamic state arrays. It does so by adding the "bypassDiff" property to any part for which isDynamicState(part) returns true.
Parameters:
-
stateObject
Returns:
A value of true if the Array looks like a dynamic session state or diff.
create
-
objectName -
className -
sessionState
Creates an Object having three properties: objectName, className, sessionState
Parameters:
-
objectNameStringThe name assigned to the object when the session state is generated.
-
classNameStringThe qualified class name of the original object providing the session state.
-
sessionStateObjectThe session state for an object of the type specified by className.
isDynamicState
-
object
This function can be used to detect dynamic state objects within nested, untyped session state objects. This function will check if the given object has the three properties of a dynamic state object.
Parameters:
-
objectObjectAn object to check.
Returns:
true if the object has all three properties and no extras.
isDynamicStateArray
-
state
This function checks whether or not a session state is an Array containing at least one object that looks like a DynamicState and has no other non-String items.
Parameters:
-
stateObject
Returns:
A value of true if the Array looks like a dynamic session state or diff.
Properties
BYPASS_DIFF
String
public
static
The name of the property used to make isDynamicState() return false in order to bypass special diff logic for dynamic state arrays.
Default: "bypassDiff"
CLASS_NAME
String
public
static
The name of the property containing the qualified class name of the original object providing the session state.
Default: "className"
OBJECT_NAME
String
public
static
The name of the property containing the name assigned to the object when the session state is generated.
Default: "objectName"
SESSION_STATE
String
public
static
The name of the property containing the session state for an object of the type specified by className.
Default: "sessionState"
