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

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

public class EncumbranceClosingOriginEntryGenerationServiceImpl
extends Object
implements EncumbranceClosingOriginEntryGenerationService

The default implementation of the EncumbranceClosingOriginEntryGenerationService


Constructor Summary
EncumbranceClosingOriginEntryGenerationServiceImpl()
           
 
Method Summary
 OriginEntryOffsetPair createBeginningBalanceEntryOffsetPair(Encumbrance encumbrance, Integer closingFiscalYear, Date transactionDate)
          Create a pair of OriginEntries, one explicit and one offset to carry forward an encumbrance.
 OriginEntryOffsetPair createCostShareBeginningBalanceEntryOffsetPair(Encumbrance encumbrance, Date transactionDate)
          Create a pair of cost share entries, one explicit and one offset to carry forward an encumbrance after validating the encumbrance.
 A21SubAccountService getA21SubAccountService()
          Gets the a21SubAccountService attribute.
 AccountingCycleCachingService getAccountingCycleCachingService()
          Gets the accountingCycleCachingService attribute.
 org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
          Gets the businessObjectService attribute.
 org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
          Gets the dataDictionaryService attribute.
protected  List<String> getEncumbranceBalanceTypeCodes()
           
 FlexibleOffsetAccountService getFlexibleOffsetAccountService()
          Gets the flexibleOffsetAccountService attribute.
 ObjectCodeService getObjectCodeService()
          Gets the objectCodeService attribute.
 OffsetDefinitionService getOffsetDefinitionService()
          Gets the offsetDefinitionService attribute.
 OptionsService getOptionsService()
          Gets the optionsService attribute.
 org.kuali.rice.kns.service.ParameterService getParameterService()
          Gets the parameterService attribute.
 SubFundGroupService getSubFundGroupService()
          Gets the subFundGroupService attribute.
 SubObjectCodeService getSubObjectCodeService()
          Gets the subObjectCodeService attribute.
 boolean isEncumbranceClosed(Encumbrance encumbrance)
          Determine whether or not the encumbrance has been fully relieved.
protected  String overrideCostShareObjectCode(String levelCode, String objectCode)
          This method eases the institutional customization for Cost Sharing Object Codes for OriginEntries
protected  PriorYearAccount retrievePriorYearAccount(String chartOfAccountsCode, String accountNumber)
          Retrieves a prior year account from the persistence store
 void setA21SubAccountService(A21SubAccountService subAccountService)
          Sets the a21SubAccountService attribute value.
 void setAccountingCycleCachingService(AccountingCycleCachingService accountingCycleCachingService)
          Sets the accountingCycleCachingService attribute value.
 void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
          Sets the businessObjectService attribute value.
 void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
          Sets the dataDictionaryService attribute value.
 void setFlexibleOffsetAccountService(FlexibleOffsetAccountService flexibleOffsetAccountService)
          Sets the flexibleOffsetAccountService attribute value.
 void setObjectCodeService(ObjectCodeService objectCodeService)
          Sets the objectCodeService attribute value.
 void setOffsetDefinitionService(OffsetDefinitionService offsetDefinitionService)
          Sets the offsetDefinitionService attribute value.
 void setOptionsService(OptionsService optionsService)
          Sets the optionsService attribute value.
 void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
          Sets the parameterService attribute value.
 void setSubFundGroupService(SubFundGroupService subFundGroupService)
          Sets the subFundGroupService attribute value.
 void setSubObjectCodeService(SubObjectCodeService subObjectCodeService)
          Sets the subObjectCodeService attribute value.
 boolean shouldForwardCostShareForEncumbrance(OriginEntryFull entry, OriginEntryFull offset, Encumbrance encumbrance, String objectTypeCode)
          Do some validation and make sure that the encumbrance A21SubAccount is a cost share sub-account.
 boolean shouldForwardEncumbrance(Encumbrance encumbrance)
          Determine whether or not an encumbrance should be carried forward from one fiscal year to the next.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncumbranceClosingOriginEntryGenerationServiceImpl

public EncumbranceClosingOriginEntryGenerationServiceImpl()
Method Detail

createCostShareBeginningBalanceEntryOffsetPair

public OriginEntryOffsetPair createCostShareBeginningBalanceEntryOffsetPair(Encumbrance encumbrance,
                                                                            Date transactionDate)
Description copied from interface: EncumbranceClosingOriginEntryGenerationService
Create a pair of cost share entries, one explicit and one offset to carry forward an encumbrance after validating the encumbrance.

Specified by:
createCostShareBeginningBalanceEntryOffsetPair in interface EncumbranceClosingOriginEntryGenerationService
Parameters:
encumbrance - the encumbrance to create origin entry and offset for
transactionDate - the date all origin entries should have as their transaction date
Returns:
a cost share entry/offset pair to carry forward the given encumbrance.
See Also:
EncumbranceClosingOriginEntryGenerationService.createBeginningBalanceEntryOffsetPair(org.kuali.kfs.gl.businessobject.Encumbrance, java.lang.Integer, java.sql.Date)

createBeginningBalanceEntryOffsetPair

public OriginEntryOffsetPair createBeginningBalanceEntryOffsetPair(Encumbrance encumbrance,
                                                                   Integer closingFiscalYear,
                                                                   Date transactionDate)
Description copied from interface: EncumbranceClosingOriginEntryGenerationService
Create a pair of OriginEntries, one explicit and one offset to carry forward an encumbrance.

Specified by:
createBeginningBalanceEntryOffsetPair in interface EncumbranceClosingOriginEntryGenerationService
Parameters:
encumbrance - the encumbrance to create origin entries for
closingFiscalYear - the fiscal year that's closing
transactionDate - the transaction date these entries should have
Returns:
a entry/offset pair for the given encumbrance
See Also:
EncumbranceClosingOriginEntryGenerationService.createCostShareBeginningBalanceEntryOffsetPair(org.kuali.kfs.gl.businessobject.Encumbrance, java.sql.Date)

shouldForwardEncumbrance

public boolean shouldForwardEncumbrance(Encumbrance encumbrance)
Determine whether or not an encumbrance should be carried forward from one fiscal year to the next.

Specified by:
shouldForwardEncumbrance in interface EncumbranceClosingOriginEntryGenerationService
Parameters:
encumbrance - the encumbrance to qualify
Returns:
true if the encumbrance should be rolled forward from the closing fiscal year to the opening fiscal year.

getEncumbranceBalanceTypeCodes

protected List<String> getEncumbranceBalanceTypeCodes()
Returns:
a list of BalanceType codes which correspond to encumbrance balance types

isEncumbranceClosed

public boolean isEncumbranceClosed(Encumbrance encumbrance)
Determine whether or not the encumbrance has been fully relieved.

Specified by:
isEncumbranceClosed in interface EncumbranceClosingOriginEntryGenerationService
Parameters:
encumbrance - the encumbrance to qualify
Returns:
true if the amount closed on the encumbrance is NOT equal to the amount of the encumbrance itself, e.g. if the encumbrance has not yet been paid off.

shouldForwardCostShareForEncumbrance

public boolean shouldForwardCostShareForEncumbrance(OriginEntryFull entry,
                                                    OriginEntryFull offset,
                                                    Encumbrance encumbrance,
                                                    String objectTypeCode)
                                             throws FatalErrorException
Do some validation and make sure that the encumbrance A21SubAccount is a cost share sub-account.

Specified by:
shouldForwardCostShareForEncumbrance in interface EncumbranceClosingOriginEntryGenerationService
Parameters:
entry - not used in this implementation
offset - not used in this implementation
encumbrance - the encumbrance whose A21SubAccount must be qualified
objectTypeCode - the object type code of the generated entries
Returns:
true if the encumbrance is eligible for cost share.
Throws:
FatalErrorException - thrown if a given A21SubAccount, SubFundGroup, or PriorYearAccount record is not found in the database

retrievePriorYearAccount

protected PriorYearAccount retrievePriorYearAccount(String chartOfAccountsCode,
                                                    String accountNumber)
Retrieves a prior year account from the persistence store

Parameters:
chartOfAccountsCode - the chart of accounts for the prior year account
accountNumber - the account number for the prior year account
Returns:
the PriorYearAccount

overrideCostShareObjectCode

protected String overrideCostShareObjectCode(String levelCode,
                                             String objectCode)
