|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javawebparts.misc.chain.Result
This class is returned by a Command or Chain. It can be returned by any of the three methds in the Command interface, and can optionally include additional information for the callers' use.
Field Summary | |
static int |
ABORT
This value is returned by a Command when the Chain should be stopped due to an expected logical reason, and it is also returned by a Chain when any Command returns this value. |
private int |
code
The result of the Command execution. |
private java.lang.String |
extraInfo
This is arbitrary extra information that a Command can return for the callers' use. |
static int |
FAIL
This value is returned by a Command when the Chain should be stopped due to an unexpected failure reason, and it is also returned by a Chain when any Command returns this value. |
static int |
JUMP_TO_COMMAND
This value is returned by a Command when the Chain should jump to a named Command. |
static int |
REDO_COMMAND
This value is returned by a Command when the Command should execute again. |
static int |
RESTART_CHAIN
This value is returned by a Command when the Chain should be restarted. |
static int |
SUCCESS
This value is returned by a Command to indicate the Chain should continue, and it is also returned by a Chain when it completes successfully. |
private java.lang.String |
targetCommand
A command ID to be returned along with the result code. |
Constructor Summary | |
Result(int inCode)
Construct a Result with the given result code and no additional information. |
|
Result(int inCode,
java.lang.String inExtraInfo)
Construct a Result with the given result code and one piece of additional information. |
|
Result(int inCode,
java.lang.String inExtraInfo,
java.lang.String inTargetCommand)
Construct a Result with the given result code and one piece of additional information and a target Command to jump to or call. |
Method Summary | |
int |
getCode()
Gets the result code stored in this Result. |
java.lang.String |
getExtraInfo()
Gets the extra info stored in this Result. |
java.lang.String |
getTargetCommand()
Gets the target Command to be stored in this Result. |
void |
setCode(int inCode)
Sets the result code of this Resule. |
void |
setExtraInfo(java.lang.String inExtraInfo)
Sets the extra info stored in this Result. |
void |
setTargetCommand(java.lang.String inTargetCommand)
Sets the target Command stored in this Result. |
java.lang.String |
toString()
Overridden toString method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int SUCCESS
public static final int FAIL
public static final int ABORT
public static final int RESTART_CHAIN
public static final int REDO_COMMAND
public static final int JUMP_TO_COMMAND
private int code
private java.lang.String targetCommand
private java.lang.String extraInfo
Constructor Detail |
public Result(int inCode)
inCode
- The result code to be stored in this Result.public Result(int inCode, java.lang.String inExtraInfo)
inCode
- The result code to be stored in this Result.inExtraInfo
- The extra info to be stored in this Result.public Result(int inCode, java.lang.String inExtraInfo, java.lang.String inTargetCommand)
inCode
- The result code to be stored in this Result.inExtraInfo
- The extra info to be stored in this Result.inTargetCommand
- The target Command to be stored in this Result.Method Detail |
public void setCode(int inCode)
inCode
- The result code to be stored in this Result.public int getCode()
public void setExtraInfo(java.lang.String inExtraInfo)
inExtraInfo
- The extra info to be stored in this Result.public java.lang.String getExtraInfo()
public void setTargetCommand(java.lang.String inTargetCommand)
inTargetCommand
- The target command to be stored in this Result.public java.lang.String getTargetCommand()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |