public class StateManager extends Object implements CommandHandlerInterface
| Modifier and Type | Field and Description |
|---|---|
(package private) Hashtable<String,EditState> |
editStates
Username to EditState mappings.
|
MMBase |
mmBase
Reference to the MMBase module.
|
| Constructor and Description |
|---|
StateManager(MMBase mmBase)
Initialises the StateManager, by creating a new (empty) map of editstates.
|
| Modifier and Type | Method and Description |
|---|---|
(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.
|
public MMBase mmBase
public StateManager(MMBase mmBase)
mmBase - reference to the MMBase modulepublic void initUserStates()
public EditState getEditState(String user)
user - the user for which to retrieve an EditState objectpublic String replace(PageInfo sp, StringTokenizer commands)
replace in interface CommandHandlerInterfaceboolean 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:
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 CommandHandlerInterfaceParseExceptionpublic boolean process(PageInfo sp, StringTokenizer command, Hashtable cmds, Hashtable vars)
process in interface CommandHandlerInterfacepublic Vector getOpenBuilders(EditState state, StringTagger args)
public EditState getState(String user)
user - the user for which to retrieve an EditState objectMMBase 1.9-SNAPSHOT - ${javadoctimestamp}