@Transactional public class PosterServiceImpl extends Object implements PosterService
Modifier and Type | Field and Description |
---|---|
static BigDecimal |
BDONEHUNDRED |
static String |
DATE_FORMAT_STRING |
static DecimalFormat |
DFAMT |
static DecimalFormat |
DFPCT |
static org.kuali.rice.core.api.util.type.KualiDecimal |
ONEHUNDRED |
static org.kuali.rice.core.api.util.type.KualiDecimal |
WARNING_MAX_DIFFERENCE |
MODE_ENTRIES, MODE_ICR, MODE_REVERSAL
Constructor and Description |
---|
PosterServiceImpl() |
Modifier and Type | Method and Description |
---|---|
protected void |
addReporting(Map reporting,
String destination,
String operation)
Increments a named count holding statistics about posted transactions
|
protected void |
createOutputEntry(Transaction entry,
PrintStream group) |
protected String |
determineIcrOffsetBalanceSheetObjectCodeNumber(OriginEntryInformation offsetEntry,
ExpenditureTransaction et,
IndirectCostRecoveryRateDetail icrRateDetail) |
void |
generateIcrTransactions()
This step reads the expenditure table and uses the data to generate Indirect Cost Recovery transactions.
|
protected void |
generateTransactions(ExpenditureTransaction et,
IndirectCostRecoveryRateDetail icrRateDetail,
org.kuali.rice.core.api.util.type.KualiDecimal generatedTransactionAmount,
Date runDate,
PrintStream group,
IndirectCostRecoveryGenerationMetadata icrGenerationMetadata)
Generate a transfer transaction and an offset transaction
|
AccountingCycleCachingService |
getAccountingCycleCachingService() |
protected org.kuali.rice.krad.service.BusinessObjectService |
getBusinessObjectService() |
protected String |
getChargeDescription(BigDecimal rate,
String objectCode,
String type,
org.kuali.rice.core.api.util.type.KualiDecimal amount)
Generates the description of a charge
|
protected org.kuali.rice.kns.service.DataDictionaryService |
getDataDictionaryService() |
protected String |
getOffsetDescription(BigDecimal rate,
org.kuali.rice.core.api.util.type.KualiDecimal amount,
String chartOfAccountsCode,
String accountNumber)
Returns the description of a debit origin entry created by generateTransactions
|
protected org.kuali.rice.core.api.util.type.KualiDecimal |
getPercentage(org.kuali.rice.core.api.util.type.KualiDecimal amount,
BigDecimal percent)
Generates a percent of a KualiDecimal amount (great for finding out how much of an origin entry should be recouped by
indirect cost recovery)
|
org.kuali.rice.krad.service.PersistenceStructureService |
getPersistenceStructureService()
Gets the persistenceStructureService attribute.
|
RunDateService |
getRunDateService() |
protected void |
postEntries(int mode,
FileReader INPUT_GLE_FILE,
PrintStream OUTPUT_GLE_FILE_ps,
File OUTPUT_ERR_FILE)
Actually post the entries.
|
void |
postIcrEntries()
Post ICR GL entries to GL tables.
|
void |
postMainEntries()
Post scrubbed GL entries to GL tables.
|
void |
postReversalEntries()
Post reversal GL entries to GL tables.
|
protected boolean |
postTransaction(Transaction tran,
int mode,
Map<String,Integer> reportSummary,
LedgerSummaryReport ledgerSummaryReport,
PrintStream invalidGroup,
UniversityDate runUniversityDate,
String line,
PrintStream OUTPUT_GLE_FILE_ps)
Runs the given transaction through each transaction posting algorithms associated with this instance
|
protected IndirectCostRecoveryGenerationMetadata |
retrieveAccountIndirectCostRecoveryMetadata(ExpenditureTransaction et) |
protected IndirectCostRecoveryGenerationMetadata |
retrieveSubAccountIndirectCostRecoveryMetadata(ExpenditureTransaction et)
Returns ICR Generation Metadata based on SubAccount information if the SubAccount on the expenditure transaction is properly
set up for ICR
|
void |
setAccountingCycleCachingService(AccountingCycleCachingService accountingCycleCachingService) |
void |
setAccountingPeriodService(AccountingPeriodService aps) |
void |
setBatchFileDirectoryName(String batchFileDirectoryName) |
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService) |
void |
setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService configurationService) |
void |
setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService) |
void |
setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dts)
Sets the dateTimeAttribute of the service
|
void |
setErrorListingReportWriterService(ReportWriterService errorListingReportWriterService) |
void |
setExpenditureTransactionDao(ExpenditureTransactionDao etd) |
void |
setFlexibleOffsetAccountService(FlexibleOffsetAccountService flexibleOffsetAccountService) |
void |
setIndirectCostRecoveryRateDetailDao(IndirectCostRecoveryRateDetailDao iaed) |
void |
setLedgerSummaryReportWriterService(ReportWriterService ledgerSummaryReportWriterService) |
void |
setObjectCodeService(ObjectCodeService ocs) |
void |
setOffsetDefinitionService(OffsetDefinitionService offsetDefinitionService) |
void |
setOriginEntryGroupService(OriginEntryGroupService oes) |
void |
setOriginEntryService(OriginEntryService oes) |
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService) |
void |
setPersistenceStructureService(org.kuali.rice.krad.service.PersistenceStructureService persistenceStructureService) |
void |
setReportWriterService(ReportWriterService reportWriterService) |
void |
setReversalDao(ReversalDao red) |
void |
setReversalReportWriterService(ReportWriterService reversalReportWriterService) |
void |
setRunDateService(RunDateService runDateService) |
void |
setSubAccountService(SubAccountService subAccountService) |
void |
setTransactionPosters(List p) |
void |
setUniversityDateDao(UniversityDateDao udd) |
void |
setVerifyTransaction(VerifyTransaction vt) |
protected boolean |
shouldIgnoreExpenditureTransaction(ExpenditureTransaction et) |
protected void |
writeErrorEntry(String line,
PrintStream invaliGroup) |
public static final org.kuali.rice.core.api.util.type.KualiDecimal WARNING_MAX_DIFFERENCE
public static final String DATE_FORMAT_STRING
public static final org.kuali.rice.core.api.util.type.KualiDecimal ONEHUNDRED
public static final DecimalFormat DFPCT
public static final DecimalFormat DFAMT
public static final BigDecimal BDONEHUNDRED
public PosterServiceImpl()
public void postMainEntries()
postMainEntries
in interface PosterService
public void postReversalEntries()
postReversalEntries
in interface PosterService
public void postIcrEntries()
postIcrEntries
in interface PosterService
protected void postEntries(int mode, FileReader INPUT_GLE_FILE, PrintStream OUTPUT_GLE_FILE_ps, File OUTPUT_ERR_FILE) throws FileNotFoundException
mode
- the poster's current run modeFileNotFoundException
protected boolean postTransaction(Transaction tran, int mode, Map<String,Integer> reportSummary, LedgerSummaryReport ledgerSummaryReport, PrintStream invalidGroup, UniversityDate runUniversityDate, String line, PrintStream OUTPUT_GLE_FILE_ps)
tran
- a transaction to postmode
- the mode the poster is running inreportSummary
- a Map of summary counts generated by the posting processledgerSummaryReport
- for summary reportinginvalidGroup
- the group to save invalid entries torunUniversityDate
- the university date of this poster runline
- public void generateIcrTransactions()
generateIcrTransactions
in interface PosterService
protected void generateTransactions(ExpenditureTransaction et, IndirectCostRecoveryRateDetail icrRateDetail, org.kuali.rice.core.api.util.type.KualiDecimal generatedTransactionAmount, Date runDate, PrintStream group, IndirectCostRecoveryGenerationMetadata icrGenerationMetadata)
et
- an expenditure transactionicrEntry
- the indirect cost recovery entrygeneratedTransactionAmount
- the amount of the transactionrunDate
- the transaction date for the newly created origin entrygroup
- the group to save the origin entry toprotected IndirectCostRecoveryGenerationMetadata retrieveSubAccountIndirectCostRecoveryMetadata(ExpenditureTransaction et)
et
- reportErrors
- protected IndirectCostRecoveryGenerationMetadata retrieveAccountIndirectCostRecoveryMetadata(ExpenditureTransaction et)
protected org.kuali.rice.core.api.util.type.KualiDecimal getPercentage(org.kuali.rice.core.api.util.type.KualiDecimal amount, BigDecimal percent)
amount
- the original amountpercent
- the percentage of that amount to calculateprotected String getChargeDescription(BigDecimal rate, String objectCode, String type, org.kuali.rice.core.api.util.type.KualiDecimal amount)
rate
- the ICR rate for this entryobjectCode
- the object code of this entrytype
- the ICR type code of this entry's accountamount
- the amount of this entryprotected String getOffsetDescription(BigDecimal rate, org.kuali.rice.core.api.util.type.KualiDecimal amount, String chartOfAccountsCode, String accountNumber)
rate
- the ICR rate that relates to this entryamount
- the amount of this entrychartOfAccountsCode
- the chart codce of the debit entryaccountNumber
- the account number of the debit entryprotected void addReporting(Map reporting, String destination, String operation)
reporting
- a Map of counts generated by this processdestination
- the destination of a given transactionoperation
- the operation being performed on the transactionprotected String determineIcrOffsetBalanceSheetObjectCodeNumber(OriginEntryInformation offsetEntry, ExpenditureTransaction et, IndirectCostRecoveryRateDetail icrRateDetail)
public void setVerifyTransaction(VerifyTransaction vt)
public void setTransactionPosters(List p)
public void setOriginEntryService(OriginEntryService oes)
public void setOriginEntryGroupService(OriginEntryGroupService oes)
public void setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dts)
PosterService
setDateTimeService
in interface PosterService
dts
- the dateTimeService implementation to setpublic void setReversalDao(ReversalDao red)
public void setUniversityDateDao(UniversityDateDao udd)
public void setAccountingPeriodService(AccountingPeriodService aps)
public void setExpenditureTransactionDao(ExpenditureTransactionDao etd)
public void setIndirectCostRecoveryRateDetailDao(IndirectCostRecoveryRateDetailDao iaed)
public void setObjectCodeService(ObjectCodeService ocs)
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 setFlexibleOffsetAccountService(FlexibleOffsetAccountService flexibleOffsetAccountService)
public RunDateService getRunDateService()
public void setRunDateService(RunDateService runDateService)
protected void createOutputEntry(Transaction entry, PrintStream group) throws IOException
IOException
protected void writeErrorEntry(String line, PrintStream invaliGroup) throws IOException
IOException
public AccountingCycleCachingService getAccountingCycleCachingService()
public void setAccountingCycleCachingService(AccountingCycleCachingService accountingCycleCachingService)
public void setSubAccountService(SubAccountService subAccountService)
public void setOffsetDefinitionService(OffsetDefinitionService offsetDefinitionService)
protected org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
protected org.kuali.rice.krad.service.BusinessObjectService getBusinessObjectService()
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
protected boolean shouldIgnoreExpenditureTransaction(ExpenditureTransaction et)
public void setBatchFileDirectoryName(String batchFileDirectoryName)
public void setPersistenceStructureService(org.kuali.rice.krad.service.PersistenceStructureService persistenceStructureService)
public org.kuali.rice.krad.service.PersistenceStructureService getPersistenceStructureService()
public void setReportWriterService(ReportWriterService reportWriterService)
public void setErrorListingReportWriterService(ReportWriterService errorListingReportWriterService)
public void setReversalReportWriterService(ReportWriterService reversalReportWriterService)
public void setLedgerSummaryReportWriterService(ReportWriterService ledgerSummaryReportWriterService)
Copyright © 2004–2016 The Kuali Foundation. All rights reserved.