org.globus.cog.gridshell.commands.taskcommands
Class AbstractDirCommand

java.lang.Object
  extended byorg.globus.cog.gridshell.commands.AbstractCommand
      extended byorg.globus.cog.gridshell.commands.AbstractShellCommand
          extended byorg.globus.cog.gridshell.commands.taskcommands.AbstractTaskCommand
              extended byorg.globus.cog.gridshell.commands.taskcommands.AbstractDirCommand
All Implemented Interfaces:
Command, Comparable, EventListener, PropertyChangeListener, PropertyChangeNotifier, Runnable, StatusListener
Direct Known Subclasses:
Cd, IsDirectory, Mkdir, Rmdir, Rmfile

public abstract class AbstractDirCommand
extends AbstractTaskCommand

An abstract command that supports tasks with directory as argument


Field Summary
 
Fields inherited from class org.globus.cog.gridshell.commands.taskcommands.AbstractTaskCommand
bufferedResult
 
Fields inherited from class org.globus.cog.gridshell.commands.AbstractShellCommand
getopt
 
Fields inherited from class org.globus.cog.gridshell.commands.AbstractCommand
PROPERTY_STATUS_CODE
 
Constructor Summary
AbstractDirCommand()
           
 
Method Summary
abstract  AbstractFileOperationTask createDirTask(StartTask connection, String dir)
          Creates the "dir" task associated with the command
 GetOpt createGetOpt(Scope scope)
          Returns the GetOpt object used to parse and validate this command
 Object execute()
          Executes this command
 Object getTaskOutput()
          Gets the output for this command, allows the command to format the output (ie the ls command)
 
Methods inherited from class org.globus.cog.gridshell.commands.taskcommands.AbstractTaskCommand
addTask, appendResult, destroy, getConnection, getConnectionManager, getTask, getTaskGraph, propertyChange, setTask, statusChanged
 
Methods inherited from class org.globus.cog.gridshell.commands.AbstractShellCommand
createAbstractShellCommand, getCredentials, getGetOpt, getGridShell, getGsh, init, kill, resume, run, suspend, toString
 
Methods inherited from class org.globus.cog.gridshell.commands.AbstractCommand
addPropertyChangeListener, addPropertyChangeListener, arrayToMap, compareTo, getIdentity, getParent, getResult, getScope, getStatus, removePropertyChangeListener, setResult, setStatusCode, setStatusCompleted, setStatusFailed, setStatusFailed, unsupported
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractDirCommand

public AbstractDirCommand()
Method Detail

createDirTask

public abstract AbstractFileOperationTask createDirTask(StartTask connection,
                                                        String dir)
                                                 throws InvalidProviderException,
                                                        ProviderMethodException
Creates the "dir" task associated with the command

Parameters:
connection -
dir -
Returns:
Throws:
InvalidProviderException
ProviderMethodException

createGetOpt

public GetOpt createGetOpt(Scope scope)
Description copied from class: AbstractShellCommand
Returns the GetOpt object used to parse and validate this command

Specified by:
createGetOpt in class AbstractShellCommand
Parameters:
scope -
Returns:

execute

public Object execute()
               throws Exception
Description copied from interface: Command
Executes this command

Specified by:
execute in interface Command
Overrides:
execute in class AbstractTaskCommand
Throws:
Exception

getTaskOutput

public Object getTaskOutput()
Description copied from class: AbstractTaskCommand
Gets the output for this command, allows the command to format the output (ie the ls command)

Specified by:
getTaskOutput in class AbstractTaskCommand
Returns: