org.kuali.kfs.gl.batch.service.impl
Class YearEndServiceImpl

java.lang.Object
  extended by org.kuali.kfs.gl.batch.service.impl.YearEndServiceImpl
All Implemented Interfaces:
YearEndService

@Transactional
public class YearEndServiceImpl
extends Object
implements YearEndService

This class implements the logic to perform year end tasks.


Field Summary
static String TRANSACTION_DATE_FORMAT_STRING
           
 
Constructor Summary
YearEndServiceImpl()
          Constructs a YearEndServiceImpl, and that's about it.
 
Method Summary
 void closeNominalActivity(String nominalClosingFileName, Map nominalClosingJobParameters)
          This class actually generates all the origin entries for nominal activity closing and saves them to the proper origin entry group.
 void forwardBalances(String balanceForwardsUnclosedFileName, String balanceForwardsclosedFileName, BalanceForwardRuleHelper balanceForwardRuleHelper)
          This method handles executing the loop over all balances, and generating reports on the balance forwarding process as a whole.
 void forwardEncumbrances(String encumbranceForwardFileName, Map jobParameters, Map<String,Integer> counts)
          Create origin entries to carry forward all open encumbrances from the closing fiscal year into the opening fiscal year.
 ReportWriterService getBalanceForwardReportWriterService()
          Gets the balanceForwardReportWriterService attribute.
 EncumbranceClosingOriginEntryGenerationService getEncumbranceClosingOriginEntryGenerationService()
          Gets the encumbranceClosingOriginEntryGenerationService attribute.
 ReportWriterService getEncumbranceClosingReportWriterService()
          Gets the encumbranceClosingReportWriterService attribute.
 ReportWriterService getNominalActivityClosingReportWriterService()
          Gets the nominalActivityClosingReportWriterService attribute.
protected  int incrementCount(Map<String,Integer> counts, String countName)
          A method that increments a count within a Map by 1
 void logAllMissingPriorYearAccounts(Integer fiscalYear)
          Logs all of the missing prior year accounts that balances and encumbrances processed by year end jobs would attempt to call on
 void logAllMissingSubFundGroups(Integer fiscalYear)
          Logs all of the missing sub fund groups that balances and encumbrances processed by the year end job would attempt to call on
 void setBalanceForwardReportWriterService(ReportWriterService balanceForwardReportWriterService)
          Sets the balanceForwardReportWriterService attribute value.
 void setBalanceService(BalanceService balanceService)
           
 void setBalanceTypeService(BalanceTypeService balanceTypeService)
           
 void setBatchFileDirectoryName(String batchFileDirectoryName)
           
 void setConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService configurationService)
           
 void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)
           
 void setEncumbranceClosingOriginEntryGenerationService(EncumbranceClosingOriginEntryGenerationService encumbranceClosingOriginEntryGenerationService)
          Sets the encumbranceClosingOriginEntryGenerationService attribute value.
 void setEncumbranceClosingReportWriterService(ReportWriterService encumbranceClosingReportWriterService)
          Sets the encumbranceClosingReportWriterService attribute value.
 void setEncumbranceDao(EncumbranceDao encumbranceDao)
          Sets the encumbranceDao attribute, allowing the injection of an implementation of the data access object that uses a specific O/R mechanism.
 void setNominalActivityClosingReportWriterService(ReportWriterService nominalActivityClosingReportWriterService)
          Sets the nominalActivityClosingReportWriterService attribute value.
 void setObjectTypeService(ObjectTypeService objectTypeService)
           
 void setOriginEntryGroupService(OriginEntryGroupService originEntryGroupService)
           
 void setOriginEntryService(OriginEntryService originEntryService)
          Sets the originEntryService attribute, allowing the injection of an implementation of that service
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
           
 void setPersistenceService(org.kuali.rice.kns.service.PersistenceService persistenceService)
          Sets the persistenceService attribute value.
 void setPriorYearAccountService(PriorYearAccountService priorYearAccountService)
           
 void setSubFundGroupService(SubFundGroupService subFundGroupService)
           
 void setYearEndDao(YearEndDao yearEndDao)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRANSACTION_DATE_FORMAT_STRING

