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

java.lang.Object
  extended by org.kuali.rice.kns.rules.DocumentRuleBase
      extended by org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
          extended by org.kuali.kfs.module.cam.document.validation.impl.AssetLocationGlobalRule
All Implemented Interfaces:
org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRule, org.kuali.rice.kns.rule.AddAdHocRoutePersonRule, org.kuali.rice.kns.rule.AddAdHocRouteWorkgroupRule, org.kuali.rice.kns.rule.AddCollectionLineRule, 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 AssetLocationGlobalRule
extends org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase

Business rules applicable to AssetLocationGlobal documents.


Field Summary
protected  AssetService assetService
           
protected static org.apache.log4j.Logger LOG
           
 
Fields inherited from class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
boDictionaryService, boService, businessObjectAuthorizationService, configService, ddService, dictionaryValidationService, DOCUMENT_ERROR_PREFIX, documentHelperService, MAINTAINABLE_ERROR_PATH, MAINTAINABLE_ERROR_PREFIX, maintDocDictionaryService, persistenceService, persistenceStructureService, personService, priorErrorPath, roleService, workflowDocumentService
 
Constructor Summary
AssetLocationGlobalRule()
          Constructs an AssetLocationGlobalRule
 
Method Summary
protected  boolean authorizeCapitalAsset(AssetLocationGlobalDetail assetLocationGlobalDetail)
          Asset user authorization.
protected  boolean checkRequiredFieldsAfterAdd(AssetLocationGlobalDetail assetLocationGlobalDetail)
          Check required fields after a new asset location has been added.
protected  CapitalAssetManagementModuleService getCapitalAssetManagementModuleService()
           
protected  boolean hasAssetLocationGlobalDetails(List<AssetLocationGlobalDetail> assetLocationGlobalDetails)
          Validate if any AssetLocationGlobalDetail exist.
 boolean processCustomAddCollectionLineBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument documentCopy, String collectionName, org.kuali.rice.kns.bo.PersistableBusinessObject bo)
          Process rules for any new AssetLocationGlobalDetail that is added to this global.
protected  boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument documentCopy)
          Processes rules when routing this global.
protected  boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
           
protected  List<Long> retrieveAssetNumberForLocking(AssetLocationGlobal assetLocationGlobal)
          retrieve asset numbers need to be locked.
protected  boolean validateActiveCapitalAsset(AssetLocationGlobalDetail assetLocationGlobalDetail)
          Validate the capital Asset.
protected  boolean validateBuildingCode(AssetLocationGlobalDetail assetLocationGlobalDetail)
          Validate Building code.
protected  boolean validateBuildingRoomNumber(AssetLocationGlobalDetail assetLocationGlobalDetail)
          Validate building Room number.
protected  boolean validateCampusCode(AssetLocationGlobalDetail assetLocationGlobalDetail)
          Validate Campus code.
protected  boolean validateTagDuplication(Long capitalAssetNumber, String campusTagNumber)
          Validate duplicate tag number.
protected  boolean validateTagDuplicationWithinDocument(AssetLocationGlobalDetail assetLocationGlobalDetail, Set<String> tagsList)
           
protected  boolean validateTagNumber(AssetLocationGlobalDetail assetLocationGlobalDetail)
          Validate tag number.
 
Methods inherited from class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
apcRuleFails, applyApcRule, checkEmptyBOField, checkEmptyDocumentField, checkEmptyValue, checkForPartiallyFilledOutReferenceForeignKeys, clearErrorPath, consolidateFieldNames, dataDictionaryValidate, errorAlreadyExists, getBoDictionaryService, getBoService, getBusinessObjectAuthorizationService, getConfigService, getDateTimeService, getDdService, getDictionaryValidationService, getDocumentHelperService, getFieldLabel, getFieldLabel, getHumanReadablePrimaryKeyFieldNames, getMaintDocDictionaryService, getNewBo, getOldBo, getPersistenceService, getPersistenceStructureService, getPersonService, getRoleService, getWorkflowDocumentService, isCorrectMaintenanceClass, isDocumentInactivatingBusinessObject, isDocumentValidForSave, primaryKeyCheck, processAddCollectionLineBusinessRules, processApproveDocument, processCustomApproveDocumentBusinessRules, processGlobalApproveDocumentBusinessRules, processGlobalRouteDocumentBusinessRules, processGlobalSaveDocumentBusinessRules, processInactivationBlockChecking, processInactivationBlockChecking, processRouteDocument, processSaveDocument, putDocumentError, putDocumentError, putFieldError, putFieldError, putFieldError, putFieldErrorWithShortLabel, putGlobalError, putGlobalError, putGlobalError, putGlobalsError, putGlobalsError, putInactivationBlockingErrorOnPage, resumeErrorPath, setBoDictionaryService, setBoService, setBusinessObjectAuthorizationService, setConfigService, setDdService, setDictionaryValidationService, setDocumentHelperService, setMaintDocDictionaryService, setNewBo, setPersistenceService, setPersistenceStructureService, setPersonService, setupBaseConvenienceObjects, setupConvenienceObjects, setWorkflowDocumentService, showErrorMap, validateDocumentStructure, validateDuplicateIdentifierInDataDictionary, validateGlobalBusinessObjectPersistable, validateMaintenanceDocument
 
