public abstract class AbstractBusinessObjectBuilder extends java.lang.Object implements BusinessObjectBuilder
This is an abstract class to implement many default behavior of the BusinessObjectBuilder interface.
The business object loader will call the business object builder in the following sequence:Constructor and Description |
---|
AbstractBusinessObjectBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
close()
This method will perform cleanup on the business object reader.
|
void |
endProcess()
This method performs any post processing of the data after all of the data has been loaded.
|
java.lang.Object |
execute(java.lang.Object inputData)
This method populate the logical data object with the data read in from
the data reader.
|
ConfigProperties |
getConfigProperties()
Get the instance of the
ConfigProperties of the BusinessObjectBuilder . |
void |
init()
Initialize the business object builder.
|
ConfigProperties |
initConfig(org.w3c.dom.Node businessObjectBuilderNode,
ConfigProperties parentConfigProperties)
This method parses the
BusinessObjectBuilder xml node read in from the business object configuration file
and stores the configuration in memory. |
void |
postProcess(java.lang.Object dataObject)
This method performs any post processing of the data.
|
void |
preProcess(java.lang.Object inputData)
This method performs any preprocessing of the data if needed.
|
void |
setConfigProperties(ConfigProperties aConfigProperties)
This method sets the
ConfigProperties to the BusinessObjectBuilder . |
public ConfigProperties initConfig(org.w3c.dom.Node businessObjectBuilderNode, ConfigProperties parentConfigProperties) throws DataLoadException
This method parses the BusinessObjectBuilder
xml node read in from the business object configuration file
and stores the configuration in memory.
initConfig
in interface BusinessObjectBuilder
businessObjectBuilderNode
- The BusinessObjectBuilder
xml node read in from the business object configuration file.parentConfigProperties
- The configuration properties for the parent data loader of this business object builder.DataLoadException
- An application exception will be thrown if there was a problem initializing the configuration for the business object builder.public ConfigProperties getConfigProperties()
Get the instance of the ConfigProperties
of the BusinessObjectBuilder
.
This method shouldn't be called unless specific properties are needed from the ConfigProperties
.
getConfigProperties
in interface BusinessObjectBuilder
public void setConfigProperties(ConfigProperties aConfigProperties)
This method sets the ConfigProperties
to the BusinessObjectBuilder
.
This is not needed to be called unless overriding the configuration of the business object reader is desired.
setConfigProperties
in interface BusinessObjectBuilder
aConfigProperties
- The configuration for this business object reader.public void init() throws DataLoadException
Initialize the business object builder.
init
in interface BusinessObjectBuilder
DataLoadException
- An application exception will be thrown if there was a problem initializing the business object builder.public void preProcess(java.lang.Object inputData) throws DataLoadException
This method performs any preprocessing of the data if needed.
This method normally does not have any function. Implement this method only if any preprocessing of the raw data is needed.
preProcess
in interface BusinessObjectBuilder
inputData
- The raw data read in by the data reader. (DataReader)
DataLoadException
- An application exception should be thrown is there was a problem preproccessing the input data.public java.lang.Object execute(java.lang.Object inputData) throws DataLoadException
This method populate the logical data object with the data read in from the data reader. Using the data mapping configuration from the business object configuration file, the data will be mapped to a specific property in the logical data object using XPath.
After the logical data object has been populated with data, this method calls the business object mediator to process and load the data.
execute
in interface BusinessObjectBuilder
inputData
- The input data that the base logical data object will be populated with.DataLoadException
- An application exception will be thrown if there was a problempublic void postProcess(java.lang.Object dataObject) throws DataLoadException
This method performs any post processing of the data.
This method normally does not have any function. Implement this method only if any post processing of the populated data object is needed.
postProcess
in interface BusinessObjectBuilder
dataObject
- The data object populated with raw data read in by the data reader. (DataReader)
DataLoadException
- An application exception should be thrown is there was a problem post proccessing the input data.public void endProcess() throws DataLoadException
This method performs any post processing of the data after all of the data has been loaded.
This method does not have any function. Child classes must override this method if any post processing of the data is needed.
endProcess
in interface BusinessObjectBuilder
DataLoadException
- An application exception will be thrown is there was a problem post proccessing the loaded data.public void close() throws DataLoadException
This method will perform cleanup on the business object reader. It will attempt to close all of the business object mediators configured for this business object reader.
close
in interface BusinessObjectBuilder
DataLoadException
- An application exception will be thrown if there was a problem closing the business object reader or its business object mediators.