|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthenplus.AbstractCommand
henplus.commands.SystemInfoCommand
public final class SystemInfoCommand
Prints out some system information.
Created on: Mar 23, 2004
Field Summary |
---|
Fields inherited from interface henplus.Command |
---|
EXEC_FAILED, SUCCESS, SYNTAX_ERROR |
Constructor Summary | |
---|---|
SystemInfoCommand()
|
Method Summary | |
---|---|
int |
execute(SQLSession session,
String command,
String parameters)
execute the command given. |
String[] |
getCommandList()
returns the prefices of all command-strings this command can handle. |
String |
getLongDescription(String cmd)
returns a longer string describing this action. |
String |
getShortDescription()
return a short string describing the purpose of the commands handled by this Command-implementation. |
String |
getSynopsis(String cmd)
retuns a synopsis-string. |
boolean |
participateInCommandCompletion()
returns 'false', if the commands supported by this Commands should not be part of the toplevel command completion. |
boolean |
requiresValidSession(String cmd)
returns true, if this command requires a valid SQLSession, i.e. |
Methods inherited from class henplus.AbstractCommand |
---|
argumentCount, complete, getOption, getOptions, handleCommandline, isComplete, registerOptions, setOptions, shutdown |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SystemInfoCommand()
Method Detail |
---|
public String[] getCommandList()
Command
public boolean participateInCommandCompletion()
Command
participateInCommandCompletion
in interface Command
participateInCommandCompletion
in class AbstractCommand
public int execute(SQLSession session, String command, String parameters)
Command
Command.isComplete(String)
method, if this command is complete.
session
- the SQLsession this command is executed from.command
- the command as string.parameters
- the rest parameters following the command.
public boolean requiresValidSession(String cmd)
Command
Command.execute(SQLSession,String,String)
method makes use of the
session (e.g. to get some Database connection) or not. Return 'true'
if unsure (you should be sure..). This is to thwart attempts to
execute a command without session.
requiresValidSession
in interface Command
requiresValidSession
in class AbstractCommand
cmd
- the subcommand this is requested for; one of the
commands returned by Command.getCommandList()
.public String getShortDescription()
Command
'describe a database object'
)
Should contain no newline, no leading spaces.
getShortDescription
in interface Command
getShortDescription
in class AbstractCommand
public String getSynopsis(String cmd)
Command
export-xml <table> <filename>
help [command]
Should contain no newline, no leading spaces. This synopsis is printed in the detailed help of a command or if the execute()-method returned a SYNTAX_ERROR.
getSynopsis
in interface Command
getSynopsis
in class AbstractCommand
cmd
- the command the synopsis is for. This is one of the possible
commands returned by Command.getCommandList()
.public String getLongDescription(String cmd)
Command
getLongDescription
in interface Command
getLongDescription
in class AbstractCommand
cmd
- The command the long description is asked for. This
is one of the possible commands returned by
Command.getCommandList()
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |