|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jdbcexporter.Exporter
The Exporter class is the main class that controls the export of data from the database.
| Field Summary | |
static java.lang.String |
COLUMNTRANSLATOR_PREFIX
Prefix for the column translator type/class mappings to use. |
protected CustomObjectFactory |
columnTranslatorFactory
Custom object factory for column translators. |
static java.lang.String |
CONNECTION_PREFIX
Prefix for the connection config type/class mappings to use. |
protected CustomObjectFactory |
connectionDefFactory
Custom object factory for connection definitions. |
static java.lang.String |
DELIMITER_PREFIX
Prefix for the delimiter formatter type/class mappings to use. |
protected CustomObjectFactory |
delimiterFormatterFactory
Custom object factory for delimiter formatters. |
protected java.lang.String |
engineClassname
Export engine class name. |
protected ExportDef |
exportDef
Export definition. |
protected java.util.List |
exportListeners
The list of export listeners. |
protected static org.apache.commons.logging.Log |
LOG
The log for debug information. |
| Constructor Summary | |
Exporter()
Constructs a new exporter. |
|
| Method Summary | |
void |
addExportListener(ExportListener listener)
Adds an export listener. |
void |
beginExport()
Export data from the database by processing each entity definition via the export engine. |
protected void |
fireExportEntityEvent(ExportEntityEvent e,
boolean start)
Fire an export entity event to the listeners. |
protected void |
fireExportEvent(ExportEvent e,
boolean start)
Fire an export event to the listeners. |
void |
initExportDef(org.xml.sax.InputSource source)
Read and parse the export config file into an ExportDef class. |
void |
initPlugins(java.util.Properties pluginProperties)
Adds the external connection definition classes and delimiter formatter classes to the appropriate factories. |
void |
initPlugins(java.lang.String pluginFile)
Parse the plugin property file and adds the external connection definition classes and delimiter formatter classes to the appropriate factories. |
static void |
main(java.lang.String[] args)
|
void |
removeExportListener(ExportListener listener)
Removes an export listener. |
void |
setEngine(java.lang.String engineClassname)
Sets the export engine to use. |
void |
setExportDef(ExportDef exportDef)
Sets the export def. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static org.apache.commons.logging.Log LOG
public static final java.lang.String CONNECTION_PREFIX
public static final java.lang.String DELIMITER_PREFIX
public static final java.lang.String COLUMNTRANSLATOR_PREFIX
protected CustomObjectFactory connectionDefFactory
protected CustomObjectFactory delimiterFormatterFactory
protected CustomObjectFactory columnTranslatorFactory
protected ExportDef exportDef
protected java.lang.String engineClassname
protected java.util.List exportListeners
| Constructor Detail |
public Exporter()
| Method Detail |
public void setExportDef(ExportDef exportDef)
exportDef - the export def
public void initExportDef(org.xml.sax.InputSource source)
throws java.io.FileNotFoundException,
java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
org.w3c.dom.DOMException,
InvalidCustomObjectDefException
source - export config file
java.io.IOException - if the export config file cannot be opened and read
java.io.FileNotFoundException
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
org.w3c.dom.DOMException
InvalidCustomObjectDefException
public void initPlugins(java.lang.String pluginFile)
throws java.io.FileNotFoundException,
java.io.IOException
pluginFile - plugin property file
java.io.FileNotFoundException - if the plugin file cannot be found
java.io.IOException - if the plugin file cannot be opened and readpublic void initPlugins(java.util.Properties pluginProperties)
pluginProperties - the plugin propertiespublic void setEngine(java.lang.String engineClassname)
engineClassname - the classname of the export engine
public void beginExport()
throws java.io.FileNotFoundException,
java.io.IOException
java.io.FileNotFoundException - if the log file is not valid
java.io.IOException - if the log file cannot be opened and written topublic void addExportListener(ExportListener listener)
listener - an export listenerpublic void removeExportListener(ExportListener listener)
listener - an export listener
protected void fireExportEvent(ExportEvent e,
boolean start)
e - the export eventstart - true if the export is starting and false if the export is finished
protected void fireExportEntityEvent(ExportEntityEvent e,
boolean start)
e - the export entity eventstart - true if the export of the entity is starting and false if the
export of the entity is finishedpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||