org.kuali.kfs.coa.document
Class KualiAccountMaintainableImpl

java.lang.Object
  extended by org.kuali.rice.kns.maintenance.KualiMaintainableImpl
      extended by org.kuali.kfs.sys.document.FinancialSystemMaintainable
          extended by org.kuali.kfs.coa.document.KualiAccountMaintainableImpl
All Implemented Interfaces:
Serializable, org.kuali.rice.kns.lookup.SelectiveReferenceRefresher, org.kuali.rice.kns.maintenance.Maintainable
Direct Known Subclasses:
KualiAccountMaintainableImpl

public class KualiAccountMaintainableImpl
extends FinancialSystemMaintainable

This class overrides the saveBusinessObject() method which is called during post process from the KualiPostProcessor so that it can automatically deactivate the Sub-Accounts related to the account It also overrides the processAfterCopy so that it sets specific fields that shouldn't be copied to default values KualiPostProcessor

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
boClass, businessObject, businessObjectAuthorizationService, businessObjectDictionaryService, businessObjectMetaDataService, businessObjectService, dataDictionaryService, docTypeName, documentHelperService, documentNumber, encryptionService, inactiveRecordDisplay, maintenanceAction, maintenanceDocumentDictionaryService, maintenanceDocumentService, newCollectionLines, persistenceStructureService, personService
 
Constructor Summary
KualiAccountMaintainableImpl()
           
 
Method Summary
 List<org.kuali.rice.kns.document.MaintenanceLock> generateMaintenanceLocks()
           
 String getRoutingAccountsSupervisorySystemsIdentifier()
          Determines who should be FYI'd as the account supervisor for the routing of the account maintenance document.
protected  boolean isClosingAccount()
           
protected  void populateChartOfAccountsCodeFields()
          Populates all chartOfAccountsCode fields according to corresponding accountNumber fields in this BO.
 void processAfterCopy(org.kuali.rice.kns.document.MaintenanceDocument document, Map<String,String[]> parameters)
          After a copy is done set specific fields on Account to default values
 void refresh(String refreshCaller, Map fieldValues, org.kuali.rice.kns.document.MaintenanceDocument document)
          Had to override this method because account guideline data was lost when copied and then a lookup is performed
protected  void refreshReferences(String referencesToRefresh)
           
protected  String removeReferenceFromString(String referencesToRefresh, String referenceToRemove)
          Removes a named reference from a referencesToRefresh string
protected  Account retrieveExistingAccountFromDB()
           
 void saveBusinessObject()
          Automatically deactivates SubAccounts after saving the Account
 
Methods inherited from class org.kuali.kfs.sys.document.FinancialSystemMaintainable
answerSplitNodeQuestion, processAfterPost, processBeforeAddLine
 
Methods inherited from class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
addMultipleValueLookupResults, addNewLineToCollection, clearBusinessObjectOfRestrictedValues, clearCollectionRestrictedValues, clearFieldRestrictedValues, decryptEncryptedData, deleteBusinessObject, doRouteStatusChange, generateAllAffectedReferences, getAffectedReferencesFromLookup, getAllRefreshableReferences, getBoClass, getBusinessObject, getBusinessObjectAuthorizationService, getBusinessObjectDictionaryService, getBusinessObjectMetaDataService, getBusinessObjectService, getCoreSections, getCustomLockDescriptor, getDataDictionaryService, getDocumentHelperService, getDocumentTitle, getDocumentTypeName, getDuplicateIdentifierFieldsFromDataDictionary, getEncryptionService, getInactiveRecordDisplay, getLockingDocumentId, getMaintainableTitle, getMaintenanceAction, getMaintenanceDocumentDictionaryService, getMaintenanceDocumentService, getMultiValueIdentifierList, getNewCollectionLine, getPersistenceStructureService, getPersonService, getSections, getShowInactiveRecords, getWorkflowEngineDocumentIdsToLock, hasBusinessObjectExisted, initNewCollectionLine, isBoNotesEnabled, isExternalBusinessObject, isOldBusinessObjectInDocument, isRelationshipRefreshable, performCollectionForceUpperCase, performFieldForceUpperCase, performFieldForceUpperCase, performForceUpperCase, populateBusinessObject, populateNewCollectionLines, populateNewSubCollectionLines, prepareBusinessObject, prepareBusinessObjectForAdditionFromMultipleValueLookup, prepareForSave, processAfterAddLine, processAfterEdit, processAfterNew, processAfterRetrieve, setBoClass, setBusinessObject, setDocumentNumber, setGenerateBlankRequiredValues, setGenerateDefaultValues, setMaintenanceAction, setNewCollectionLineDefaultValues, setShowInactiveRecords, setupNewFromExisting, shouldFieldBeEncrypted, useCustomLockDescriptors
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KualiAccountMaintainableImpl

