org.xnap.cmdl
Interface Command

All Known Implementing Classes:
AbstractBanCommand, AbstractCommand, AbstractIgnoreCommand, AbstractIgnoreUserCommand, AbstractMeCommand, AbstractMessageCommand, AbstractPartChannelCommand, JoinChannelCommand, OpenNapBanListCommand, OpenNapMessageCommand, OpenNapRegisterUserCommand, PircBotMessageCommand

public interface Command

Defines the requirements for classes that provide commands.


Field Summary
static java.lang.String ALIASES
           
static java.lang.String CMD
           
static java.lang.String LONG_HELP
           
static java.lang.String PARAMETER
           
static java.lang.String SHORT_HELP
           
 
Method Summary
 void execute(java.lang.String command, Console console)
          Executes this command with argv parameters.
 java.lang.String[] getAliases()
          Returns a list of aliases that can be used to call this command.
 java.lang.String getCommand()
          Returns a string that represent this command.
 java.lang.String getLongHelp()
          Returns a long help text for this command.
 java.lang.String getParameter()
          Returns a regular expression that describes the expected parameters.
 java.lang.String getShortHelp()
          Returns a short (less than 80 characters) help text for this command.
 

Field Detail

CMD

static final java.lang.String CMD
See Also:
Constant Field Values

LONG_HELP

static final java.lang.String LONG_HELP
See Also:
Constant Field Values

PARAMETER

static final java.lang.String PARAMETER
See Also:
Constant Field Values

SHORT_HELP

static final java.lang.String SHORT_HELP
See Also:
Constant Field Values

ALIASES

static final java.lang.String ALIASES
See Also:
Constant Field Values
Method Detail

execute

void execute(java.lang.String command,
             Console console)
             throws SyntaxException,
                    ParameterException
Executes this command with argv parameters.

Parameters:
command - the command to execute
Throws:
SyntaxException
ParameterException

getAliases

java.lang.String[] getAliases()
Returns a list of aliases that can be used to call this command.


getCommand

java.lang.String getCommand()
Returns a string that represent this command.


getLongHelp

java.lang.String getLongHelp()
Returns a long help text for this command.


getParameter

java.lang.String getParameter()
Returns a regular expression that describes the expected parameters.


getShortHelp

java.lang.String getShortHelp()
Returns a short (less than 80 characters) help text for this command.



Copyright © 2001-2005 XNap Team. All Rights Reserved.