public class FeedBusinessObjectBuilder extends BaseBusinessObjectBuilder
BaseBusinessObjectBuilder
and overrides
the preProcess
, postProcess
and endProcess
methods, to handle errors that could occur while processing the web feeds.Constructor and Description |
---|
FeedBusinessObjectBuilder() |
Modifier and Type | Method and Description |
---|---|
void |
endProcess()
This method performs post processing of the data after all of the
entries in a feed have been processed.
|
void |
init()
Initialize the feed business object builder to obtain Load item report from dataload.
|
void |
postProcess(java.lang.Object dataObject)
This method performs post processing of the data.
|
void |
preProcess(java.lang.Object inputData)
This method performs pre-processing of the input data .
|
close, execute, getConfigProperties, initConfig, setConfigProperties
public void init() throws DataLoadException
Initialize the feed business object builder to obtain Load item report from dataload.
init
in interface BusinessObjectBuilder
init
in class BaseBusinessObjectBuilder
DataLoadException
- An application exception will be thrown if there was a
problem initializing the feed business object builder.public void preProcess(java.lang.Object inputData) throws DataLoadException
This method performs pre-processing of the input data .
This method fetches the feed identifier from the input data and stores it in the instance variable, so it can be retrieved later.
preProcess
in interface BusinessObjectBuilder
preProcess
in class AbstractBusinessObjectBuilder
inputData
- The raw data read in by the data reader.
(DataReader)
DataLoadException
- An application exception should be thrown is there was a
problem pre-processing the input data.public void postProcess(java.lang.Object dataObject) throws DataLoadException
This method performs post processing of the data.
This method updates the CMFEEDLOG table (which keeps track of the feed records processed) with the status of the feed load. The subsequent attempts to process feeds read the status from CMFEEDLOG to find out if the feed needs to be re-processed (in case of failures).
postProcess
in interface BusinessObjectBuilder
postProcess
in class AbstractBusinessObjectBuilder
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 processing the input data.public void endProcess() throws DataLoadException
This method performs post processing of the data after all of the entries in a feed have been processed.
This method updates the feed URL cache, if the entire feed load was successful. Once, a feed URL in the cache is marked as processed, the next time the feed retriever is run, the feed is fetched only if there has been any update to the feed.
endProcess
in interface BusinessObjectBuilder
endProcess
in class AbstractBusinessObjectBuilder
DataLoadException
- An application exception will be thrown is there was a
problem post processing the loaded data.