public KualiAccountMaintainableImpl()
Method Detail

saveBusinessObject

public void saveBusinessObject()
Automatically deactivates SubAccounts after saving the Account

Specified by:
saveBusinessObject in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
saveBusinessObject in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
Maintainable.saveBusinessObject()

processAfterCopy

public void processAfterCopy(org.kuali.rice.kns.document.MaintenanceDocument document,
                             Map<String,String[]> parameters)
After a copy is done set specific fields on Account to default values

Specified by:
processAfterCopy in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
processAfterCopy in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
org.kuali.rice.kns.maintenance.KualiMaintainableImpl#processAfterCopy()

generateMaintenanceLocks

public List<org.kuali.rice.kns.document.MaintenanceLock> generateMaintenanceLocks()
Specified by:
generateMaintenanceLocks in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
generateMaintenanceLocks in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl

retrieveExistingAccountFromDB

protected Account retrieveExistingAccountFromDB()

isClosingAccount

protected boolean isClosingAccount()

getRoutingAccountsSupervisorySystemsIdentifier

public String getRoutingAccountsSupervisorySystemsIdentifier()
Determines who should be FYI'd as the account supervisor for the routing of the account maintenance document. If there is an existing account, it uses the account supervisor from that; otherwise, it uses the account supervisor from the business object of this maintainable

Returns:
an appropriate account supervisor to FYI during account maintenance document routing

refresh

public void refresh(String refreshCaller,
                    Map fieldValues,
                    org.kuali.rice.kns.document.MaintenanceDocument document)
Had to override this method because account guideline data was lost when copied and then a lookup is performed

Specified by:
refresh in interface org.kuali.rice.kns.maintenance.Maintainable
Overrides:
refresh in class org.kuali.rice.kns.maintenance.KualiMaintainableImpl
See Also:
KualiMaintainableImpl.refresh(java.lang.String, java.util.Map, org.kuali.rice.kns.document.MaintenanceDocument)

refreshReferences

protected void refreshReferences(String referencesToRefresh)
Overrides:
refreshReferences in class FinancialSystemMaintainable
See Also:
KualiMaintainableImpl.refreshReferences(String)

removeReferenceFromString

protected String removeReferenceFromString(String referencesToRefresh,
                                           String referenceToRemove)
Removes a named reference from a referencesToRefresh string


populateChartOfAccountsCodeFields

protected void populateChartOfAccountsCodeFields()
Description copied from class: FinancialSystemMaintainable
Populates all chartOfAccountsCode fields according to corresponding accountNumber fields in this BO. The chartOfAccountsCode-accountNumber pairs are (part of) the FKs for the reference accounts in this BO.

Overrides:
populateChartOfAccountsCodeFields in class FinancialSystemMaintainable
See Also:
Special treatment is needed when a new Account is created, the chartCode-accountNumber fields in the document can use the new account that's being created; in which case chart code shall be populated from the PK chart code in the document instead of retrieving it from DB using the account number, as the new account doesn't exist in the DB yet.


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