|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.xsp.util.StateHolderUtil
public class StateHolderUtil
Utility used by UIComponent
and StateHolder
implementations,
to save and restore maps of StateHolder
s, lists, etc. Control
properties that have String, int, or other primitive values can be serialized
without this utility, but generally any more complicated property values
should be saved and restored through the methods available here. Each save
method has a corresponding restore method, and the paired methods should be
used together.
Constructor Summary | |
---|---|
StateHolderUtil()
|
Method Summary | ||
---|---|---|
static java.lang.Object[] |
restoreArray(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object state)
Restore the state of an array of StateHolders |
|
static void |
restoreDataContainers(javax.faces.context.FacesContext context,
java.util.Map<java.lang.String,DataContainer> containers,
java.lang.Object[] state)
Save the data containers |
|
static
|
restoreList(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object state)
|
|
static
|
restoreMap(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object state)
Restore the state of a Map of StateHolders |
|
static javax.faces.el.MethodBinding |
restoreMethodBinding(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object state)
Restore the state of a MethodBinding |
|
static java.lang.Object |
restoreObjectState(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object state)
|
|
static PropertyMap |
restorePropertyMap(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object state)
Restore the state of a list of StateHolders |
|
static
|
restoreSet(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object state)
Restore the state of a set of StateHolders |
|
static
|
restoreStateHolder(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object state)
|
|
static void |
restoreStateHolder(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object state,
javax.faces.component.StateHolder recreatedStateHolder)
Where the object to restore has already been created, this restores the saved state onto the object. |
|
static javax.faces.el.ValueBinding |
restoreValueBinding(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object state)
Restore the state of a ValueBinding |
|
static java.util.Map<java.lang.String,javax.faces.el.ValueBinding> |
restoreValueBindings(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object state)
Restore the state of a map of ValueBindings |
|
static java.lang.Object |
saveArray(javax.faces.context.FacesContext context,
java.lang.Object[] array,
boolean isStateHolder)
Save the state of a list of StateHolders |
|
static java.lang.Object |
saveDataContainers(javax.faces.context.FacesContext context,
java.util.Map<java.lang.String,DataContainer> containers)
Save the data containers, note, the containers should implement Externalizable . |
|
static
|
saveList(javax.faces.context.FacesContext context,
java.util.List<T> list)
Save the state of a list of StateHolders |
|
static
|
saveList(javax.faces.context.FacesContext context,
java.util.List<T> list,
boolean isStateHolder)
Save the state of a list of StateHolders |
|
static
|
saveMap(javax.faces.context.FacesContext context,
java.util.Map<K,V> map)
Save the state of a map of StateHolders |
|
static
|
saveMap(javax.faces.context.FacesContext context,
java.util.Map<K,V> map,
boolean isStateHolder)
Save the state of a map of values |
|
static java.lang.Object |
saveMethodBinding(javax.faces.context.FacesContext context,
javax.faces.el.MethodBinding binding)
Save the state of a MethodBinding |
|
static java.lang.Object |
saveObjectState(javax.faces.context.FacesContext context,
java.lang.Object object)
The object may or may not implement StateHolder (it can save either kind). |
|
static java.lang.Object |
savePropertyMap(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
PropertyMap properties)
Save the state of a list of a property map. |
|
static
|
saveSet(javax.faces.context.FacesContext context,
java.util.Set<T> set)
Save the state of a Set of StateHolders |
|
static
|
saveSet(javax.faces.context.FacesContext context,
java.util.Set<T> set,
boolean isStateHolder)
Save the state of a set of values |
|
static java.lang.Object |
saveStateHolder(javax.faces.context.FacesContext context,
javax.faces.component.StateHolder stateHolder)
|
|
static java.lang.Object |
saveValueBinding(javax.faces.context.FacesContext context,
javax.faces.el.ValueBinding binding)
Save the state of a ValueBinding |
|
static java.lang.Object |
saveValueBindings(javax.faces.context.FacesContext context,
java.util.Map<java.lang.String,javax.faces.el.ValueBinding> bindings)
Save the state of a map of ValueBindings |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StateHolderUtil()
Method Detail |
---|
public static java.lang.Object[] restoreArray(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object state)
public static java.lang.Object saveArray(javax.faces.context.FacesContext context, java.lang.Object[] array, boolean isStateHolder)
public static <T> java.util.List<T> restoreList(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object state)
public static PropertyMap restorePropertyMap(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object state)
public static <T> java.lang.Object saveList(javax.faces.context.FacesContext context, java.util.List<T> list)
public static <T> java.lang.Object saveList(javax.faces.context.FacesContext context, java.util.List<T> list, boolean isStateHolder)
public static <T> java.util.Set<T> restoreSet(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object state)
public static <T> java.lang.Object saveSet(javax.faces.context.FacesContext context, java.util.Set<T> set)
public static <T> java.lang.Object saveSet(javax.faces.context.FacesContext context, java.util.Set<T> set, boolean isStateHolder)
public static <K,V> java.util.Map<K,V> restoreMap(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object state)
public static <K,V> java.lang.Object saveMap(javax.faces.context.FacesContext context, java.util.Map<K,V> map)
public static <K,V> java.lang.Object saveMap(javax.faces.context.FacesContext context, java.util.Map<K,V> map, boolean isStateHolder)
public static java.lang.Object savePropertyMap(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, PropertyMap properties)
public static java.lang.Object saveValueBindings(javax.faces.context.FacesContext context, java.util.Map<java.lang.String,javax.faces.el.ValueBinding> bindings)
public static java.util.Map<java.lang.String,javax.faces.el.ValueBinding> restoreValueBindings(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object state)
public static javax.faces.el.ValueBinding restoreValueBinding(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object state)
public static java.lang.Object saveValueBinding(javax.faces.context.FacesContext context, javax.faces.el.ValueBinding binding)
public static javax.faces.el.MethodBinding restoreMethodBinding(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object state)
public static java.lang.Object saveMethodBinding(javax.faces.context.FacesContext context, javax.faces.el.MethodBinding binding)
public static java.lang.Object saveDataContainers(javax.faces.context.FacesContext context, java.util.Map<java.lang.String,DataContainer> containers)
Externalizable
.
public static void restoreDataContainers(javax.faces.context.FacesContext context, java.util.Map<java.lang.String,DataContainer> containers, java.lang.Object[] state)
public static java.lang.Object saveObjectState(javax.faces.context.FacesContext context, java.lang.Object object)
public static java.lang.Object restoreObjectState(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object state)
public static java.lang.Object saveStateHolder(javax.faces.context.FacesContext context, javax.faces.component.StateHolder stateHolder)
public static <T extends javax.faces.component.StateHolder> T restoreStateHolder(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object state)
public static void restoreStateHolder(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object state, javax.faces.component.StateHolder recreatedStateHolder)
context
- component
- state
- recreatedStateHolder
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |