org.enableit.db.darrt.ant
Class AbstractSchemaTask

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--org.enableit.db.ant.AbstractDBTask
                    |
                    +--org.enableit.db.darrt.ant.AbstractSchemaTask
Direct Known Subclasses:
ChangeTargetTask, DataHandlerTask, DiffSchemaTask, SchemaExporterTask, SchemaImporterTask

public abstract class AbstractSchemaTask
extends AbstractDBTask

Common ancestor for schema operations accessed as Ant Tasks.


Field Summary
static java.lang.String ABOUT
          CVS info ABOUT this class and its current version
protected  java.lang.String refFile
           
protected  org.enableit.db.beans.ProviderExt refProvider
           
protected  java.lang.String targetDriver
          The JDBC driver's class name.
protected  java.lang.String targetFile
           
protected  java.lang.String targetPassword
          Password to use when connecting to the database.
protected  org.enableit.db.beans.ProviderExt targetProvider
           
protected  java.lang.String targetSchemaName
          Schema name to use when connecting to the database.
protected  java.lang.String targetUrl
          The database URL to connect to.
protected  java.lang.String targetUserid
          Username to use when connecting to the database.
 
Fields inherited from class org.enableit.db.ant.AbstractDBTask
driver, password, schemaName, url, userid
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
AbstractSchemaTask()
          Default Constructor.
 
Method Summary
 void addFormatter(org.enableit.db.darrt.ant.FormatterElement rfe)
          Add a new report formatter to output of this task.
protected  void checkInputs()
          Ensure the combination of attributes specifying the reference schema is valid.
protected  void checkRefInputs()
          Ensure the combination of attributes specifying the reference schema is valid.
protected  void checkTargetInputs()
          Ensure the combination of attributes specifying the reference schema is valid.
abstract  void execute()
          The Ant-defined execute method must be implemented by subclasses.
 java.util.List getFormatters()
          Allows access to configured formatters.
 org.enableit.db.beans.Provider getReferenceProvider()
          Return the reference schema database connection properties.
 java.util.List getReportListeners()
           
protected  org.enableit.db.darrt.SchemaHandler getSchemaHandler()
           
 org.enableit.db.beans.Provider getTargetProvider()
          Return the target schema database connection properties.
 void setReferenceFile(java.lang.String referenceFile)
          Set the reference schema file.
 void setSchemaName(java.lang.String schemaName)
          Sets the JDBC schema name to use in making a connection
 void setTargetDriver(java.lang.String driver)
          Sets the JDBC driver to use in making a connection
 void setTargetFile(java.lang.String targetFile)
          Set the target schema file.
 void setTargetPassword(java.lang.String password)
          Sets the JDBC password to use in making a connection
 void setTargetUrl(java.lang.String url)
          Sets the JDBC url to connect to.
 void setTargetUserid(java.lang.String userid)
          Sets the JDBC userid to use in making a connection
 
Methods inherited from class org.enableit.db.ant.AbstractDBTask
setDriver, setPassword, setUrl, setUserid
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorOutput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ABOUT

public static final java.lang.String ABOUT
CVS info ABOUT this class and its current version

See Also:
Constant Field Values

targetDriver

protected java.lang.String targetDriver
The JDBC driver's class name.


targetUrl

protected java.lang.String targetUrl
The database URL to connect to.


targetUserid

protected java.lang.String targetUserid
Username to use when connecting to the database.


targetSchemaName

protected java.lang.String targetSchemaName
Schema name to use when connecting to the database.


targetPassword

protected java.lang.String targetPassword
Password to use when connecting to the database.


refFile

protected java.lang.String refFile

targetFile

protected java.lang.String targetFile

refProvider

protected org.enableit.db.beans.ProviderExt refProvider

targetProvider

protected org.enableit.db.beans.ProviderExt targetProvider
Constructor Detail

AbstractSchemaTask

public AbstractSchemaTask()
Default Constructor.

Method Detail

setTargetDriver

public void setTargetDriver(java.lang.String driver)
Sets the JDBC driver to use in making a connection


setTargetUrl

public void setTargetUrl(java.lang.String url)
Sets the JDBC url to connect to.


setTargetPassword

public void setTargetPassword(java.lang.String password)
Sets the JDBC password to use in making a connection


setSchemaName

public void setSchemaName(java.lang.String schemaName)
Sets the JDBC schema name to use in making a connection

Overrides:
setSchemaName in class AbstractDBTask

setTargetUserid

public void setTargetUserid(java.lang.String userid)
Sets the JDBC userid to use in making a connection


setReferenceFile

public void setReferenceFile(java.lang.String referenceFile)
Set the reference schema file.


setTargetFile

public void setTargetFile(java.lang.String targetFile)
Set the target schema file.


getReferenceProvider

public org.enableit.db.beans.Provider getReferenceProvider()
Return the reference schema database connection properties.


getTargetProvider

public org.enableit.db.beans.Provider getTargetProvider()
Return the target schema database connection properties.


addFormatter

public void addFormatter(org.enableit.db.darrt.ant.FormatterElement rfe)
Add a new report formatter to output of this task.


getFormatters

public java.util.List getFormatters()
Allows access to configured formatters.


getReportListeners

public java.util.List getReportListeners()
                                  throws org.apache.tools.ant.BuildException
Returns:
List of ReportListener.
org.apache.tools.ant.BuildException

checkInputs

protected void checkInputs()
Ensure the combination of attributes specifying the reference schema is valid.


checkRefInputs

protected void checkRefInputs()
Ensure the combination of attributes specifying the reference schema is valid.


checkTargetInputs

protected void checkTargetInputs()
Ensure the combination of attributes specifying the reference schema is valid.


getSchemaHandler

protected org.enableit.db.darrt.SchemaHandler getSchemaHandler()
                                                        throws org.apache.tools.ant.BuildException
Returns:
SchemaHandler instance with reference and target schemas already set.
org.apache.tools.ant.BuildException

execute

public abstract void execute()
The Ant-defined execute method must be implemented by subclasses.

Specified by:
execute in class AbstractDBTask


Copyright © 1999-2004 enableIT.org. All Rights Reserved.