org.barracudamvc.plankton.data
Interface StateMap

All Known Subinterfaces:
BaseEvent, ControlEventContext, EventContext, FormMap, PData, PList, PMap, ViewContext, ViewEventContext
All Known Implementing Classes:
AbstractBComponent, AbstractPData, ActionEvent, BAction, BComponent, BImage, BInput, BLabel, BLink, BList, BScript, BScriptResource, BSelect, BTable, BTemplate, BText, BToggleButton, CancelLongRunningEvent, CheckLongRunningEvent, ControlEvent, DefaultBaseEvent, DefaultEventContext, DefaultFormMap, DefaultStateMap, DefaultViewContext, ErrorFormMap, FilterContext, HttpRequestEvent, HttpResponseEvent, HttpSessionStateMap, LongRunningEvent, MapStateMap, ObjectRepository, ObjectRepository.SessionRepository, PArrayList, PHashMap, RenderLongRunningEvent, RenderPage, RepopulationFormMap, ServletContextStateMap, ServletRequestParameterStateMap, ServletRequestStateMap, ViewEvent, XmlFormMap

public interface StateMap

This interface defines the methods needed to implement state in an object. By this we mean that an object is capable of carrying state information along with it--you can put properties into the state and then get them back out.

Key entities that implement StateMap:


Method Summary
 void clearState()
          clear all state information
 Object getState(Object key)
          get a property in this StateMap
 Set getStateKeys()
          get a keyset for this StateMap (whether or not the set is backed by the data store depends on the implementation)
 Map getStateStore()
          get a Map that holds the state values (whether or not the Map is backed by the data store depends on the implementation)
 void putState(Object key, Object val)
          set a property in this StateMap
 Object removeState(Object key)
          remove a property in this StateMap
 

Method Detail

putState

void putState(Object key,
              Object val)
set a property in this StateMap

Parameters:
key - the key object
val - the value object

getState

Object getState(Object key)
get a property in this StateMap

Parameters:
key - the key object
Returns:
the value for the given key

removeState

Object removeState(Object key)
remove a property in this StateMap

Parameters:
key - the key object
Returns:
the object which was removed

getStateKeys

Set getStateKeys()
get a keyset for this StateMap (whether or not the set is backed by the data store depends on the implementation)

Returns:
a Set of keys for this StateMap

getStateStore

Map getStateStore()
get a Map that holds the state values (whether or not the Map is backed by the data store depends on the implementation)

Returns:
a Map of key/val pairs for this StateMap

clearState

void clearState()
clear all state information



Copyright © 2006 BarracudaMVC.org All Rights Reserved.