public class AssetGlobalRule extends org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
Modifier and Type | Field and Description |
---|---|
protected static Map<AssetLocationService.LocationField,String> |
LOCATION_FIELD_MAP |
boDictionaryService, boService, businessObjectAuthorizationService, businessObjectMetaDataService, configService, dataObjectMetaDataService, ddService, dictionaryValidationService, DOCUMENT_ERROR_PREFIX, documentHelperService, MAINTAINABLE_ERROR_PATH, MAINTAINABLE_ERROR_PREFIX, maintDocDictionaryService, persistenceStructureService, personService, priorErrorPath, roleService, workflowDocumentService
Constructor and Description |
---|
AssetGlobalRule() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkNegativeOrZeroPayment(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument,
AssetPaymentDetail assetPaymentDetail)
"Add Negative Payment" permission check.
|
protected boolean |
checkReferenceExists(AssetGlobal assetGlobal,
AssetPaymentDetail assetPaymentDetail)
This method checks reference fields when adding new payment into collection.
|
protected boolean |
checkReferenceExists(AssetGlobalDetail assetGlobalDetail)
This method checks reference fields when adding one shared location information into collection.
|
protected boolean |
checkRequiredFieldsForNewOrNonCapital(AssetPaymentDetail assetPaymentDetail)
This method check the required fields for acquisition type New .
|
protected boolean |
dataDictionaryValidate(org.kuali.rice.kns.document.MaintenanceDocument document) |
protected AssetAcquisitionTypeService |
getAssetAcquisitionTypeService() |
protected AssetGlobalService |
getAssetGlobalService() |
protected AssetPaymentService |
getAssetPaymentService() |
protected AssetService |
getAssetService() |
protected String |
getCapitalizationThresholdAmount()
Get the capitalization threshold amount from the system parameter setting.
|
protected org.kuali.rice.coreservice.framework.parameter.ParameterService |
getParameterService() |
protected boolean |
isAccountInvalid(Account account) |
protected boolean |
isCapitalStatus(AssetGlobal assetGlobal) |
protected boolean |
isOrgOwnerAccountFromCab(AssetGlobal assetGlobal)
Check if organization owner account is set from CAB.
|
protected boolean |
isStatusCodeRetired(String statusCode) |
boolean |
processCustomAddCollectionLineBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document,
String collectionName,
org.kuali.rice.krad.bo.PersistableBusinessObject line) |
protected boolean |
processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document) |
protected boolean |
processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document) |
boolean |
processSaveDocument(org.kuali.rice.krad.document.Document document) |
protected boolean |
setAssetLock(org.kuali.rice.kns.document.MaintenanceDocument document,
AssetGlobal assetGlobal)
Locking on separate source asset number
|
protected boolean |
validateAccount(AssetGlobal assetGlobal) |
protected boolean |
validateAcquisitionIncomeObjectCode(AssetGlobal assetGlobal)
Validate offset object code
|
static boolean |
validateAssetAlreadySeparated(Long separateSourceCapitalAssetNumber)
Give an error if this asset has already been separated
|
protected boolean |
validateAssetDescription(AssetGlobalDetail uniqueLocationDetails)
Validates the asset description.
|
protected boolean |
validateAssetTotalAmount(org.kuali.rice.kns.document.MaintenanceDocument document)
check if amount is above threshold for capital assets for normal user.
|
static boolean |
validateAssetTotalCostMatchesPaymentTotalCost(AssetGlobal assetGlobal)
Give an error if this asset can't be separated due to mismatching amount on asset and AssetPayment records
|
protected boolean |
validateAssetType(AssetGlobal assetGlobal)
Validate asset type at the AssetGlobal level.
|
protected boolean |
validateAssetType(AssetGlobalDetail assetGlobalUniqueDetails,
Integer sharedIndex,
Integer uniqueIndex)
Validate asset type in the AssetGlobalUniqueDetails level, and ensures the value is in the list of valid types.
|
protected boolean |
validateCapitalAssetAmountAboveThreshhold(org.kuali.rice.kns.document.MaintenanceDocument document,
org.kuali.rice.core.api.util.type.KualiDecimal assetAmount,
String capitalizationThresholdAmount)
Validate Capital Asset Amount above the threshold or below the amount for authorized user only.
|
protected boolean |
validateCapitalAssetTypeCode(AssetGlobalDetail uniqueLocationDetails)
Validates the capital asset type code.
|
protected boolean |
validateDocumentTypeForNonNew(String acquisitionTypeCode,
AssetPaymentDetail assetPaymentDetail)
When acquisition type code is Capital (Gifts, Transfer-in, State excess, and Found), payment document type code will be
assigned to AA for Add Asset Document.
|
protected boolean |
validateLocation(AssetGlobal assetGlobal,
AssetGlobalDetail assetGlobalDetail)
Validate location
|
protected boolean |
validateLocationCollection(AssetGlobal assetGlobal,
List<AssetGlobalDetail> assetSharedDetails) |
protected boolean |
validateLocationQuantity(org.kuali.rice.krad.bo.PersistableBusinessObject line)
Validated the location quantity
|
protected boolean |
validateManufacturer(AssetGlobalDetail uniqueLocationDetails)
Validates the manufacturer.
|
protected boolean |
validateNonCapitalAssetAmountBelowThreshold(org.kuali.rice.core.api.util.type.KualiDecimal assetAmount,
String capitalizationThresholdAmount)
Validate non-capital asset amount below the threshold.
|
protected boolean |
validateObjectCode(ObjectCode objectCode,
AssetGlobal assetGlobal)
Check object code is set to capital only when the status is capital.
|
protected boolean |
validatePaymentCollection(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument,
AssetGlobal assetGlobal) |
protected boolean |
validatePaymentLine(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument,
AssetGlobal assetGlobal,
AssetPaymentDetail assetPaymentDetail) |
protected boolean |
validatePostedDate(AssetPaymentDetail assetPaymentDetail)
Validates the posted date payment posted date can't be a future date
|
protected boolean |
validateSeparateSourceAmount(AssetGlobalDetail uniqueLocationDetail,
org.kuali.rice.kns.document.MaintenanceDocument document)
Validates the separate source amount.
|
protected boolean |
validateSeparateSourceAmountAboveThreshold(org.kuali.rice.kns.document.MaintenanceDocument document,
AssetGlobalDetail assetGlobalUniqueDetail)
Validate all separate source amount is above the capital asset threshold amount.
|
protected boolean |
validateTagDuplication(List<AssetGlobalDetail> assetSharedDetails) |
protected boolean |
validateTagDuplication(List<AssetGlobalDetail> assetSharedDetails,
String campusTagNumber) |
protected boolean |
validateTotalCostAmount(AssetGlobal assetGlobal)
Validate that the total cost of the source asset is not zero or a negative amount.
|
protected boolean |
validateVendorAndManufacturer(AssetGlobal assetGlobal) |
checkEmptyBOField, checkEmptyDocumentField, checkEmptyValue, checkForPartiallyFilledOutReferenceForeignKeys, clearErrorPath, consolidateFieldNames, errorAlreadyExists, getBoService, getConfigService, getDataObjectMetaDataService, getDateTimeService, getDdService, getDictionaryValidationService, getDocumentHelperService, getFieldLabel, getFieldLabel, getHumanReadablePrimaryKeyFieldNames, getMaintDocDictionaryService, getNewBo, getOldBo, getPersistenceStructureService, getPersonService, getRoleService, getWorkflowDocumentService, isCorrectMaintenanceClass, isDocumentInactivatingBusinessObject, isDocumentValidForSave, primaryKeyCheck, processAddCollectionLineBusinessRules, processApproveDocument, processCustomApproveDocumentBusinessRules, processGlobalApproveDocumentBusinessRules, processGlobalRouteDocumentBusinessRules, processGlobalSaveDocumentBusinessRules, processInactivationBlockChecking, processInactivationBlockChecking, processRouteDocument, putDocumentError, putDocumentError, putFieldError, putFieldError, putFieldError, putFieldErrorWithShortLabel, putGlobalError, putGlobalError, putGlobalError, putGlobalsError, putGlobalsError, putInactivationBlockingErrorOnPage, resumeErrorPath, setBoDictionaryService, setBoService, setBusinessObjectAuthorizationService, setBusinessObjectMetaDataService, setConfigService, setDataObjectMetaDataService, setDdService, setDictionaryValidationService, setDocumentHelperService, setMaintDocDictionaryService, setNewBo, setPersistenceStructureService, setPersonService, setupBaseConvenienceObjects, setupConvenienceObjects, setWorkflowDocumentService, showErrorMap, validateDocumentStructure, validateDuplicateIdentifierInDataDictionary, validateGlobalBusinessObjectPersistable, validateMaintenanceDocument
buildDocumentTypeActionRequestPermissionDetails, buildDocumentTypePermissionDetails, getDataDictionaryService, getDocumentDictionaryService, getGroupService, getKualiConfigurationService, getMaxDictionaryValidationDepth, getPermissionService, hasAdHocRouteCompletion, isAddHocRoutePersonValid, isAddHocRouteWorkgroupValid, isAdHocRouteCompletionToInitiator, isAdHocRouteRecipientsValid, isDocumentAttributesValid, isDocumentOverviewValid, isNoteValid, processAddAdHocRoutePerson, processAddAdHocRouteWorkgroup, processAddNote, processCompleteDocument, processCustomAddAdHocRoutePersonBusinessRules, processCustomAddAdHocRouteWorkgroupBusinessRules, processCustomAddNoteBusinessRules, processCustomApproveDocumentBusinessRules, processCustomCompleteDocumentBusinessRules, processCustomRouteDocumentBusinessRules, processCustomSaveDocumentBusinessRules, processCustomSendAdHocRequests, processSendAdHocRequests, setDocumentDictionaryService, setMaxDictionaryValidationDepth, useKimPermission, validateSensitiveDataValue
protected static final Map<AssetLocationService.LocationField,String> LOCATION_FIELD_MAP
public AssetGlobalRule()
protected boolean checkReferenceExists(AssetGlobal assetGlobal, AssetPaymentDetail assetPaymentDetail)
assetGlobal
- assetPaymentDetail
- protected boolean checkReferenceExists(AssetGlobalDetail assetGlobalDetail)
assetGlobalDetail
- protected boolean isCapitalStatus(AssetGlobal assetGlobal)
protected boolean isStatusCodeRetired(String statusCode)
public boolean processCustomAddCollectionLineBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document, String collectionName, org.kuali.rice.krad.bo.PersistableBusinessObject line)
processCustomAddCollectionLineBusinessRules
in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
protected boolean validateLocationQuantity(org.kuali.rice.krad.bo.PersistableBusinessObject line)
line
- protected boolean validateTagDuplication(List<AssetGlobalDetail> assetSharedDetails, String campusTagNumber)
protected boolean validateTagDuplication(List<AssetGlobalDetail> assetSharedDetails)
protected boolean validatePaymentLine(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument, AssetGlobal assetGlobal, AssetPaymentDetail assetPaymentDetail)
protected boolean checkNegativeOrZeroPayment(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument, AssetPaymentDetail assetPaymentDetail)
maintenanceDocument
- assetPaymentDetail
- protected boolean checkRequiredFieldsForNewOrNonCapital(AssetPaymentDetail assetPaymentDetail)
assetPaymentDetail
- protected boolean validatePostedDate(AssetPaymentDetail assetPaymentDetail)
assetPaymentDetail
- protected boolean validateDocumentTypeForNonNew(String acquisitionTypeCode, AssetPaymentDetail assetPaymentDetail)
documentTypeCode
- protected boolean validateObjectCode(ObjectCode objectCode, AssetGlobal assetGlobal)
assetGlobal
- assetPaymentDetail
- protected boolean isAccountInvalid(Account account)
protected boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
processCustomRouteDocumentBusinessRules
in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
protected boolean validateSeparateSourceAmountAboveThreshold(org.kuali.rice.kns.document.MaintenanceDocument document, AssetGlobalDetail assetGlobalUniqueDetail)
document
- protected boolean validateAssetTotalAmount(org.kuali.rice.kns.document.MaintenanceDocument document)
document
- protected String getCapitalizationThresholdAmount()
protected boolean validateCapitalAssetAmountAboveThreshhold(org.kuali.rice.kns.document.MaintenanceDocument document, org.kuali.rice.core.api.util.type.KualiDecimal assetAmount, String capitalizationThresholdAmount)
document
- assetAmount
- capitalizationThresholdAmount
- protected boolean validateNonCapitalAssetAmountBelowThreshold(org.kuali.rice.core.api.util.type.KualiDecimal assetAmount, String capitalizationThresholdAmount)
assetAmount
- capitalizationThresholdAmount
- protected boolean validateTotalCostAmount(AssetGlobal assetGlobal)
assetGlobal
- protected boolean validateCapitalAssetTypeCode(AssetGlobalDetail uniqueLocationDetails)
uniqueLocationDetails
- protected boolean validateAssetDescription(AssetGlobalDetail uniqueLocationDetails)
uniqueLocationDetails
- protected boolean validateManufacturer(AssetGlobalDetail uniqueLocationDetails)
uniqueLocationDetails
- protected boolean validateSeparateSourceAmount(AssetGlobalDetail uniqueLocationDetail, org.kuali.rice.kns.document.MaintenanceDocument document)
uniqueLocationDetails
- protected boolean validateLocationCollection(AssetGlobal assetGlobal, List<AssetGlobalDetail> assetSharedDetails)
protected boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
processCustomSaveDocumentBusinessRules
in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
protected boolean setAssetLock(org.kuali.rice.kns.document.MaintenanceDocument document, AssetGlobal assetGlobal)
document
- assetGlobal
- protected boolean validateAcquisitionIncomeObjectCode(AssetGlobal assetGlobal)
assetGlobal
- protected boolean validatePaymentCollection(org.kuali.rice.kns.document.MaintenanceDocument maintenanceDocument, AssetGlobal assetGlobal)
protected boolean validateVendorAndManufacturer(AssetGlobal assetGlobal)
public boolean processSaveDocument(org.kuali.rice.krad.document.Document document)
processSaveDocument
in interface org.kuali.rice.kns.rules.MaintenanceDocumentRule
processSaveDocument
in interface org.kuali.rice.krad.rules.rule.SaveDocumentRule
processSaveDocument
in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
protected boolean validateAccount(AssetGlobal assetGlobal)
protected boolean isOrgOwnerAccountFromCab(AssetGlobal assetGlobal)
assetGlobal
- protected boolean validateLocation(AssetGlobal assetGlobal, AssetGlobalDetail assetGlobalDetail)
assetGlobal
- protected boolean validateAssetType(AssetGlobal assetGlobal)
assetGlobal
- protected boolean validateAssetType(AssetGlobalDetail assetGlobalUniqueDetails, Integer sharedIndex, Integer uniqueIndex)
assetGlobalUniqueDetails
- sharedIndex
- the index of the shared details within the AssetGlobaluniqueIndex
- the index of the unique details within the shared detailspublic static boolean validateAssetTotalCostMatchesPaymentTotalCost(AssetGlobal assetGlobal)
assetGlobal
- public static boolean validateAssetAlreadySeparated(Long separateSourceCapitalAssetNumber)
assetGlobal
- protected boolean dataDictionaryValidate(org.kuali.rice.kns.document.MaintenanceDocument document)
dataDictionaryValidate
in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
Override this method to only validate reference exists for asset separate , otherwise do default Existence Checks.
KFSMI-6584
protected org.kuali.rice.coreservice.framework.parameter.ParameterService getParameterService()
protected AssetService getAssetService()
protected AssetPaymentService getAssetPaymentService()
protected AssetAcquisitionTypeService getAssetAcquisitionTypeService()
protected AssetGlobalService getAssetGlobalService()
Copyright © 2004–2015 The Kuali Foundation. All rights reserved.