org.dbunit.ant
Class AbstractStep
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.dbunit.ant.AbstractStep
- All Implemented Interfaces:
- Cloneable, DbUnitTaskStep
- Direct Known Subclasses:
- Compare, Export, Operation
public abstract class AbstractStep
- extends org.apache.tools.ant.ProjectComponent
- implements DbUnitTaskStep
- Since:
- 2.1 (Apr 3, 2004)
- Version:
- $Revision: 855 $ $Date: 2008-11-01 15:23:09 +0100 (Sat, 01 Nov 2008) $
- Author:
- Manuel Laflamme, Last changed by: $Author: gommma $
Fields inherited from class org.apache.tools.ant.ProjectComponent |
description, location, project |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject |
FORMAT_FLAT
public static final String FORMAT_FLAT
- See Also:
- Constant Field Values
FORMAT_XML
public static final String FORMAT_XML
- See Also:
- Constant Field Values
FORMAT_DTD
public static final String FORMAT_DTD
- See Also:
- Constant Field Values
FORMAT_CSV
public static final String FORMAT_CSV
- See Also:
- Constant Field Values
FORMAT_XLS
public static final String FORMAT_XLS
- See Also:
- Constant Field Values
AbstractStep
public AbstractStep()
getDatabaseDataSet
protected IDataSet getDatabaseDataSet(IDatabaseConnection connection,
List tables,
boolean forwardonly)
throws DatabaseUnitException
- Throws:
DatabaseUnitException
getSrcDataSet
protected IDataSet getSrcDataSet(File src,
String format,
boolean forwardonly)
throws DatabaseUnitException
- Throws:
DatabaseUnitException
isDataFormat
public boolean isDataFormat(String format)
- Checks if the given format is a format which contains tabular data.
- Parameters:
format
- The format to check
- Returns:
true
if the given format is a data format. A data
format is a format which holds tabular data that can be loaded via dbunit.
An example for a data format is "xml" or "flat". A non-data format is "dtd" which
holds only metadata information.- Since:
- 2.4
checkDataFormat
protected void checkDataFormat(String format)
- Checks if the given data format is a valid one according to
the method
isDataFormat(String)
. If it is not an
IllegalArgumentException
is thrown.
- Parameters:
format
- The format to check
- Throws:
IllegalArgumentException
- If the given format is not
a valid data format- Since:
- 2.4
getInputSource
public static InputSource getInputSource(File file)
throws MalformedURLException
- Creates and returns an
InputSource
- Parameters:
file
- The file for which an InputSource
should be created
- Returns:
- The input source for the given file
- Throws:
MalformedURLException
Copyright © 2002-2012. All Rights Reserved.