|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.uniba.wiai.lspi.util.console.Command
public abstract class Command
| Constructor Summary | |
|---|---|
Command(java.lang.Object[] toCommand,
java.io.PrintStream out)
Creates a new instance of Command. |
|
| Method Summary | |
|---|---|
void |
addParameter(java.lang.String paramName,
java.lang.String paramValue)
Add a command line parameter. |
abstract void |
exec()
To be overwritten by subclasses for command execution. |
void |
execute()
Executes the command. |
abstract java.lang.String |
getCommandName()
Return the name of the command. |
abstract void |
printOutHelp()
To be overwritten. |
void |
setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
Set the parameters for the Command. |
void |
setPrintStream(java.io.PrintStream out)
Set the PrintStream, to that this command prints its
output. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Command(java.lang.Object[] toCommand,
java.io.PrintStream out)
out - The java.io.PrintStream to that the command's output is
printed.toCommand - The instance to execute the command on.| Method Detail |
|---|
public void setPrintStream(java.io.PrintStream out)
PrintStream, to that this command prints its
output.
out - The PrintStream.
public final void addParameter(java.lang.String paramName,
java.lang.String paramValue)
paramName - The parameters name. Cannot contain spaces.paramValue - The parameters value. Cannot contain spaces.
public final void execute()
throws ConsoleException
ConsoleException - Exception during execution of command.
public abstract void exec()
throws ConsoleException
ConsoleException - Exception during execution.public abstract void printOutHelp()
public abstract java.lang.String getCommandName()
exit.public void setParameters(java.util.Map<java.lang.String,java.lang.String> parameters)
parameters - Hashtable containing the parameter names as keys and the
parameter values as values. Both represented as Strings. Both
must not contain spaces.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||