@Transactional public class OrganizationReversionProcessImpl extends Object implements OrganizationReversionProcess, org.springframework.beans.factory.InitializingBean
Constructor and Description |
---|
OrganizationReversionProcessImpl() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
protected void |
calculateBucketAmounts(Balance bal)
Depending on the category that this balance belongs to, adds the balance to the appropriate bucket
|
void |
calculateTotals()
This method calculates the totals for a given unit of work's reversion
|
protected void |
clearCalculationTotals()
This method clears the unit of work's amounts to what they should be before each category bucket is calculated; specifically,
the total available for each category is calculated, and the total available and total reversion are set to the sum of all
available from each category bucket.
|
void |
generateCarryForwards(List<OriginEntryFull> originEntriesToWrite)
If carry forwards need to be generated for this unit of work, this method will generate the origin entries to accomplish those object codes.
|
void |
generateCashReversions(List<OriginEntryFull> originEntriesToWrite)
This method generates cash reversion origin entries for the current organization reversion, and adds them to the given list
|
void |
generateMany(List<OriginEntryFull> originEntriesToWrite)
Generates carry forward origin entries on a category by category basis (if the organization reversion record asks for that), assuming carry
forwards are required for the current unit of work
|
List<OriginEntryFull> |
generateOutputOriginEntries()
This method determines which origin entries (reversion, cash reversion, or carry forward) need to be generated for the current unit of work,
and then delegates to the origin entry generation methods to create those entries
|
void |
generateReversions(List<OriginEntryFull> originEntriesToWrite)
If reversions are necessary, this will generate the origin entries for those reversions
|
BalanceService |
getBalanceService()
Gets the balanceService attribute.
|
int |
getBalancesRead()
Returns the total number of balances for the previous fiscal year
|
int |
getBalancesSelected()
Returns the total number of balances selected for inclusion in this process
|
String |
getBatchFileDirectoryName()
Gets the batchFileDirectoryName attribute.
|
OrganizationReversionCategoryLogic |
getCashOrganizationReversionCategoryLogic()
Gets the cashOrganizationReversionCategoryLogic attribute.
|
List<OrganizationReversionCategory> |
getCategoryList() |
org.kuali.rice.core.api.config.property.ConfigurationService |
getConfigurationService()
Gets the configurationService attribute.
|
org.kuali.rice.core.api.datetime.DateTimeService |
getDateTimeService()
Gets the dateTimeService attribute.
|
protected OriginEntryFull |
getEntry()
This method starts the creation of an origin entry, by setting fields that are the same in every Org Rev origin entries
|
FlexibleOffsetAccountService |
getFlexibleOffsetAccountService()
Gets the flexibleOffsetAccountService attribute.
|
List<OriginEntryFull> |
getGeneratedOriginEntries()
Gets the generatedOriginEntries attribute.
|
OrganizationReversionService |
getOrganizationReversionService()
Gets the organizationReversionService attribute.
|
OrganizationReversionUnitOfWorkService |
getOrgReversionUnitOfWorkService()
Gets the orgReversionUnitOfWorkService attribute.
|
OriginEntryService |
getOriginEntryService()
Gets the originEntryService attribute.
|
org.kuali.rice.coreservice.framework.parameter.ParameterService |
getParameterService()
Gets the parameterService attribute.
|
org.kuali.rice.krad.service.PersistenceService |
getPersistenceService()
Gets the persistenceService attribute.
|
PriorYearAccountService |
getPriorYearAccountService()
Gets the priorYearAccountService attribute.
|
int |
getRecordsWritten()
Returns the total number of origin entries written by this process
|
OrgReversionUnitOfWork |
getUnitOfWork() |
protected void |
incrementCount(String countName,
int increment)
Increments one of the totals held in the count map this process uses for reported statistics by a given increment
|
void |
initializeProcess()
This method initializes several properties needed for the process to run correctly
|
boolean |
isUsePriorYearInformation()
Gets the usePriorYearInformation attribute.
|
void |
organizationReversionProcess(Map jobParameters,
Map<String,Integer> organizationReversionCounts)
This evilly named method actually runs the organization reversion process.
|
void |
processBalances(Iterator<Balance> balances)
Given a list of balances, this method generates the origin entries for the organization reversion/carry forward process, and saves those
to an initialized origin entry group
|
protected void |
retrieveCurrentReversionAndAccount(Balance bal)
Given a balance, returns the current organization reversion record and account or prior year account for the balance; it sets them
to private properties
|
void |
setBalanceService(BalanceService balanceService)
Sets the balanceService attribute value.
|
void |
setBatchFileDirectoryName(String batchFileDirectoryName)
Sets the batchFileDirectoryName attribute value.
|
void |
setCashOrganizationReversionCategoryLogic(OrganizationReversionCategoryLogic cashOrganizationReversionCategoryLogic)
Sets the cashOrganizationReversionCategoryLogic attribute value.
|
void |
setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService configurationService)
Sets the configurationService attribute value.
|
void |
setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
Sets the dateTimeService attribute value.
|
void |
setFlexibleOffsetAccountService(FlexibleOffsetAccountService flexibleOffsetAccountService)
Sets the flexibleOffsetAccountService attribute value.
|
void |
setHoldGeneratedOriginEntries(boolean holdGeneratedOriginEntries)
Sets the holdGeneratedOriginEntries attribute value.
|
void |
setJobParameters(Map jobParameters)
Sets the jobParameters attribute value.
|
void |
setOrganizationReversionCounts(Map<String,Integer> organizationReversionCounts)
Sets the organizationReversionCounts attribute value.
|
void |
setOrganizationReversionService(OrganizationReversionService organizationReversionService)
Sets the organizationReversionService attribute value.
|
void |
setOrgReversionUnitOfWorkService(OrganizationReversionUnitOfWorkService orgReversionUnitOfWorkService)
Sets the orgReversionUnitOfWorkService attribute value.
|
void |
setOriginEntryService(OriginEntryService originEntryService)
Sets the originEntryService attribute value.
|
void |
setOutputFileName(String outputFileName)
Used mainly for unit testing, this method allows a way to change the output group of a org reversion process run
|
void |
setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
Sets the parameterService attribute value.
|
void |
setPersistenceService(org.kuali.rice.krad.service.PersistenceService persistenceService)
Sets the persistenceService attribute value.
|
void |
setPriorYearAccountService(PriorYearAccountService priorYearAccountService)
Sets the priorYearAccountService attribute value.
|
void |
setUnitOfWork(OrgReversionUnitOfWork unitOfWork) |
void |
setUsePriorYearInformation(boolean endOfYear)
Sets the usePriorYearInformation attribute value.
|
protected void |
summarizeOriginEntries(List<OriginEntryFull> originEntries)
Summarizes the given origin entries to the ledger report
|
void |
writeLedgerSummaryReport(ReportWriterService reportWriterService)
Writes out the encapsulated origin entry ledger report to the given reportWriterService
|
protected int |
writeOriginEntries(List<OriginEntryFull> originEntriesToWrite)
This method writes a list of OriginEntryFulls to a given origin entry group
|
public String CARRY_FORWARD_OBJECT_CODE
public String DEFAULT_FINANCIAL_DOCUMENT_TYPE_CODE
public String DEFAULT_FINANCIAL_SYSTEM_ORIGINATION_CODE
public String DEFAULT_FINANCIAL_BALANCE_TYPE_CODE
public String DEFAULT_FINANCIAL_BALANCE_TYPE_CODE_YEAR_END
public String DEFAULT_DOCUMENT_NUMBER_PREFIX
public OrganizationReversionProcessImpl()
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
InitializingBean.afterPropertiesSet()
public void organizationReversionProcess(Map jobParameters, Map<String,Integer> organizationReversionCounts)
organizationReversionProcess
in interface OrganizationReversionProcess
jobParameters
- the parameters used in the processorganizationReversionCounts
- a Map of named statistics generated by running the processpublic void processBalances(Iterator<Balance> balances)
processBalances
in interface OrganizationReversionProcess
balances
- an iterator of balances to process; each balance returned by the iterator will be processed by this methodprotected void retrieveCurrentReversionAndAccount(Balance bal) throws FatalErrorException
bal
- the balance to find the account/prior year account and organization reversion record forFatalErrorException
- if an organization reversion record cannot be found in the databasepublic void initializeProcess()
initializeProcess
in interface OrganizationReversionProcess
protected void calculateBucketAmounts(Balance bal)
bal
- the current balance to processpublic List<OriginEntryFull> generateOutputOriginEntries() throws FatalErrorException
generateOutputOriginEntries
in interface OrganizationReversionProcess
FatalErrorException
- thrown if object codes are missing in any of the generation methodsprotected int writeOriginEntries(List<OriginEntryFull> originEntriesToWrite)
writeGroup
- the origin entry group to write tooriginEntriesToWrite
- a list of origin entry fulls to writeprotected OriginEntryFull getEntry()
public void generateCashReversions(List<OriginEntryFull> originEntriesToWrite) throws FatalErrorException
generateCashReversions
in interface OrganizationReversionProcess
originEntriesToWrite
- a list of OriginEntryFulls to stick generated origin entries intoFatalErrorException
- thrown if an origin entry's object code can't be foundpublic void generateMany(List<OriginEntryFull> originEntriesToWrite) throws FatalErrorException
generateMany
in interface OrganizationReversionProcess
originEntriesToWrite
- a list of origin entries to write, which any generated origin entries should be added toFatalErrorException
- thrown if an object code cannot be foundpublic void generateCarryForwards(List<OriginEntryFull> originEntriesToWrite) throws FatalErrorException
generateCarryForwards
in interface OrganizationReversionProcess
originEntriesToWrite
- a list of origin entries to write, that any generated origin entries should be added toFatalErrorException
- thrown if the current object code can't be found in the databasepublic void generateReversions(List<OriginEntryFull> originEntriesToWrite) throws FatalErrorException
generateReversions
in interface OrganizationReversionProcess
originEntriesToWrite
- the list of origin entries to add reversions intoFatalErrorException
- thrown if object code if the entry can't be foundpublic void calculateTotals() throws FatalErrorException
calculateTotals
in interface OrganizationReversionProcess
FatalErrorException
protected void clearCalculationTotals()
protected void summarizeOriginEntries(List<OriginEntryFull> originEntries)
originEntries
- the List of originEntries to summarizepublic OrgReversionUnitOfWork getUnitOfWork()
public void setUnitOfWork(OrgReversionUnitOfWork unitOfWork)
public List<OrganizationReversionCategory> getCategoryList()
public List<OriginEntryFull> getGeneratedOriginEntries()
getGeneratedOriginEntries
in interface OrganizationReversionProcess
public void setHoldGeneratedOriginEntries(boolean holdGeneratedOriginEntries)
setHoldGeneratedOriginEntries
in interface OrganizationReversionProcess
holdGeneratedOriginEntries
- The holdGeneratedOriginEntries to set.public int getBalancesRead()
getBalancesRead
in interface OrganizationReversionProcess
public int getBalancesSelected()
getBalancesSelected
in interface OrganizationReversionProcess
public int getRecordsWritten()
public void setOutputFileName(String outputFileName)
outputGroup
- protected void incrementCount(String countName, int increment)
countName
- the name of the count to incrementincrement
- the amount to incrementpublic void writeLedgerSummaryReport(ReportWriterService reportWriterService)
writeLedgerSummaryReport
in interface OrganizationReversionProcess
reportWriterService
- the report to write the ledger summary report topublic OrganizationReversionService getOrganizationReversionService()
public void setOrganizationReversionService(OrganizationReversionService organizationReversionService)
organizationReversionService
- The organizationReversionService to set.public BalanceService getBalanceService()
public void setBalanceService(BalanceService balanceService)
balanceService
- The balanceService to set.public OriginEntryService getOriginEntryService()
public void setOriginEntryService(OriginEntryService originEntryService)
originEntryService
- The originEntryService to set.public org.kuali.rice.krad.service.PersistenceService getPersistenceService()
public void setPersistenceService(org.kuali.rice.krad.service.PersistenceService persistenceService)
persistenceService
- The persistenceService to set.public org.kuali.rice.core.api.datetime.DateTimeService getDateTimeService()
public void setDateTimeService(org.kuali.rice.core.api.datetime.DateTimeService dateTimeService)
dateTimeService
- The dateTimeService to set.public PriorYearAccountService getPriorYearAccountService()
public void setPriorYearAccountService(PriorYearAccountService priorYearAccountService)
priorYearAccountService
- The priorYearAccountService to set.public OrganizationReversionUnitOfWorkService getOrgReversionUnitOfWorkService()
public void setOrgReversionUnitOfWorkService(OrganizationReversionUnitOfWorkService orgReversionUnitOfWorkService)
orgReversionUnitOfWorkService
- The orgReversionUnitOfWorkService to set.public FlexibleOffsetAccountService getFlexibleOffsetAccountService()
public void setFlexibleOffsetAccountService(FlexibleOffsetAccountService flexibleOffsetAccountService)
flexibleOffsetAccountService
- The flexibleOffsetAccountService to set.public org.kuali.rice.coreservice.framework.parameter.ParameterService getParameterService()
public void setParameterService(org.kuali.rice.coreservice.framework.parameter.ParameterService parameterService)
parameterService
- The parameterService to set.public org.kuali.rice.core.api.config.property.ConfigurationService getConfigurationService()
public void setConfigurationService(org.kuali.rice.core.api.config.property.ConfigurationService configurationService)
configurationService
- The configurationService to set.public boolean isUsePriorYearInformation()
public void setUsePriorYearInformation(boolean endOfYear)
usePriorYearInformation
- The usePriorYearInformation to set.public OrganizationReversionCategoryLogic getCashOrganizationReversionCategoryLogic()
public void setCashOrganizationReversionCategoryLogic(OrganizationReversionCategoryLogic cashOrganizationReversionCategoryLogic)
cashOrganizationReversionCategoryLogic
- The cashOrganizationReversionCategoryLogic to set.public String getBatchFileDirectoryName()
public void setBatchFileDirectoryName(String batchFileDirectoryName)
batchFileDirectoryName
- The batchFileDirectoryName to set.public void setJobParameters(Map jobParameters)
jobParameters
- The jobParameters to set.public void setOrganizationReversionCounts(Map<String,Integer> organizationReversionCounts)
organizationReversionCounts
- The organizationReversionCounts to set.Copyright © 2004–2015 The Kuali Foundation. All rights reserved.