org.kuali.kfs.module.cam.document.validation.impl
Class AssetTransferDocumentRule

java.lang.Object
  extended by org.kuali.rice.kns.rules.DocumentRuleBase
      extended by org.kuali.kfs.sys.document.validation.impl.LedgerPostingDocumentRuleBase
          extended by org.kuali.kfs.sys.document.validation.impl.GeneralLedgerPostingDocumentRuleBase
              extended by org.kuali.kfs.module.cam.document.validation.impl.AssetTransferDocumentRule
All Implemented Interfaces:
org.kuali.rice.kns.rule.AddAdHocRoutePersonRule, org.kuali.rice.kns.rule.AddAdHocRouteWorkgroupRule, org.kuali.rice.kns.rule.AddNoteRule, org.kuali.rice.kns.rule.ApproveDocumentRule, org.kuali.rice.kns.rule.BusinessRule, org.kuali.rice.kns.rule.RouteDocumentRule, org.kuali.rice.kns.rule.SaveDocumentRule, org.kuali.rice.kns.rule.SendAdHocRequestsRule

public class AssetTransferDocumentRule
extends GeneralLedgerPostingDocumentRuleBase


Field Summary
protected  AssetLockService assetLockService
           
protected  AssetPaymentService assetPaymentService
           
protected  AssetService assetService
           
protected static Map<AssetLocationService.LocationField,String> LOCATION_FIELD_MAP
           
protected  ObjectCodeService objectCodeService
           
protected  UniversityDateService universityDateService
           
 
Constructor Summary
AssetTransferDocumentRule()
           
 
Method Summary
protected  boolean applyRules(org.kuali.rice.kns.document.Document document)
          This method applies business rules
protected  boolean checkReferencesExist(AssetTransferDocument assetTransferDocument)
          This method checks if reference objects exist in the database or not
 AssetLockService getAssetLockService()
           
 AssetPaymentService getAssetPaymentService()
           
 AssetService getAssetService()
           
 ObjectCodeService getObjectCodeService()
           
 UniversityDateService getUniversityDateService()
           
protected  boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.Document document)
           
protected  boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.Document document)
           
 org.kuali.rice.kns.util.TypedArrayList putError(String propertyName, String errorKey, String... errorParameters)
          Convenience method to append the path prefix
protected  List<Long> retrieveAssetNumberForLocking(org.kuali.rice.kns.document.Document document)
          Retrieve asset number need to be locked.
 void setAssetPaymentService(AssetPaymentService assetPaymentService)
           
 void setAssetService(AssetService assetService)
           
 void setObjectCodeService(ObjectCodeService objectCodeService)
           
 void setUniversityDateService(UniversityDateService universityDateService)
           
protected  boolean validateAssetObjectCode(AssetObjectCode assetObjectCode, String chartOfAccountsCode, String finObjectSubTypeCode)
          Asset Object Code must exist as an active status.
protected  boolean validateAssetObjectCodeDefn(AssetTransferDocument assetTransferDocument, Asset asset)
           
protected  boolean validateFinancialObjectCodes(Asset asset, AssetPayment assetPayment, AssetObjectCode assetObjectCode)
          Check Financial Object Code for GLPE.
protected  boolean validateFinObjectCodeForGLPosting(String chartOfAccountsCode, String finObjectCode, ObjectCode finObject, String glPostingType)
          check existence and active status for given financial Object Code BO.
protected  boolean validateLocation(AssetTransferDocument assetTransferDocument)
          This method validates location information provided by the user
protected  boolean validateOwnerAccount(AssetTransferDocument assetTransferDocument)
          This method validates the new owner organization and account provided
protected  boolean validatePaymentObjectCodes(AssetTransferDocument assetTransferDocument)
          checks that all the asset payments to be transfer has a valid object code in the new Chart of account code and current fiscal year
 
Methods inherited from class org.kuali.rice.kns.rules.DocumentRuleBase
getDataDictionaryService, getDictionaryValidationService, getDocumentHelperService, getIdentityManagementService, getKualiConfigurationService, getMaxDictionaryValidationDepth, getPersonService, getWorkflowInfoService, isAddHocRoutePersonValid, isAddHocRouteWorkgroupValid, isAdHocRouteRecipientsValid, isDocumentAttributesValid, isDocumentOverviewValid, isNoteValid, processAddAdHocRoutePerson, processAddAdHocRouteWorkgroup, processAddNote, processApproveDocument, processCustomAddAdHocRoutePersonBusinessRules, processCustomAddAdHocRouteWorkgroupBusinessRules, processCustomAddNoteBusinessRules, processCustomApproveDocumentBusinessRules, processCustomSendAdHocRequests, processRouteDocument, processSaveDocument, processSendAdHocRequests, setMaxDictionaryValidationDepth, validateSensitiveDataValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCATION_FIELD_MAP

