de.bea.domingo.server
Class BaseCommand

java.lang.Object
  extended by de.bea.domingo.server.BaseCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
DomingoServer, ReadDocumentCommand

public abstract class BaseCommand
extends java.lang.Object
implements Command

Base class for implementations of the Command interface.

Author:
Kurt Riede

Constructor Summary
BaseCommand()
           
 
Method Summary
abstract  void execute(DSession session, java.util.Map parameters, java.io.PrintWriter printWriter)
          Executes the command.
protected  java.lang.String getParameterString(java.util.Map parameters, java.lang.String name)
          Reads the string value of a named parameter from a parameters map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseCommand

public BaseCommand()
Method Detail

execute

public abstract void execute(DSession session,
                             java.util.Map parameters,
                             java.io.PrintWriter printWriter)
                      throws DNotesException,
                             java.io.IOException
Executes the command.

Specified by:
execute in interface Command
Parameters:
session - domingo session for execution
parameters - request parameters
printWriter - writer for the response
Throws:
DNotesException - if the command cannot be executed
java.io.IOException - if the response could not be created or completed
See Also:
Command.execute(de.bea.domingo.DSession, java.util.Map, java.io.PrintWriter)

getParameterString

protected final java.lang.String getParameterString(java.util.Map parameters,
                                                    java.lang.String name)
Reads the string value of a named parameter from a parameters map. The parameters map might contain both plain string values or an array of multiple string values. In case of an array of values, only the first value is returned.

Parameters:
parameters - map of parameters
name - parameter name
Returns:
parameter value


Domingo Java-API