|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dsrg.sofa.cushion.ExecuteScriptAction
public class ExecuteScriptAction
Execute a script action.
This class represent an action which execute a list of action stored in a simple text file.
The action has only one parameter which is a name of a text file. The file contains on each line one cushion action with its parameters.
An example of script file:
new interface initial a.b.c.Log commit compile upload deploy a.b.c.DeplPlan
Field Summary |
---|
Fields inherited from interface org.objectweb.dsrg.sofa.cushion.ActionInterface |
---|
ACTION_ERROR, BAD_PARAMETERS, NOT_ENOUGH_PARAMETERS, SUCCESS, TOO_MANY_PARAMETERS |
Constructor Summary | |
---|---|
ExecuteScriptAction()
|
Method Summary | |
---|---|
protected int |
executeAction(java.lang.String line,
java.io.PrintStream out)
Execute a given action. |
protected int |
executeScript(java.io.File scriptFile,
java.io.PrintStream out)
Execute a given script file. |
int |
perform(java.lang.String[] argv,
java.io.PrintStream out)
Performs the action. |
void |
printHelp(java.lang.StringBuffer msg)
Prints help. |
void |
printUsage(java.lang.StringBuffer msg)
Prints usage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExecuteScriptAction()
Method Detail |
---|
public int perform(java.lang.String[] argv, java.io.PrintStream out)
perform
in interface ActionInterface
argv
- parametersout
- output stream used by the actionprotected int executeScript(java.io.File scriptFile, java.io.PrintStream out) throws java.io.IOException
scriptFile
- file containing a list of cushion actions (one action per line)out
- output stream where messages will be printed
java.io.IOException
- if the file cannot be opened/readprotected int executeAction(java.lang.String line, java.io.PrintStream out)
line
- String representation of cushion actionout
- output stream
public void printHelp(java.lang.StringBuffer msg)
printHelp
in interface ActionInterface
msg
- buffer to which help message is printedActionInterface.printHelp(StringBuffer)
public void printUsage(java.lang.StringBuffer msg)
printUsage
in interface ActionInterface
msg
- buffer to which help message is printedActionInterface.printUsage(StringBuffer)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |