|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ActionInterface
Interface for Cushion actions. When Cushion is invoked it performs an action that is given as the first command-line parameter. These actions comprise 'help', 'new', 'commit', 'checkout', etc. Each action represented by a class implementing this interface. Actions also have to be registered in action-register.xml located in package org.objectweb.dsrg.sofa.cushion.actionreg.
Field Summary | |
---|---|
static int |
ACTION_ERROR
Return value of perform(String[], java.io.PrintStream)
indicating error during action performing. |
static int |
BAD_PARAMETERS
Return value of perform(String[], java.io.PrintStream)
indicating invalid parameters. |
static int |
NOT_ENOUGH_PARAMETERS
Return value of perform(String[], java.io.PrintStream)
indicating lack of parameters. |
static int |
SUCCESS
Return value of perform(String[], java.io.PrintStream)
indicating success. |
static int |
TOO_MANY_PARAMETERS
Return value of perform(String[], java.io.PrintStream)
indicating too many parameters supplied. |
Method Summary | |
---|---|
int |
perform(java.lang.String[] args,
java.io.PrintStream out)
Executes the action. |
void |
printHelp(java.lang.StringBuffer msg)
Gives a help message. |
void |
printUsage(java.lang.StringBuffer msg)
Gives an usage message. |
Field Detail |
---|
static final int NOT_ENOUGH_PARAMETERS
perform(String[], java.io.PrintStream)
indicating lack of parameters.
static final int TOO_MANY_PARAMETERS
perform(String[], java.io.PrintStream)
indicating too many parameters supplied.
static final int BAD_PARAMETERS
perform(String[], java.io.PrintStream)
indicating invalid parameters.
static final int ACTION_ERROR
perform(String[], java.io.PrintStream)
indicating error during action performing.
static final int SUCCESS
perform(String[], java.io.PrintStream)
indicating success.
Method Detail |
---|
void printHelp(java.lang.StringBuffer msg)
The method is used by action 'help'.
msg
- Contains the help message after the invocation of the method.void printUsage(java.lang.StringBuffer msg)
The method is when insufficient parameters were supplied,
which is indicated by return value
NOT_ENOUGH_PARAMETERS
,
TOO_MANY_PARAMETERS
or BAD_PARAMETERS
.
msg
- Contains the help message after the invocation of the method.int perform(java.lang.String[] args, java.io.PrintStream out)
args
- Command-line arguments to Cushion (except the first one containing the action name).out
- std output for the task
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |