org.gridbus.broker.runfile
Class SubstituteCommand

java.lang.Object
  extended by org.gridbus.broker.runfile.TaskCommand
      extended by org.gridbus.broker.runfile.SubstituteCommand
All Implemented Interfaces:
java.io.Serializable

public class SubstituteCommand
extends TaskCommand

This class represents a substitute command

Author:
Srikumar Venugopal (srikumar@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
SubstituteCommand()
          Constructs a SubstituteCommand and sets its command type.
 
Method Summary
 void doSubstitution(java.util.Hashtable hash)
          Substitutes the source file with values in the hashtable
 void doSubstitutionwin(java.util.Hashtable hash)
          Substitution for Windows OS
 java.lang.String getDestination()
          Returns the destination file
 java.lang.String getSource()
          Returns the source file
 void setDestination(java.lang.String string)
          Sets the destination file location for the substitute command.
 void setSource(java.lang.String string)
          Sets the source file location for this substitute command.
static java.lang.String substituteVariables(java.lang.String st, java.util.Hashtable variables)
           
 
Methods inherited from class org.gridbus.broker.runfile.TaskCommand
findType, getType, setType, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SubstituteCommand

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

Method Detail

doSubstitution

public void doSubstitution(java.util.Hashtable hash)
Substitutes the source file with values in the hashtable

Parameters:
hash -

doSubstitutionwin

public void doSubstitutionwin(java.util.Hashtable hash)
Substitution for Windows OS

Parameters:
hash -
See Also:
doSubstitution(Hashtable)

substituteVariables

public static java.lang.String substituteVariables(java.lang.String st,
                                                   java.util.Hashtable variables)
Parameters:
st -
variables - (value table)
Returns:

getDestination

public java.lang.String getDestination()
Returns the destination file

Returns:
string

getSource

public java.lang.String getSource()
Returns the source file

Returns:
string

setDestination

public void setDestination(java.lang.String string)
Sets the destination file location for the substitute command.

Parameters:
string -

setSource

public void setSource(java.lang.String string)
Sets the source file location for this substitute command.

Parameters:
string -