com.fruitioninc.jwc
Interface StateManager

All Known Implementing Classes:
DefaultStateManager, TableStateManager

public interface StateManager

Moves state in and out of a component.


Method Summary
 void getProperties(Memento state, Component component)
          Add the state of a component to a Memento object.
 java.lang.String[] marshall(Component component, java.lang.String name, java.lang.Object value)
          Converts an value from a model to a string representation.
 void setProperty(Component component, java.lang.String name, java.lang.String[] values)
          Set a property on a component.
 java.lang.Object unmarshall(Component component, java.lang.String name, java.lang.String[] values)
          Converts an array of strings to an appropriate object for a components model.
 

Method Detail

getProperties

public void getProperties(Memento state,
                          Component component)
Add the state of a component to a Memento object.


setProperty

public void setProperty(Component component,
                        java.lang.String name,
                        java.lang.String[] values)
Set a property on a component.


unmarshall

public java.lang.Object unmarshall(Component component,
                                   java.lang.String name,
                                   java.lang.String[] values)
Converts an array of strings to an appropriate object for a components model.

Parameters:
component - the component the values are being converted for
name - the name of the field on the component's model that the values are for
values - the array of strings to convert

marshall

public java.lang.String[] marshall(Component component,
                                   java.lang.String name,
                                   java.lang.Object value)
Converts an value from a model to a string representation.

Parameters:
component - the component the value is being converted for
name - the name of the field on the component's model that the value is from
value - the value to convert