Methods inherited from class org.kuali.rice.kns.rules.DocumentRuleBase
getDataDictionaryService, getIdentityManagementService, getKualiConfigurationService, getMaxDictionaryValidationDepth, getWorkflowInfoService, isAddHocRoutePersonValid, isAddHocRouteWorkgroupValid, isAdHocRouteRecipientsValid, isDocumentAttributesValid, isDocumentOverviewValid, isNoteValid, processAddAdHocRoutePerson, processAddAdHocRouteWorkgroup, processAddNote, processCustomAddAdHocRoutePersonBusinessRules, processCustomAddAdHocRouteWorkgroupBusinessRules, processCustomAddNoteBusinessRules, processCustomApproveDocumentBusinessRules, processCustomRouteDocumentBusinessRules, processCustomSaveDocumentBusinessRules, processCustomSendAdHocRequests, processSendAdHocRequests, setMaxDictionaryValidationDepth, validateSensitiveDataValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static org.apache.log4j.Logger LOG

assetService

protected AssetService assetService
Constructor Detail

AssetLocationGlobalRule

public AssetLocationGlobalRule()
Constructs an AssetLocationGlobalRule

Method Detail

processCustomSaveDocumentBusinessRules

protected boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument document)
Overrides:
processCustomSaveDocumentBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
See Also:
MaintenanceDocumentRuleBase.processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)

processCustomRouteDocumentBusinessRules

protected boolean processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument documentCopy)
Processes rules when routing this global.

Overrides:
processCustomRouteDocumentBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
See Also:
MaintenanceDocumentRuleBase.processCustomRouteDocumentBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument)

retrieveAssetNumberForLocking

protected List<Long> retrieveAssetNumberForLocking(AssetLocationGlobal assetLocationGlobal)
retrieve asset numbers need to be locked.

Parameters:
assetLocationGlobal -
Returns:

getCapitalAssetManagementModuleService

protected CapitalAssetManagementModuleService getCapitalAssetManagementModuleService()

processCustomAddCollectionLineBusinessRules

public boolean processCustomAddCollectionLineBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument documentCopy,
                                                           String collectionName,
                                                           org.kuali.rice.kns.bo.PersistableBusinessObject bo)
Process rules for any new AssetLocationGlobalDetail that is added to this global.

Overrides:
processCustomAddCollectionLineBusinessRules in class org.kuali.rice.kns.maintenance.rules.MaintenanceDocumentRuleBase
See Also:
MaintenanceDocumentRuleBase.processCustomAddCollectionLineBusinessRules(org.kuali.rice.kns.document.MaintenanceDocument, java.lang.String, org.kuali.rice.kns.bo.PersistableBusinessObject)

authorizeCapitalAsset

protected boolean authorizeCapitalAsset(AssetLocationGlobalDetail assetLocationGlobalDetail)
Asset user authorization.

Parameters:
assetLocationGlobalDetail -
Returns:
boolean

hasAssetLocationGlobalDetails

protected boolean hasAssetLocationGlobalDetails(List<AssetLocationGlobalDetail> assetLocationGlobalDetails)
Validate if any AssetLocationGlobalDetail exist.

Parameters:
assetLocationGlobal -
Returns:
boolean

validateActiveCapitalAsset

protected boolean validateActiveCapitalAsset(AssetLocationGlobalDetail assetLocationGlobalDetail)
Validate the capital Asset. This method also calls AssetService while validating retired Asset.

Parameters:
assetLocationGlobalDetail -
Returns:
boolean

validateCampusCode

protected boolean validateCampusCode(AssetLocationGlobalDetail assetLocationGlobalDetail)
Validate Campus code.

Parameters:
assetLocationGlobalDetail -
Returns:
boolean

validateBuildingCode

protected boolean validateBuildingCode(AssetLocationGlobalDetail assetLocationGlobalDetail)
Validate Building code.

Parameters:
assetLocationGlobalDetail -
Returns:
boolean

validateBuildingRoomNumber

protected boolean validateBuildingRoomNumber(AssetLocationGlobalDetail assetLocationGlobalDetail)
Validate building Room number.

Parameters:
assetLocationGlobalDetail -
Returns:
boolean

validateTagNumber

protected boolean validateTagNumber(AssetLocationGlobalDetail assetLocationGlobalDetail)
Validate tag number.

Parameters:
assetLocationGlobalDetail -
Returns:
boolean

validateTagDuplication

protected boolean validateTagDuplication(Long capitalAssetNumber,
                                         String campusTagNumber)
Validate duplicate tag number. This method also calls AssetService.

Parameters:
assetLocationGlobalDetail -
Returns:
boolean

validateTagDuplicationWithinDocument

protected boolean validateTagDuplicationWithinDocument(AssetLocationGlobalDetail assetLocationGlobalDetail,
                                                       Set<String> tagsList)

checkRequiredFieldsAfterAdd

protected boolean checkRequiredFieldsAfterAdd(AssetLocationGlobalDetail assetLocationGlobalDetail)
Check required fields after a new asset location has been added.

Parameters:
assetLocationGlobalDetail -
Returns:
boolean


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