be.SIRAPRISE.client
Class ServerCommand

java.lang.Object
  extended by be.SIRAPRISE.client.ServerCommand
Direct Known Subclasses:
ServerAssignmentCommand, ServerNonAssignmentCommand

public abstract class ServerCommand
extends java.lang.Object

A ServerCommand is any command that can get sent to the SIRA_PRISE server

Author:
Erwin

Constructor Summary
ServerCommand()
           
 
Method Summary
static ServerCommand getCommandObjectFor(java.lang.String commandName, java.lang.String commandContent)
          Factory method for obtaining command objects, given a command name and the corresponding command options in texutal format
static ServerCommand getCommandObjectFrom(java.lang.String commandText)
          Factory method for obtaining command objects, given a fulltext command such as "ASSERT R,R(...)" or "CMD(...)CMD(...)"
abstract  java.lang.String getCommandParametersText()
          Gets the full textual representation of the command's parameters
abstract  java.lang.String getFullCommandText()
          Gets the full textual representation of the command
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerCommand

public ServerCommand()
Method Detail

getCommandObjectFor

public static ServerCommand getCommandObjectFor(java.lang.String commandName,
                                                java.lang.String commandContent)
                                         throws NotFoundException,
                                                IllegalServerCommandException
Factory method for obtaining command objects, given a command name and the corresponding command options in texutal format

Parameters:
commandName - The name, or alias, of the command
commandContent - The command options to be represented in the returned ServerCommand object
Returns:
A ServerCommand object representing the given commandText
Throws:
NotFoundException
IllegalServerCommandException

getCommandObjectFrom

public static ServerCommand getCommandObjectFrom(java.lang.String commandText)
                                          throws NotFoundException,
                                                 IllegalServerCommandException
Factory method for obtaining command objects, given a fulltext command such as "ASSERT R,R(...)" or "CMD(...)CMD(...)"

Parameters:
commandText - A complete SIRA_PRISE command
Returns:
A ServerCommand object representing the given commandText
Throws:
NotFoundException
IllegalServerCommandException

getFullCommandText

public abstract java.lang.String getFullCommandText()
Gets the full textual representation of the command

Returns:
the full textual representation of the command

getCommandParametersText

public abstract java.lang.String getCommandParametersText()
Gets the full textual representation of the command's parameters

Returns:
the full textual representation of the command's parameters

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object