public static final String TRANSACTION_DATE_FORMAT_STRING
See Also:
Constant Field Values
Constructor Detail

YearEndServiceImpl

public YearEndServiceImpl()
Constructs a YearEndServiceImpl, and that's about it.

Method Detail

closeNominalActivity

public void closeNominalActivity(String nominalClosingFileName,
                                 Map nominalClosingJobParameters)
This class actually generates all the origin entries for nominal activity closing and saves them to the proper origin entry group. Note: Much (but no longer all) of the original COBOL program this code is based off of is within the comments.

Specified by:
closeNominalActivity in interface YearEndService
Parameters:
nominalClosingOriginEntryGroup - the origin entry group to save the generated nominal closing entries to
nominalClosingJobParameters - a map of parameters for the job:
nominalClosingCounts - various statistical counts
See Also:
org.kuali.kfs.gl.batch.service.YearEndService#closeNominalActivity()

incrementCount

protected int incrementCount(Map<String,Integer> counts,
                             String countName)
A method that increments a count within a Map by 1

Parameters:
counts - a Map of count statistics
countName - the name of the specific count ot update
Returns:
the newly incremented amount

forwardBalances

public void forwardBalances(String balanceForwardsUnclosedFileName,
                            String balanceForwardsclosedFileName,
                            BalanceForwardRuleHelper balanceForwardRuleHelper)
This method handles executing the loop over all balances, and generating reports on the balance forwarding process as a whole. This method delegates all of the specific logic in terms of what balances to forward, according to what criteria, how origin entries are generated, etc. This relationship makes YearEndServiceImpl and BalanceForwardRuleHelper heavily dependent upon one another in terms of expected behavior.

Specified by:
forwardBalances in interface YearEndService
Parameters:
balanceForwardsUnclosedPriorYearAccountGroup - the origin entry group to save balance forwarding origin entries with open accounts
balanceForwardsClosedPriorYearAccountGroup - the origin entry group to save balance forwarding origin entries with closed accounts
balanceForwardRuleHelper - the BalanceForwardRuleHelper which holds the important state - the job parameters and statistics - for the job to run

forwardEncumbrances

public void forwardEncumbrances(String encumbranceForwardFileName,
                                Map jobParameters,
                                Map<String,Integer> counts)
Create origin entries to carry forward all open encumbrances from the closing fiscal year into the opening fiscal year.

Specified by:
forwardEncumbrances in interface YearEndService
Parameters:
originEntryGroup - the origin entry group where generated origin entries should be saved
jobParameters - the parameters necessary to run this job: the fiscal year to close and the university date the job was run
forwardEncumbrancesCounts - the statistical counts generated by this job

logAllMissingPriorYearAccounts

public void logAllMissingPriorYearAccounts(Integer fiscalYear)
Description copied from interface: YearEndService
Logs all of the missing prior year accounts that balances and encumbrances processed by year end jobs would attempt to call on

Specified by:
logAllMissingPriorYearAccounts in interface YearEndService
Parameters:
balanceFiscalYear - the fiscal year to find balances encumbrances for
See Also:
YearEndService.logAllMissingPriorYearAccounts(java.lang.Integer)

logAllMissingSubFundGroups

public void logAllMissingSubFundGroups(Integer fiscalYear)
Description copied from interface: YearEndService
Logs all of the missing sub fund groups that balances and encumbrances processed by the year end job would attempt to call on

Specified by:
logAllMissingSubFundGroups in interface YearEndService
Parameters:
balanceFiscalYear - the fiscal year to find balances encumbrances for
See Also:
YearEndService.logAllMissingSubFundGroups(java.lang.Integer)

setEncumbranceDao

public void setEncumbranceDao(EncumbranceDao encumbranceDao)
Sets the encumbranceDao attribute, allowing the injection of an implementation of the data access object that uses a specific O/R mechanism.

