|
EchoPoint 2.1.0rc4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
HistoryState
is a interface that represents an application state at a
given point of time.
The objects that implement this interface will typically contain state information that allows an application to go backwards (ie undo some actions) and go forwards (ie redo some actions).
HistoryMonitor
,
HistoryEvent
,
HistoryEventListener
Method Summary | |
java.lang.String |
historyHash()
This is a unique history hash value that can be used to uniquely identify
this particular slice of application state. |
Method Detail |
public java.lang.String historyHash()
history hash
value that can be used to uniquely identify
this particular slice of application state. This method should follow the same semantics
as Object.hashCode()
especially in regards to how it acts when used as the
key of a java.util.Map
.
The value used be will be display to the user on their browser as indication of where they are inside the application. Therefore there are some size contrictions on the length of this string which is the maximum size of a URL parameter in the users browser. To be safe use fairly compact strings (< 256 chars say)
This is method is defined as a String to allow more meaningful state to be displayed and also to allow possible "encoding" of application state in the hashCode itself.
The most trivial implementation fo this method would be
public String historyHash() { return String.valueOf(this.hashCode()); }
A more human friendly implementation might be something like this
public String historyHash() { return whatAreWeDoing + "-" + System.identityHashCode(new Object()); }
|
EchoPoint 2.1.0rc4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |