Framework Professional Edition Package


com.prosyst.util.pcommands
Interface PluggableCommands


public interface PluggableCommands

This interface should be used for installing new commands in the com.prosyst.util.parser.ParserService. Its implementation must be responsible to the execution of the commands and to return a suitable string representation of the execution of the command. Each implementation must have a simple alias without any separators. All the PluggableCommands should be registered in the framework as services. The Parser Service listens for registering/unregistering of these kind of services and adds/removes them runtime.

Author:
Daniel Janev
See Also:
ParserService

Method Summary
 void executeCommand(java.lang.String command, java.lang.String[] params, java.io.PrintStream writer)
          Executes the specified command according to the specified command options and parameters.
 CommandInfo[] getCommandsInfo()
          This method should return the information about the commands which are supported by this PluggableCommands.
 java.lang.String getGroupHelpMessage()
          Returns the help message for this commands group.
 java.lang.String getGroupName()
          Returns the name of the commands group.
 

Method Detail

getGroupName

java.lang.String getGroupName()
Returns the name of the commands group.

Returns:
the specified group name.

getGroupHelpMessage

java.lang.String getGroupHelpMessage()
Returns the help message for this commands group.

Returns:
the specified help message.

executeCommand

void executeCommand(java.lang.String command,
                    java.lang.String[] params,
                    java.io.PrintStream writer)
Executes the specified command according to the specified command options and parameters. Each implementation is responsible to the right execution of the command. The command name are case sensitive.

Parameters:
command - the name of the command for executing.
params - the command parameters and options array.
writer - the output for the command result message.

getCommandsInfo

CommandInfo[] getCommandsInfo()
This method should return the information about the commands which are supported by this PluggableCommands. This information should be used by the com.prosyst.util.parser.ParserService for the help information of this commands group.

Returns:
the information about the commands which are supported by this PluggableCommands.
See Also:
ParserService

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved