public class CollectorHelperServiceImpl extends Object implements CollectorHelperService
CollectorService
Constructor and Description |
---|
CollectorHelperServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected String |
attemptToParseEmailAfterParseError(String fileName)
After a parse error, tries to go through the file to see if the email address can be determined.
|
protected boolean |
checkDetailKeys(CollectorBatch batch,
org.kuali.rice.krad.util.MessageMap messageMap)
Verifies each detail (id billing) record key has an corresponding gl entry in the same batch.
|
protected boolean |
checkForMixedBalanceTypes(CollectorBatch batch,
org.kuali.rice.krad.util.MessageMap messageMap)
Iterates through the origin entries and builds a map on the balance types.
|
protected boolean |
checkForMixedDocumentTypes(CollectorBatch batch,
org.kuali.rice.krad.util.MessageMap messageMap)
Iterates through the origin entries and builds a map on the document types.
|
boolean |
checkTrailerTotals(CollectorBatch batch,
CollectorReportData collectorReportData)
Checks the batch total line count and amounts against the trailer.
|
protected boolean |
checkTrailerTotals(CollectorBatch batch,
CollectorReportData collectorReportData,
org.kuali.rice.krad.util.MessageMap messageMap)
Checks the batch total line count and amounts against the trailer.
|
protected List<CollectorBatch> |
doCollectorFileParse(String fileName,
org.kuali.rice.krad.util.MessageMap messageMap,
BatchInputFileType collectorInputFileType,
CollectorReportData collectorReportData)
Calls batch input service to parse the xml contents into an object.
|
protected boolean |
duplicateHeaderCheck(CollectorBatch batch,
org.kuali.rice.krad.util.MessageMap messageMap)
Checks header against previously loaded batch headers for a duplicate submission.
|
protected String |
extractAccountNumber(Object originEntryOrDetail) |
protected String |
extractChartOfAccountsCode(Object originEntryOrDetail) |
protected String |
generateCollectorDetailMatchingKey(CollectorDetail collectorDetail,
String delimiter)
Generates a String representation of the CollectorDetail's primary key
|
protected String |
generateOriginEntryMatchingKey(OriginEntryFull entry,
String delimiter)
Generates a String representation of the OriginEntryFull's primary key
|
protected String |
getBalanceTypeCode(CollectorDetail collectorDetail,
CollectorBatch batch)
Returns the balance type code for the interDepartmentalBilling record.
|
String |
getStagingDirectory()
Returns the name of the directory where Collector files are saved
|
protected boolean |
loadCollectorBatch(CollectorBatch batch,
String fileName,
int batchIndex,
CollectorReportData collectorReportData,
List<CollectorScrubberStatus> collectorScrubberStatuses,
BatchInputFileType collectorInputFileType,
PrintStream originEntryOutputPs) |
boolean |
loadCollectorFile(String fileName,
CollectorReportData collectorReportData,
List<CollectorScrubberStatus> collectorScrubberStatuses,
BatchInputFileType collectorInputFileType,
PrintStream originEntryOutputPs)
Parses the given file, validates the batch, stores the entries, and sends email.
|
protected void |
negateAmountIfNecessary(CollectorDetail collectorDetail,
BalanceType balanceTyp,
ObjectType objectType,
CollectorBatch batch)
Negates the amount of the internal departmental billing detail record if necessary.
|
protected boolean |
performCollectorHeaderValidation(CollectorBatch batch,
org.kuali.rice.krad.util.MessageMap messageMap) |
protected void |
performUppercasing(CollectorBatch batch)
Uppercases sub-account, sub-object, and project fields
|
boolean |
performValidation(CollectorBatch batch)
Validates the contents of a parsed file.
|
protected boolean |
performValidation(CollectorBatch batch,
org.kuali.rice.krad.util.MessageMap messageMap)
Performs the following checks on the collector batch: Any errors will be contained in GlobalVariables.MessageMap
|
protected void |
prescrubParsedCollectorBatch(CollectorBatch collectorBatch,
CollectorReportData collectorReportData) |
protected void |
processInterDepartmentalBillingAmounts(CollectorBatch batch)
Modifies the amounts in the ID Billing Detail rows, depending on specific business rules.
|
void |
setAccountService(AccountService accountService)
Sets the accountService attribute value.
|
void |
setBatchFileDirectoryName(String batchFileDirectoryName)
Sets the batchFileDirectoryName attribute value.
|
void |
setBatchInputFileService(BatchInputFileService batchInputFileService) |
protected void |
setChartOfAccountsCode(Object originEntryOrDetail,
String chartOfAccountsCode) |
void |
setCollectorDetailService(CollectorDetailService collectorDetailService) |
void |
setCollectorScrubberService(CollectorScrubberService collectorScrubberService)
Sets the collectorScrubberService attribute value.
|
void |
setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService configurationService) |
void |
setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService) |
void |
setOriginEntryGroupService(OriginEntryGroupService originEntryGroupService) |
void |
setOriginEntryService(OriginEntryService originEntryService) |
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService) |
void |
setPreScrubberService(PreScrubberService preScrubberService)
Sets the preScrubberService attribute value.
|
public CollectorHelperServiceImpl()
public boolean loadCollectorFile(String fileName, CollectorReportData collectorReportData, List<CollectorScrubberStatus> collectorScrubberStatuses, BatchInputFileType collectorInputFileType, PrintStream originEntryOutputPs)
loadCollectorFile
in interface CollectorHelperService
fileName
- - name of file to load (including path)group
- the group into which to persist the origin entries for the collector batch/filecollectorReportData
- the object used to store all of the collector status information for reportingcollectorScrubberStatuses
- if the collector scrubber is able to be invoked upon this collector batch, then the status
info of the collector status run is added to the end of this listthe
- output stream to which to store origin entries that properly pass validationorg.kuali.ole.gl.batch.service.CollectorService#loadCollectorFile(java.lang.String)
protected boolean loadCollectorBatch(CollectorBatch batch, String fileName, int batchIndex, CollectorReportData collectorReportData, List<CollectorScrubberStatus> collectorScrubberStatuses, BatchInputFileType collectorInputFileType, PrintStream originEntryOutputPs)
protected String attemptToParseEmailAfterParseError(String fileName)
fileName
- the name of the file that a parsing error occurred onprotected List<CollectorBatch> doCollectorFileParse(String fileName, org.kuali.rice.krad.util.MessageMap messageMap, BatchInputFileType collectorInputFileType, CollectorReportData collectorReportData)
fileName
- the name of the file to parseMessageMap
- a map of errors resultant from the parsingprotected void prescrubParsedCollectorBatch(CollectorBatch collectorBatch, CollectorReportData collectorReportData)
protected String extractChartOfAccountsCode(Object originEntryOrDetail)
protected String extractAccountNumber(Object originEntryOrDetail)
protected void setChartOfAccountsCode(Object originEntryOrDetail, String chartOfAccountsCode)
public boolean performValidation(CollectorBatch batch)
performValidation
in interface CollectorHelperService
batch
- - batch to validateCollectorHelperService.performValidation(org.kuali.ole.gl.batch.CollectorBatch)
protected boolean performValidation(CollectorBatch batch, org.kuali.rice.krad.util.MessageMap messageMap)
batch
- - batch to validateMessageMap
- the map into which to put errors encountered during validationprotected void performUppercasing(CollectorBatch batch)
batch
- CollectorBatch with data to uppercaseprotected boolean performCollectorHeaderValidation(CollectorBatch batch, org.kuali.rice.krad.util.MessageMap messageMap)
protected void processInterDepartmentalBillingAmounts(CollectorBatch batch)
#negateAmountIfNecessary(InterDepartmentalBilling, BalanceTyp, ObjectType, CollectorBatch)
method to see how
the billing detail amounts are modified.batch
- a CollectorBatch to processprotected void negateAmountIfNecessary(CollectorDetail collectorDetail, BalanceType balanceTyp, ObjectType objectType, CollectorBatch batch)
collectorDetail
- the collector detailbalanceTyp
- the balance typeobjectType
- the object typebatch
- the patch to which the interDepartmentalBilling parameter belongsprotected String getBalanceTypeCode(CollectorDetail collectorDetail, CollectorBatch batch)
interDepartmentalBilling
- a inter departmental billing detail recordbatch
- the batch to which the interDepartmentalBilling billing belongsprotected boolean duplicateHeaderCheck(CollectorBatch batch, org.kuali.rice.krad.util.MessageMap messageMap)
batch
- - batch to checkprotected boolean checkForMixedDocumentTypes(CollectorBatch batch, org.kuali.rice.krad.util.MessageMap messageMap)
batch
- - batch to check document typesprotected boolean checkForMixedBalanceTypes(CollectorBatch batch, org.kuali.rice.krad.util.MessageMap messageMap)
batch
- - batch to check balance typesprotected boolean checkDetailKeys(CollectorBatch batch, org.kuali.rice.krad.util.MessageMap messageMap)
batch
- - batch to validateprotected String generateOriginEntryMatchingKey(OriginEntryFull entry, String delimiter)
entry
- origin entry to get key fromdelimiter
- the String delimiter to separate parts of the keyprotected String generateCollectorDetailMatchingKey(CollectorDetail collectorDetail, String delimiter)
collectorDetail
- collector detail to get key fromdelimiter
- the String delimiter to separate parts of the keypublic boolean checkTrailerTotals(CollectorBatch batch, CollectorReportData collectorReportData)
checkTrailerTotals
in interface CollectorHelperService
batch
- batch to check totals forcollectorReportData
- collector report data (optional)CollectorHelperService.checkTrailerTotals(org.kuali.ole.gl.batch.CollectorBatch,
org.kuali.ole.gl.report.CollectorReportData)
protected boolean checkTrailerTotals(CollectorBatch batch, CollectorReportData collectorReportData, org.kuali.rice.krad.util.MessageMap messageMap)
batch
- - batch to check totals forpublic void setCollectorDetailService(CollectorDetailService collectorDetailService)
public void setOriginEntryGroupService(OriginEntryGroupService originEntryGroupService)
public void setOriginEntryService(OriginEntryService originEntryService)
public String getStagingDirectory()
public void setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
public void setBatchInputFileService(BatchInputFileService batchInputFileService)
public void setCollectorScrubberService(CollectorScrubberService collectorScrubberService)
collectorScrubberService
- The collectorScrubberService to set.public void setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService configurationService)
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
public void setBatchFileDirectoryName(String batchFileDirectoryName)
batchFileDirectoryName
- The batchFileDirectoryName to set.public void setAccountService(AccountService accountService)
accountService
- The accountService to set.public void setPreScrubberService(PreScrubberService preScrubberService)
preScrubberService
- The preScrubberService to set.Copyright © 2004–2015 The Kuali Foundation. All rights reserved.