|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.module.gui.html.StateManager
public class StateManager
The StateManager class maintains a list of EditStates for users logged on to MMBase through SCAN. It provides the states so a user can browse the SCAN editors and edit objects, letting the server remember the change history. Changes to the state are made either by calling a replace ($MOD) command, or by processing parameters passed to a SCAN page. State info (such as the current editnode number) can be retrieved using $MOD.
| Field Summary | |
|---|---|
(package private) Hashtable<String,EditState> |
editStates
Username to EditState mappings. |
MMBase |
mmBase
Reference to the MMBase module. |
| Constructor Summary | |
|---|---|
StateManager(MMBase mmBase)
Initialises the StateManager, by creating a new (empty) map of editstates. |
|
| Method Summary | |
|---|---|
(package private) String |
createSelectionQuery(Hashtable<String,Object> skeys,
MMObjectBuilder bul)
|
EditState |
getEditState(String user)
Retrieves the EditState for a user, or creates a new one if the user did not yet have an EditState assigned. |
List<String> |
getList(PageInfo sp,
StringTagger args,
StringTokenizer command)
List commands |
Vector |
getOpenBuilders(EditState state,
StringTagger args)
|
EditState |
getState(String user)
Retrieves the EditState for a user, or creates a new one if the user did not yet have an EditState assigned. |
(package private) void |
initLink(String user,
String objectType)
a new relation has been initiated and the EditState for the specific user is updated. |
void |
initUserStates()
Loads all previously persistified editstates from the database. |
(package private) boolean |
newInsNode(EditState ed,
String userName,
StringTokenizer tok)
Creates a new Node, depending on the builder name (or relation name) specified in the StringTokenizer. |
boolean |
process(PageInfo sp,
StringTokenizer command,
Hashtable cmds,
Hashtable vars)
The hook that passes all form related pages to the correct handler |
String |
replace(PageInfo sp,
StringTokenizer commands)
Handle a $MOD command. |
(package private) boolean |
setSearchValues(EditState ed,
Hashtable vars)
setSearchVals |
(package private) void |
updateEditField(String user,
String fieldName)
A field has been selected to edit and the EditState for the specific user is updated. |
(package private) void |
updateSelectedObject(String user,
String objectID)
An object has been selected and the EditState of the specific user is updated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public MMBase mmBase
Hashtable<String,EditState> editStates
| Constructor Detail |
|---|
public StateManager(MMBase mmBase)
mmBase - reference to the MMBase module| Method Detail |
|---|
public void initUserStates()
public EditState getEditState(String user)
user - the user for which to retrieve an EditState object
public String replace(PageInfo sp,
StringTokenizer commands)
replace in interface CommandHandlerInterface
boolean newInsNode(EditState ed,
String userName,
StringTokenizer tok)
ed - Editstate in which to add the new node.userName - User who becomes owner of the new nodetok - Tokens used to configure the node. The next three tokens should be:
boolean setSearchValues(EditState ed,
Hashtable vars)
String createSelectionQuery(Hashtable<String,Object> skeys,
MMObjectBuilder bul)
void updateSelectedObject(String user,
String objectID)
void updateEditField(String user,
String fieldName)
void initLink(String user,
String objectType)
public List<String> getList(PageInfo sp,
StringTagger args,
StringTokenizer command)
throws ParseException
getList in interface CommandHandlerInterfaceParseException
public boolean process(PageInfo sp,
StringTokenizer command,
Hashtable cmds,
Hashtable vars)
process in interface CommandHandlerInterface
public Vector getOpenBuilders(EditState state,
StringTagger args)
public EditState getState(String user)
user - the user for which to retrieve an EditState object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||