protected static final Map<AssetLocationService.LocationField,String> LOCATION_FIELD_MAP

universityDateService

protected UniversityDateService universityDateService

assetPaymentService

protected AssetPaymentService assetPaymentService

assetService

protected AssetService assetService

objectCodeService

protected ObjectCodeService objectCodeService

assetLockService

protected AssetLockService assetLockService
Constructor Detail

AssetTransferDocumentRule

public AssetTransferDocumentRule()
Method Detail

processCustomSaveDocumentBusinessRules

protected boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.Document document)
Overrides:
processCustomSaveDocumentBusinessRules in class org.kuali.rice.kns.rules.DocumentRuleBase
See Also:
DocumentRuleBase.processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.Document)

retrieveAssetNumberForLocking

protected List<Long> retrieveAssetNumberForLocking(org.kuali.rice.kns.document.Document document)
Retrieve asset number need to be locked.

Parameters:
document -
Returns:

validateAssetObjectCodeDefn

protected boolean validateAssetObjectCodeDefn(AssetTransferDocument assetTransferDocument,
                                              Asset asset)

validateAssetObjectCode

protected boolean validateAssetObjectCode(AssetObjectCode assetObjectCode,
                                          String chartOfAccountsCode,
                                          String finObjectSubTypeCode)
Asset Object Code must exist as an active status.

Parameters:
asset -
assetPayment -
Returns:

validateFinancialObjectCodes

protected boolean validateFinancialObjectCodes(Asset asset,
                                               AssetPayment assetPayment,
                                               AssetObjectCode assetObjectCode)
Check Financial Object Code for GLPE.

Parameters:
asset -
assetPayment -
Returns:

validateFinObjectCodeForGLPosting

protected boolean validateFinObjectCodeForGLPosting(String chartOfAccountsCode,
                                                    String finObjectCode,
                                                    ObjectCode finObject,
                                                    String glPostingType)
check existence and active status for given financial Object Code BO.

Parameters:
chartCode -
finObjectCode -
finObject -
Returns:

processCustomRouteDocumentBusinessRules

protected boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.Document document)
Overrides:
processCustomRouteDocumentBusinessRules in class org.kuali.rice.kns.rules.DocumentRuleBase
See Also:
DocumentRuleBase.processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.Document)

applyRules

protected boolean applyRules(org.kuali.rice.kns.document.Document document)
This method applies business rules

Parameters:
document - Transfer Document
Returns:
true if all rules are pass

validateLocation

protected boolean validateLocation(AssetTransferDocument assetTransferDocument)
This method validates location information provided by the user

Parameters:
assetTransferDocument - Transfer Document
Returns:
true is location information is valid for the asset type

checkReferencesExist

protected boolean checkReferencesExist(AssetTransferDocument assetTransferDocument)
This method checks if reference objects exist in the database or not

Parameters:
assetTransferDocument - Transfer document
Returns:
true if all objects exists in db

validateOwnerAccount

protected boolean validateOwnerAccount(AssetTransferDocument assetTransferDocument)
This method validates the new owner organization and account provided

Parameters:
assetTransferDocument -
Returns:

validatePaymentObjectCodes

protected boolean validatePaymentObjectCodes(AssetTransferDocument assetTransferDocument)
checks that all the asset payments to be transfer has a valid object code in the new Chart of account code and current fiscal year

Parameters:
assetTransferDocument -
Returns:

putError

public org.kuali.rice.kns.util.TypedArrayList putError(String propertyName,
                                                       String errorKey,
                                                       String... errorParameters)
Convenience method to append the path prefix


getUniversityDateService

public UniversityDateService getUniversityDateService()

setUniversityDateService

public void setUniversityDateService(UniversityDateService universityDateService)

getAssetPaymentService

public AssetPaymentService getAssetPaymentService()

setAssetPaymentService

public void setAssetPaymentService(AssetPaymentService assetPaymentService)

getAssetService

public AssetService getAssetService()

getAssetLockService

public AssetLockService getAssetLockService()

setAssetService

public void setAssetService(AssetService assetService)

getObjectCodeService

public ObjectCodeService getObjectCodeService()

setObjectCodeService

public void setObjectCodeService(ObjectCodeService objectCodeService)


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