net.sourceforge.addam.ddlrun.runners
Class DeploymentRunner

java.lang.Object
  extended by net.sourceforge.addam.ddlrun.runners.DeploymentRunner
All Implemented Interfaces:
Runner

public class DeploymentRunner
extends Object
implements Runner

Determines which groups to run, and executes them.

Since:
Mar 5, 2005
Author:
TIM3

Field Summary
private  Filter groupFilter
           
private  ResourceReaderFactory readerFactory
           
private  ArrayList runLoggers
           
private  Filter scriptFilter
           
private  Map scriptRunnerMap
           
 
Constructor Summary
DeploymentRunner(ResourceReaderFactory readerFactory, Filter groupFilter, Filter scriptFilter, Map scriptRunnerMap, String version)
          Constructs a DeploymentRunner.
 
Method Summary
 void addRunLogger(RunLogger logger)
          all registered loggers will be notified of successful and unsuccessful scripts
 void run(String resource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

readerFactory

private final ResourceReaderFactory readerFactory

groupFilter

private final Filter groupFilter

scriptFilter

private final Filter scriptFilter

scriptRunnerMap

private final Map scriptRunnerMap

runLoggers

private final ArrayList runLoggers
Constructor Detail

DeploymentRunner

public DeploymentRunner(ResourceReaderFactory readerFactory,
                        Filter groupFilter,
                        Filter scriptFilter,
                        Map scriptRunnerMap,
                        String version)
Constructs a DeploymentRunner.

Parameters:
readerFactory - used to locate and read scripts
groupFilter - used to determine which groups to run
scriptFilter - passed to ScriptGroupRunner to determine which scripts to run
scriptRunnerMap - used to determine which JDBCScriptRunner to use for each script
version -
Method Detail

addRunLogger

public void addRunLogger(RunLogger logger)
all registered loggers will be notified of successful and unsuccessful scripts

Parameters:
logger -

run

public void run(String resource)
         throws Exception
Specified by:
run in interface Runner
Parameters:
resource - the resource that contains the list of scripts to run
Throws:
IOException
Exception


Copyright © 2005-2006 ADDAM Project Team. All Rights Reserved.