org.mmbase.applications.editwizard
Class WizardCommand
java.lang.Object
|
+--org.mmbase.applications.editwizard.WizardCommand
- public class WizardCommand
- extends java.lang.Object
The wizardcommands are used to store information received from the clients about commands.
Eg.: add-item, delete commands are stored here.
- Since:
- MMBase-1.6
- Version:
- $Id: WizardCommand.java,v 1.10.2.1 2003/08/08 08:13:40 michiel Exp $
- Author:
- Kars Veling, Pierre van Rooden
|
Constructor Summary |
WizardCommand(java.lang.String acommand,
java.lang.String avalue)
Creates a wizard command object with the given command and value. |
|
Method Summary |
java.lang.String |
getDid()
Returns the 'did' (data id) parameter of the parsed command. |
java.lang.String |
getFid()
Returns the 'fid' (field id) parameter of the parsed command. |
java.lang.String |
getParameter(int i)
Returns the parameter with the indicated index of the parsed command. |
int |
getType()
Returns the type of the parsed command. |
java.lang.String |
getValue()
Returns the value passed to the parsed command. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UNKNOWN_COMMAND
public static final short UNKNOWN_COMMAND
ADD_ITEM
public static final short ADD_ITEM
CANCEL
public static final short CANCEL
COMMIT
public static final short COMMIT
DELETE_ITEM
public static final short DELETE_ITEM
GOTO_FORM
public static final short GOTO_FORM
MOVE_DOWN
public static final short MOVE_DOWN
MOVE_UP
public static final short MOVE_UP
START_WIZARD
public static final short START_WIZARD
UPDATE_ITEM
public static final short UPDATE_ITEM
WizardCommand
public WizardCommand(java.lang.String acommand,
java.lang.String avalue)
- Creates a wizard command object with the given command and value.
The command parsed should be of the format:
cmd/type/fid/did/otherdid/
'type' is the command itself (i.e. 'add-item'), fid, did, and otherdid are possible
parameters to the command.
- Parameters:
command - The full commandavalue - The value of the command
getType
public int getType()
- Returns the type of the parsed command.
- Returns:
- one of the WizardCommand constants, or UNKNOWN_COMMAND if the type cannot be determined
getValue
public java.lang.String getValue()
- Returns the value passed to the parsed command.
- Returns:
- the value as a string
getParameter
public java.lang.String getParameter(int i)
- Returns the parameter with the indicated index of the parsed command.
- Returns:
- teh parameter as string, or an empty string if it doesn't exist.
getFid
public java.lang.String getFid()
- Returns the 'fid' (field id) parameter of the parsed command.
This is always the parameter with index 0
- Returns:
- the fid as string, or an empty string if it doesn't exist.
getDid
public java.lang.String getDid()
- Returns the 'did' (data id) parameter of the parsed command.
This is always the parameter with index 1
- Returns:
- the did as string, or an empty string if it doesn't exist.
MMBase build 1.6.5.20030923