Parameters:
encumbranceDao - the implementation of encumbranceDao to set
See Also:
EncumbranceDao

setOriginEntryService

public void setOriginEntryService(OriginEntryService originEntryService)
Sets the originEntryService attribute, allowing the injection of an implementation of that service

Parameters:
originEntryService - the implementation of originEntryService to set
See Also:
OriginEntryService

setDateTimeService

public void setDateTimeService(org.kuali.rice.kns.service.DateTimeService dateTimeService)

setOriginEntryGroupService

public void setOriginEntryGroupService(OriginEntryGroupService originEntryGroupService)

setBalanceService

public void setBalanceService(BalanceService balanceService)

setBalanceTypeService

public void setBalanceTypeService(BalanceTypeService balanceTypeService)

setObjectTypeService

public void setObjectTypeService(ObjectTypeService objectTypeService)

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)

setPriorYearAccountService

public void setPriorYearAccountService(PriorYearAccountService priorYearAccountService)

setSubFundGroupService

public void setSubFundGroupService(SubFundGroupService subFundGroupService)

setPersistenceService

public void setPersistenceService(org.kuali.rice.kns.service.PersistenceService persistenceService)
Sets the persistenceService attribute value.

Parameters:
persistenceService - The persistenceService to set.

setYearEndDao

public void setYearEndDao(YearEndDao yearEndDao)

setConfigurationService

public void setConfigurationService(org.kuali.rice.kns.service.KualiConfigurationService configurationService)

setBatchFileDirectoryName

public void setBatchFileDirectoryName(String batchFileDirectoryName)

getEncumbranceClosingOriginEntryGenerationService

public EncumbranceClosingOriginEntryGenerationService getEncumbranceClosingOriginEntryGenerationService()
Gets the encumbranceClosingOriginEntryGenerationService attribute.

Returns:
Returns the encumbranceClosingOriginEntryGenerationService.

setEncumbranceClosingOriginEntryGenerationService

public void setEncumbranceClosingOriginEntryGenerationService(EncumbranceClosingOriginEntryGenerationService encumbranceClosingOriginEntryGenerationService)
Sets the encumbranceClosingOriginEntryGenerationService attribute value.

Parameters:
encumbranceClosingOriginEntryGenerationService - The encumbranceClosingOriginEntryGenerationService to set.

getNominalActivityClosingReportWriterService

public ReportWriterService getNominalActivityClosingReportWriterService()
Gets the nominalActivityClosingReportWriterService attribute.

Returns:
Returns the nominalActivityClosingReportWriterService.

setNominalActivityClosingReportWriterService

public void setNominalActivityClosingReportWriterService(ReportWriterService nominalActivityClosingReportWriterService)
Sets the nominalActivityClosingReportWriterService attribute value.

Parameters:
nominalActivityClosingReportWriterService - The nominalActivityClosingReportWriterService to set.

getBalanceForwardReportWriterService

public ReportWriterService getBalanceForwardReportWriterService()
Gets the balanceForwardReportWriterService attribute.

Returns:
Returns the balanceForwardReportWriterService.

setBalanceForwardReportWriterService

public void setBalanceForwardReportWriterService(ReportWriterService balanceForwardReportWriterService)
Sets the balanceForwardReportWriterService attribute value.

Parameters:
balanceForwardReportWriterService - The balanceForwardReportWriterService to set.

getEncumbranceClosingReportWriterService

public ReportWriterService getEncumbranceClosingReportWriterService()
Gets the encumbranceClosingReportWriterService attribute.

Returns:
Returns the encumbranceClosingReportWriterService.

setEncumbranceClosingReportWriterService

public void setEncumbranceClosingReportWriterService(ReportWriterService encumbranceClosingReportWriterService)
Sets the encumbranceClosingReportWriterService attribute value.

Parameters:
encumbranceClosingReportWriterService - The encumbranceClosingReportWriterService to set.


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.