This method eases the institutional customization for Cost Sharing Object Codes for OriginEntries

Parameters:
levelCode - of the originEntry
objectCode - of the originEntry
Returns:
the new objectCode

getParameterService

public org.kuali.rice.kns.service.ParameterService getParameterService()
Gets the parameterService attribute.

Returns:
Returns the parameterService.

setParameterService

public void setParameterService(org.kuali.rice.kns.service.ParameterService parameterService)
Sets the parameterService attribute value.

Parameters:
parameterService - The parameterService to set.

getOffsetDefinitionService

public OffsetDefinitionService getOffsetDefinitionService()
Gets the offsetDefinitionService attribute.

Returns:
Returns the offsetDefinitionService.

setOffsetDefinitionService

public void setOffsetDefinitionService(OffsetDefinitionService offsetDefinitionService)
Sets the offsetDefinitionService attribute value.

Parameters:
offsetDefinitionService - The offsetDefinitionService to set.

getObjectCodeService

public ObjectCodeService getObjectCodeService()
Gets the objectCodeService attribute.

Returns:
Returns the objectCodeService.

setObjectCodeService

public void setObjectCodeService(ObjectCodeService objectCodeService)
Sets the objectCodeService attribute value.

Parameters:
objectCodeService - The objectCodeService to set.

getDataDictionaryService

public org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
Gets the dataDictionaryService attribute.

Returns:
Returns the dataDictionaryService.

setDataDictionaryService

public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
Sets the dataDictionaryService attribute value.

Parameters:
dataDictionaryService - The dataDictionaryService to set.

getFlexibleOffsetAccountService

public FlexibleOffsetAccountService getFlexibleOffsetAccountService()
Gets the flexibleOffsetAccountService attribute.

Returns:
Returns the flexibleOffsetAccountService.

setFlexibleOffsetAccountService

public void setFlexibleOffsetAccountService(FlexibleOffsetAccountService flexibleOffsetAccountService)
Sets the flexibleOffsetAccountService attribute value.

Parameters:
flexibleOffsetAccountService - The flexibleOffsetAccountService to set.

getA21SubAccountService

public A21SubAccountService getA21SubAccountService()
Gets the a21SubAccountService attribute.

Returns:
Returns the a21SubAccountService.

setA21SubAccountService

public void setA21SubAccountService(A21SubAccountService subAccountService)
Sets the a21SubAccountService attribute value.

Parameters:
subAccountService - The a21SubAccountService to set.

getSubObjectCodeService

public SubObjectCodeService getSubObjectCodeService()
Gets the subObjectCodeService attribute.

Returns:
Returns the subObjectCodeService.

setSubObjectCodeService

public void setSubObjectCodeService(SubObjectCodeService subObjectCodeService)
Sets the subObjectCodeService attribute value.

Parameters:
subObjectCodeService - The subObjectCodeService to set.

getOptionsService

public OptionsService getOptionsService()
Gets the optionsService attribute.

Returns:
Returns the optionsService.

setOptionsService

public void setOptionsService(OptionsService optionsService)
Sets the optionsService attribute value.

Parameters:
optionsService - The optionsService to set.

getSubFundGroupService

public SubFundGroupService getSubFundGroupService()
Gets the subFundGroupService attribute.

Returns:
Returns the subFundGroupService.

setSubFundGroupService

public void setSubFundGroupService(SubFundGroupService subFundGroupService)
Sets the subFundGroupService attribute value.

Parameters:
subFundGroupService - The subFundGroupService to set.

getBusinessObjectService

public org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
Gets the businessObjectService attribute.

Returns:
Returns the businessObjectService.

setBusinessObjectService

public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
Sets the businessObjectService attribute value.

Parameters:
businessObjectService - The businessObjectService to set.

getAccountingCycleCachingService

public AccountingCycleCachingService getAccountingCycleCachingService()
Gets the accountingCycleCachingService attribute.

Returns:
Returns the accountingCycleCachingService.

setAccountingCycleCachingService

public void setAccountingCycleCachingService(AccountingCycleCachingService accountingCycleCachingService)
Sets the accountingCycleCachingService attribute value.

Parameters:
accountingCycleCachingService - The accountingCycleCachingService to set.


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