|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.kfs.module.ar.batch.service.impl.CustomerLoadServiceImpl
public class CustomerLoadServiceImpl
Constructor Summary | |
---|---|
CustomerLoadServiceImpl()
|
Method Summary | |
---|---|
protected void |
addBatchErrorstoCustomerLoadResult(CustomerLoadBatchErrors batchErrors,
CustomerLoadResult result)
|
protected void |
addBatchErrorsToGlobalVariables(CustomerLoadBatchErrors batchErrors)
|
protected void |
addError(CustomerLoadBatchErrors batchErrors,
String customerName,
String propertyName,
Class<?> propertyClass,
String origValue,
String description)
|
protected org.kuali.rice.kns.document.MaintenanceDocument |
createRealMaintDoc(org.kuali.rice.kns.document.MaintenanceDocument document)
|
protected org.kuali.rice.kns.document.MaintenanceDocument |
createTransientMaintDoc()
|
protected Customer |
customerAlreadyExists(Customer customer)
|
protected void |
dontBlankOutFieldsOnUpdate(Customer batchCustomer,
Customer existingCustomer,
String propertyName)
This messy thing attempts to compare a property on the batch customer (new) and existing customer, and if the new is blank, but the old is there, to overwrite the new-value with the old-value, thus preventing batch uploads from blanking out certain fields. |
protected boolean |
extractGlobalVariableErrors(CustomerLoadBatchErrors batchErrors,
String customerName)
|
protected String |
getCustomerMaintenanceDocumentTypeName()
|
protected List<String> |
getListOfFilesToProcess()
|
protected void |
getPdfWriter(com.lowagie.text.Document pdfDoc)
|
boolean |
loadFile(String fileName)
Validates and parses the file identified by the given files name. |
boolean |
loadFile(String fileName,
CustomerLoadFileResult reporter)
|
boolean |
loadFiles()
Validates and parses all files ready to go in the batch staging area. |
protected void |
processBeforeValidating(Customer customer,
Customer existingCustomer,
boolean isUpdate)
pre-processing for existing and new customer |
protected void |
removeDoneFiles(List<String> dataFileNames)
Clears out associated .done files for the processed data files. |
protected byte[] |
safelyLoadFileBytes(String fileName)
Accepts a file name and returns a byte-array of the file name contents, if possible. |
protected boolean |
sendDocumentIntoWorkflow(org.kuali.rice.kns.document.MaintenanceDocument readyTransientDoc,
List<String> routedDocumentNumbers,
List<String> failedDocumentNumbers,
CustomerLoadFileResult reporter)
|
protected boolean |
sendDocumentsIntoWorkflow(List<org.kuali.rice.kns.document.MaintenanceDocument> readyTransientDocs,
List<String> routedDocumentNumbers,
List<String> failedDocumentNumbers,
CustomerLoadFileResult reporter)
|
void |
setBatchInputFileService(BatchInputFileService batchInputFileService)
|
void |
setBatchInputFileType(BatchInputFileType batchInputFileType)
|
void |
setBoService(org.kuali.rice.kns.service.BusinessObjectService boService)
|
void |
setConfigService(org.kuali.rice.kns.service.KualiConfigurationService configService)
|
void |
setCustomerService(CustomerService customerService)
|
void |
setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
|
void |
setDocService(org.kuali.rice.kns.service.DocumentService docService)
|
void |
setOrgService(OrganizationService orgService)
|
void |
setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
|
void |
setReportsDirectory(String reportsDirectory)
|
void |
setSysInfoService(SystemInformationService sysInfoService)
|
protected void |
upperCaseKeyFields(Customer customer)
|
boolean |
validate(List<CustomerDigesterVO> customerUploads)
The results of this method follow the same rules as the batch step result rules: The execution of this method may have 3 possible outcomes: 1. |
boolean |
validateAndPrepare(List<CustomerDigesterVO> customerUploads,
List<org.kuali.rice.kns.document.MaintenanceDocument> customerMaintDocs,
boolean useGlobalErrorMap)
Performs specific validation on the parsed file contents. |
protected boolean |
validateCustomers(List<CustomerDigesterVO> customerUploads,
List<org.kuali.rice.kns.document.MaintenanceDocument> customerMaintDocs,
CustomerLoadFileResult reporter,
boolean useGlobalErrorMap)
Validate the customers lists |
protected boolean |
validateSingle(org.kuali.rice.kns.document.MaintenanceDocument maintDoc,
CustomerLoadBatchErrors batchErrors,
String customerName)
|
protected void |
writeCustomerSectionResult(com.lowagie.text.Document pdfDoc,
String resultLine)
|
protected void |
writeCustomerSectionTitle(com.lowagie.text.Document pdfDoc,
String customerNameLine)
|
protected void |
writeFileNameSectionTitle(com.lowagie.text.Document pdfDoc,
String filenameLine)
|
protected void |
writeMessageEntryLines(com.lowagie.text.Document pdfDoc,
List<String[]> messageLines)
|
protected void |
writeReportPDF(List<CustomerLoadFileResult> fileResults)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CustomerLoadServiceImpl()
Method Detail |
---|
public boolean loadFiles()
CustomerLoadService
loadFiles
in interface CustomerLoadService
protected List<String> getListOfFilesToProcess()
protected void removeDoneFiles(List<String> dataFileNames)
dataFileNames
- public boolean loadFile(String fileName)
CustomerLoadService
loadFile
in interface CustomerLoadService
CustomerLoadService.loadFile(java.lang.String)
public boolean loadFile(String fileName, CustomerLoadFileResult reporter)
protected boolean sendDocumentsIntoWorkflow(List<org.kuali.rice.kns.document.MaintenanceDocument> readyTransientDocs, List<String> routedDocumentNumbers, List<String> failedDocumentNumbers, CustomerLoadFileResult reporter)
protected boolean sendDocumentIntoWorkflow(org.kuali.rice.kns.document.MaintenanceDocument readyTransientDoc, List<String> routedDocumentNumbers, List<String> failedDocumentNumbers, CustomerLoadFileResult reporter)
protected String getCustomerMaintenanceDocumentTypeName()
protected void addError(CustomerLoadBatchErrors batchErrors, String customerName, String propertyName, Class<?> propertyClass, String origValue, String description)
protected void addBatchErrorsToGlobalVariables(CustomerLoadBatchErrors batchErrors)
protected void addBatchErrorstoCustomerLoadResult(CustomerLoadBatchErrors batchErrors, CustomerLoadResult result)
protected byte[] safelyLoadFileBytes(String fileName)
fileName
- String containing valid path & filename (relative or absolute) of file to load.
public boolean validate(List<CustomerDigesterVO> customerUploads)
validate
in interface CustomerLoadService
customerUploads
- A List of CustomerDigesterVO objects, that are the processed
results of the uploaded files.
CustomerLoadService.validate(java.util.List)
public boolean validateAndPrepare(List<CustomerDigesterVO> customerUploads, List<org.kuali.rice.kns.document.MaintenanceDocument> customerMaintDocs, boolean useGlobalErrorMap)
CustomerLoadService
validateAndPrepare
in interface CustomerLoadService
customerUploads
- A List of CustomerDigesterVO objects, that are the processed
results of the uploaded files.customerMaintDocs
- A list of the customerMaintDocs that are returned by the validateAndPrepare method. A valid list
should be passed in, and MaintDocs will be added to it.
CustomerLoadService.validateAndPrepare(java.util.List, java.util.List, boolean)
protected boolean validateCustomers(List<CustomerDigesterVO> customerUploads, List<org.kuali.rice.kns.document.MaintenanceDocument> customerMaintDocs, CustomerLoadFileResult reporter, boolean useGlobalErrorMap)
customerUploads
- customerMaintDocs
- reporter
- useGlobalErrorMap
-
protected void processBeforeValidating(Customer customer, Customer existingCustomer, boolean isUpdate)
customer
- existingCustomer
- isUpdate
- protected void upperCaseKeyFields(Customer customer)
protected void dontBlankOutFieldsOnUpdate(Customer batchCustomer, Customer existingCustomer, String propertyName)
batchCustomer
- existingCustomer
- propertyName
- protected boolean validateSingle(org.kuali.rice.kns.document.MaintenanceDocument maintDoc, CustomerLoadBatchErrors batchErrors, String customerName)
protected boolean extractGlobalVariableErrors(CustomerLoadBatchErrors batchErrors, String customerName)
protected org.kuali.rice.kns.document.MaintenanceDocument createTransientMaintDoc()
protected org.kuali.rice.kns.document.MaintenanceDocument createRealMaintDoc(org.kuali.rice.kns.document.MaintenanceDocument document)
protected Customer customerAlreadyExists(Customer customer)
protected void writeReportPDF(List<CustomerLoadFileResult> fileResults)
protected void writeFileNameSectionTitle(com.lowagie.text.Document pdfDoc, String filenameLine)
protected void writeCustomerSectionTitle(com.lowagie.text.Document pdfDoc, String customerNameLine)
protected void writeCustomerSectionResult(com.lowagie.text.Document pdfDoc, String resultLine)
protected void writeMessageEntryLines(com.lowagie.text.Document pdfDoc, List<String[]> messageLines)
protected void getPdfWriter(com.lowagie.text.Document pdfDoc)
public void setBatchInputFileService(BatchInputFileService batchInputFileService)
public void setCustomerService(CustomerService customerService)
public void setConfigService(org.kuali.rice.kns.service.KualiConfigurationService configService)
public void setDocService(org.kuali.rice.kns.service.DocumentService docService)
public void setBatchInputFileType(BatchInputFileType batchInputFileType)
public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
public void setOrgService(OrganizationService orgService)
public void setSysInfoService(SystemInformationService sysInfoService)
public void setBoService(org.kuali.rice.kns.service.BusinessObjectService boService)
public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
public void setReportsDirectory(String reportsDirectory)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |