Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.richfaces
Class PartialStateHolderHelper

    java.lang.Object
      org.richfaces.PartialStateHolderHelper

All Implemented Interfaces:
  javax.faces.component.StateHelper, javax.faces.component.StateHolder

    public class PartialStateHolderHelper

extends java.lang.Object
implements javax.faces.component.StateHelper

Since:
  Feb 2, 2010 A base implementation for maps which implement the PartialStateHolder interface.

  This can be used as a base-class for all state-holder implementations in components, converters and validators and other implementations of the StateHolder interface.
Author:
  akolonitsky

Constructor Summary
`PartialStateHolderHelper(javax.faces.component.PartialStateHolder stateHolder)`

Method Summary
`void` | `add(java.io.Serializable key, java.lang.Object value)`
`java.lang.Object` | `eval(java.io.Serializable key)`
`java.lang.Object` | `eval(java.io.Serializable key, java.lang.Object defaultValue)`
`java.lang.Object` | `get(java.io.Serializable key)` Get the object from the main-map.
`protected java.lang.Object` | `getValueExpressionValue(java.lang.String name)`
`boolean` | `isTransient()`
`java.lang.Object` | `put(java.io.Serializable key, java.lang.Object value)` Put the object in the main-map and/or the delta-map, if necessary.
`java.lang.Object` | `put(java.io.Serializable key, java.lang.String mapKey, java.lang.Object value)`
`java.lang.Object` | `remove(java.io.Serializable key)` We need to remove from both maps, if we do remove an existing key.
`java.lang.Object` | `remove(java.io.Serializable key, java.lang.Object valueOrKey)`
`void` | `restoreState(javax.faces.context.FacesContext context, java.lang.Object state)` One and only implementation of restore state.
`java.lang.Object` | `saveState(javax.faces.context.FacesContext context)` One and only implementation of save-state - makes all other implementations unnecessary.
`void` | `setTransient(boolean newTransientValue)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PartialStateHolderHelper

    public PartialStateHolderHelper(javax.faces.component.PartialStateHolder stateHolder)

Method Detail

### put

    public java.lang.Object put(java.io.Serializable key,
                                java.lang.Object value)

  Put the object in the main-map and/or the delta-map, if necessary.

  Specified by:
    `put` in interface `javax.faces.component.StateHelper`
  Parameters:
    `key` -
    `value` -
  Returns:
    the original value in the delta-map, if not present, the old value in the main map

### remove

    public java.lang.Object remove(java.io.Serializable key)

  We need to remove from both maps, if we do remove an existing key.

  Specified by:
    `remove` in interface `javax.faces.component.StateHelper`
  Parameters:
    `key` -
  Returns:
    the removed object in the delta-map. if not present, the removed object from the main map

### put

    public java.lang.Object put(java.io.Serializable key,
                                java.lang.String mapKey,
                                java.lang.Object value)

  Specified by:
    `put` in interface `javax.faces.component.StateHelper`
  See Also:
    `StateHelper.put(java.io.Serializable, String, Object)`

### get

    public java.lang.Object get(java.io.Serializable key)

  Get the object from the main-map. As everything is written through from the delta-map to the main-map, this should be enough.

  Specified by:
    `get` in interface `javax.faces.component.StateHelper`
  Parameters:
    `key` -
  Returns:

### eval

    public java.lang.Object eval(java.io.Serializable key)

  Specified by:
    `eval` in interface `javax.faces.component.StateHelper`
  See Also:
    `StateHelper.eval(java.io.Serializable)`

### eval

    public java.lang.Object eval(java.io.Serializable key,
                                 java.lang.Object defaultValue)

  Specified by:
    `eval` in interface `javax.faces.component.StateHelper`
  See Also:
    `StateHelper.eval(java.io.Serializable, Object)`

### getValueExpressionValue

    protected java.lang.Object getValueExpressionValue(java.lang.String name)

### add

    public void add(java.io.Serializable key,
                    java.lang.Object value)

  Specified by:
    `add` in interface `javax.faces.component.StateHelper`
  See Also:
    `StateHelper.add(java.io.Serializable, Object)`

### remove

    public java.lang.Object remove(java.io.Serializable key,
                                   java.lang.Object valueOrKey)

  Specified by:
    `remove` in interface `javax.faces.component.StateHelper`
  See Also:
    `StateHelper.remove(java.io.Serializable, Object)`

### saveState

    public java.lang.Object saveState(javax.faces.context.FacesContext context)

  One and only implementation of save-state - makes all other implementations unnecessary.

  Specified by:
    `saveState` in interface `javax.faces.component.StateHolder`
  Parameters:
    `context` -
  Returns:
    the saved state

### restoreState

    public void restoreState(javax.faces.context.FacesContext context,
                             java.lang.Object state)

  One and only implementation of restore state. Makes all other implementations unnecessary.

  Specified by:
    `restoreState` in interface `javax.faces.component.StateHolder`
  Parameters:
    `context` - FacesContext
    `state` - the state to be restored.

### isTransient

    public boolean isTransient()

  Specified by:
    `isTransient` in interface `javax.faces.component.StateHolder`
  See Also:
    `StateHolder.isTransient()`

### setTransient

    public void setTransient(boolean newTransientValue)

  Specified by:
    `setTransient` in interface `javax.faces.component.StateHolder`
  See Also:
    `StateHolder.setTransient(boolean)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.