public abstract class AbstractBatchProcess extends Object implements OLEBatchProcess
Modifier and Type | Field and Description |
---|---|
protected OLEBatchProcessJobDetailsBo |
job |
protected OLEBatchProcessDefinitionDocument |
processDef |
EXPORT_BIB_AND_INSTANCE, EXPORT_BIB_INSTANCE_AND_EINSTANCE, EXPORT_BIB_ONLY, EXPORT_EX_STAFF, EXPORT_FILTER, EXPORT_FULL, EXPORT_INC, EXT_ERR_TXT, EXT_MARC, EXT_MARCXML, FILTER_DT_FORMAT, INCREMENTAL_EXPORT_EX_STAFF, JOB_DT_FORMAT, MARC, MARCXML, PERCENT, SOLR_DT_FORMAT, XML_DEC
Constructor and Description |
---|
AbstractBatchProcess() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkJobPauseStatus()
checks if the job is in the Pause state
|
protected void |
createBatchDeleteFailureReportFile(String failureReportData)
Create the failure report record file in the batch process type directory for batch delete
|
protected void |
createBatchErrorAttachmentFile(String failureRecordData) |
protected void |
createBatchFailureFile(String failureRecordData)
Create the failure record file in the batch process type directory
|
protected void |
createBatchFailureFile(String failureRecordData,
String fileName)
Create the failure record file in the batch process type directory
|
protected void |
createBatchSuccessFile(String successRecordData)
Create the success record file in the batch process type directory for batch delete
|
protected void |
createFile(String[] content) |
protected void |
deleteBatchFile()
Delete the upload file in the batch process type dirctory
|
protected void |
deleteBatchFile(String fileName)
Delete the upload file in the batch process type dirctory
|
protected String |
getBatchProcessFileContent()
Get the upload file content from the batch process type dirctory by using job id an upload file name
|
protected String |
getBatchProcessFileContent(String fileName) |
protected String |
getBatchProcessFilePath(String batchProceesType)
create and return the dirctory based on batch process type in the server file system
|
protected org.kuali.rice.krad.service.BusinessObjectService |
getBusinessObjectService() |
protected abstract void |
getNextBatch()
method to be implemented to retreive the next batch of data to be processed
|
protected boolean |
isJobRunning()
checks if the job is in the RUNNING state
|
protected void |
loadProfile(OLEBatchProcessDefinitionDocument processDef)
First method to be called in the batch process will load the profile for the process id in the process defn document
|
protected abstract void |
prepareForRead()
method to be implemented to read initial data for the various processes; will be called before prepareForWrite() method
|
protected abstract void |
prepareForWrite()
method to be implemented to prepare for writing the data; will be called before writeData()
|
void |
process(OLEBatchProcessDefinitionDocument processDef,
OLEBatchProcessJobDetailsBo jobBo)
This method will be invoked for various processes implementing the OLEBatchProcess
The method will perform following operation in sequence
1.
|
protected abstract void |
processBatch()
method to be implemented for various write operation
|
void |
updateJobProgress()
method to update the batch job progress will be called after every other method completes operation
|
protected OLEBatchProcessJobDetailsBo job
protected OLEBatchProcessDefinitionDocument processDef
public AbstractBatchProcess()
public final void process(OLEBatchProcessDefinitionDocument processDef, OLEBatchProcessJobDetailsBo jobBo) throws Exception
process
in interface OLEBatchProcess
processDef
- jobBo
- Exception
protected org.kuali.rice.krad.service.BusinessObjectService getBusinessObjectService()
protected void loadProfile(OLEBatchProcessDefinitionDocument processDef) throws Exception
processDef
- Exception
public void updateJobProgress() throws Exception
Exception
protected abstract void prepareForRead() throws Exception
Exception
protected abstract void prepareForWrite() throws Exception
Exception
protected abstract void getNextBatch() throws Exception
Exception
protected abstract void processBatch() throws Exception
Exception
protected boolean isJobRunning()
protected void checkJobPauseStatus() throws Exception
Exception
protected String getBatchProcessFilePath(String batchProceesType)
protected void createBatchSuccessFile(String successRecordData) throws Exception
successRecordData
- Exception
protected void createBatchDeleteFailureReportFile(String failureReportData) throws Exception
failureReportData
- Exception
protected void createBatchFailureFile(String failureRecordData) throws Exception
failureRecordData
- Exception
protected void createBatchErrorAttachmentFile(String failureRecordData) throws Exception
Exception
protected void createFile(String[] content) throws Exception
Exception
protected void deleteBatchFile() throws Exception
Exception
protected String getBatchProcessFileContent() throws Exception
Exception
protected String getBatchProcessFileContent(String fileName) throws Exception
Exception
protected void deleteBatchFile(String fileName) throws Exception
Exception
protected void createBatchFailureFile(String failureRecordData, String fileName) throws Exception
failureRecordData
- Exception
Copyright © 2004–2015 The Kuali Foundation. All rights reserved.