uk.org.ogsadai.activity.xmldb.commands
Interface Command

All Known Implementing Classes:
CreateCollectionCommand, CreateResourceCommand, ListCollectionsCommand, ListResourcesCommand, RemoveCollectionCommand, RemoveResourceCommand

public interface Command

A Command performs some kind of operation using the contents of a CommandContext.

Author:
The OGSA-DAI Project Team

Method Summary
 void execute(CommandContext context)
          Executes this command using the specified context.
 void initialise(org.w3c.dom.Element element)
          Initialises this command by parsing the specified Element.
 

Method Detail

initialise

public void initialise(org.w3c.dom.Element element)
                throws CommonUserException
Initialises this command by parsing the specified Element. The details retrieved may determine the behavior of the execute method.

Parameters:
element - The Element that corresponds to this command.
Throws:
CommonUserException - If there is a poblem parsing element.

execute

public void execute(CommandContext context)
             throws CommonUserException,
                    CommonSystemException
Executes this command using the specified context. Any output that is generated is written to the default output contained in the context.

Parameters:
context - An CommandContext object from which the current collection, the default output and any inputs can be retrieved.
Throws:
CommonSystemException - If there is a system problem executing the command.
CommonUserException - If there is a user problem.