com.continuent.tungsten.replicator.applier.batch
Class BatchScript

java.lang.Object
  extended by com.continuent.tungsten.replicator.applier.batch.BatchScript

public class BatchScript
extends java.lang.Object

Manages loading and parameterization of batch scripts.


Constructor Summary
BatchScript()
           
 
Method Summary
 java.util.List<BatchCommand> getParameterizedScript(java.util.Map<java.lang.String,java.lang.String> parameters)
          Returns a command script with parameters assigned.
 void load(java.io.File scriptFile)
          Loads a set of raw commands from an input stream.
 void load(java.io.File source, java.io.Reader reader)
          Loads a set of raw commands from an input stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatchScript

public BatchScript()
Method Detail

load

public void load(java.io.File scriptFile)
          throws ReplicatorException
Loads a set of raw commands from an input stream.

Parameters:
scriptFile - File containing script
Throws:
ReplicatorException

load

public void load(java.io.File source,
                 java.io.Reader reader)
          throws java.io.IOException
Loads a set of raw commands from an input stream.

Parameters:
source - File containing script
reader - Reader from which to read unparameterized script
Throws:
java.io.IOException - Thrown if there is an I/O error during reading

getParameterizedScript

public java.util.List<BatchCommand> getParameterizedScript(java.util.Map<java.lang.String,java.lang.String> parameters)
Returns a command script with parameters assigned.

Parameters:
parameters - Map containing parameters as name/value pairs
Returns:
Ordered list of parameterized commands