org.gridbus.broker.runfile
Class CopyCommand

java.lang.Object
  extended by org.gridbus.broker.runfile.TaskCommand
      extended by org.gridbus.broker.runfile.CopyCommand
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
MCopyCommand

public class CopyCommand
extends TaskCommand

Represents the copy command of a run file.

Author:
Hussein Gibbins (hag@cs.mu.oz.au)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.gridbus.broker.runfile.TaskCommand
COPY_CMD, EXECUTE_CMD, GCOPY_CMD, MCOPY_CMD, REMOTE_EXECUTE_CMD, SUBSTITUTE_CMD, TEST_CMD, UNKNOWN_CMD
 
Constructor Summary
CopyCommand()
          Constructs a CopyCommand and sets its command type.
 
Method Summary
 java.lang.String getDestination()
          Gets the destination location for this copy command.
 java.lang.String getSource()
          Gets the source location for this copy command.
 boolean isDestinationPathRelative()
           
 boolean isDestinationRemote()
          Checks whether the destination location is remote.
 boolean isSourcePathRelative()
           
 boolean isSourceRemote()
          Checks whether the source location is remote.
 void setDestination(boolean isLocal, java.lang.String destination, boolean useRelativePath)
           
 void setDestination(java.lang.String destination)
          Sets the destination location for this copy command.
 void setDestinationPathRelative(boolean destRelative)
           
 void setDestinationRemote(boolean destRemote)
           
 void setSource(boolean isLocal, java.lang.String source, boolean useRelativePath)
           
 void setSource(java.lang.String source)
          Sets the source location for this copy command.
 void setSourcePathRelative(boolean srcRelative)
           
 java.lang.String toString()
           
 
Methods inherited from class org.gridbus.broker.runfile.TaskCommand
findType, getType, setType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CopyCommand

public CopyCommand()
Constructs a CopyCommand and sets its command type.

Method Detail

setSource

public void setSource(java.lang.String source)
Sets the source location for this copy command. if location name is preceded by "node:" then it is assumed to be remote.

Parameters:
source - where the file will be copied from.

setSource

public void setSource(boolean isLocal,
                      java.lang.String source,
                      boolean useRelativePath)
Parameters:
isLocal -
source -
useRelativePath -

getSource

public java.lang.String getSource()
Gets the source location for this copy command.

Returns:
source location.

isSourceRemote

public boolean isSourceRemote()
Checks whether the source location is remote.

Returns:
whether the source location is remote.

setDestination

public void setDestination(java.lang.String destination)
Sets the destination location for this copy command. if location name is preceded by "node:" then it is assumed to be remote.

Parameters:
destination - where the file will be copied to.

setDestination

public void setDestination(boolean isLocal,
                           java.lang.String destination,
                           boolean useRelativePath)
Parameters:
isLocal -
destination -
useRelativePath -

getDestination

public java.lang.String getDestination()
Gets the destination location for this copy command.

Returns:
destination location.

isDestinationRemote

public boolean isDestinationRemote()
Checks whether the destination location is remote.

Returns:
whether the destination location is remote.

isDestinationPathRelative

public boolean isDestinationPathRelative()
Returns:
Returns the destinationRelative.

setDestinationPathRelative

public void setDestinationPathRelative(boolean destRelative)
Parameters:
destRelative -

setDestinationRemote

public void setDestinationRemote(boolean destRemote)
Parameters:
destRemote -

isSourcePathRelative

public boolean isSourcePathRelative()
Returns:
Returns the sourceRelative.

setSourcePathRelative

public void setSourcePathRelative(boolean srcRelative)
Parameters:
srcRelative -

toString

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