Package org.sakaiproject.cheftool
Class ControllerState
- java.lang.Object
-
- org.sakaiproject.cheftool.ControllerState
-
- All Implemented Interfaces:
Observer
public abstract class ControllerState extends Object implements Observer
ControllerState is the core base class for the CHEF Tool's state objects.
State objects are used to store controller state for a tool. Specific state object implement this interface.
To support creation of controller state objects, make sure to supply a void constructor.
To support pooling of objects, implement the recycle() method to release any resources and restore the object to initial conditions before reuse.
-
-
Constructor Summary
Constructors Constructor Description ControllerState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetId()StringgetKey()Access a unique key for this state, combining the set id and the state id.StringgetSetId()protected voidinit()Init to startup valuesvoidrecycle()Release any resources and restore the object to initial conditions to be reused.voidsetId(String id)voidsetSetId(String id)voidupdate(Observable o, Object arg)This method is called whenever the observed object is changed.
-
-
-
Method Detail
-
init
protected void init()
Init to startup values
-
recycle
public void recycle()
Release any resources and restore the object to initial conditions to be reused.
-
getId
public String getId()
-
setId
public void setId(String id)
-
getSetId
public String getSetId()
-
setSetId
public void setSetId(String id)
-
getKey
public String getKey()
Access a unique key for this state, combining the set id and the state id.- Returns:
- A unique key for this state, combining the set id and the state id.
-
update
public void update(Observable o, Object arg)
This method is called whenever the observed object is changed. An application calls an Observable object'snotifyObserversmethod to have all the object's observers notified of the change. default implementation is to cause the courier service to deliver to the interface controlled by my controller. Extensions can override.
-
-