org.speakright.core
Interface IModelItem

All Known Implementing Classes:
Model.BooleanItem, Model.BooleanItem, Model.IntItem, Model.IntItem, Model.StringItem, Model.StringItem, ModelItemBase, SRODateItem, SROOrdinalItem, SROStringItem, SROSubjectItem, TestListNavigator.MyFlightItem, TestRender.MyItem

public interface IModelItem

Each model value is a class that implements IModelItem.

Author:
Ian Rae

Method Summary
 void clear()
          clear the value back to its default, and clear the 'set' flag.
 IItemFormatter getFormatter()
          get the current formatter for rendering this item into a prompt.
 boolean isSet()
          Has the item be set (via the set method).
 java.lang.Object rawValue()
          get raw value as object.
 void setFormatter(IItemFormatter formatter)
          Set the formatter of this item.
 

Method Detail

rawValue

java.lang.Object rawValue()
get raw value as object. (for internal use)

Returns:

clear

void clear()
clear the value back to its default, and clear the 'set' flag.


isSet

boolean isSet()
Has the item be set (via the set method). Some dialog flows need to keep iterating until a model item has been set (through user input and binding).

Returns:
whether the item has been set.

getFormatter

IItemFormatter getFormatter()
get the current formatter for rendering this item into a prompt. Items must initialize themselves with a default renderer (which may simply return toString)

Returns:

setFormatter

void setFormatter(IItemFormatter formatter)
Set the formatter of this item.

Parameters:
formatter - A formatter.