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

java.lang.Object
  extended by org.kuali.rice.kns.rules.DocumentRuleBase
      extended by org.kuali.rice.kns.rules.TransactionalDocumentRuleBase
          extended by org.kuali.kfs.module.cam.document.validation.impl.BarcodeInventoryErrorDocumentRule
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 BarcodeInventoryErrorDocumentRule
extends org.kuali.rice.kns.rules.TransactionalDocumentRuleBase

Business rule(s) applicable to Asset Barcode Inventory upload and Barcode inventory error document.


Field Summary
protected static org.apache.log4j.Logger LOG
           
 
Constructor Summary
BarcodeInventoryErrorDocumentRule()
           
 
Method Summary
protected  void deleteLockErrorMessages()
          Deletes the asset locking error messages from the GlobalVariables.
protected  AssetBarcodeInventoryLoadService getAssetBarcodeInventoryLoadService()
           
protected  AssetService getAssetService()
           
protected  org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
           
protected  org.kuali.rice.kns.service.DateTimeService getDateTimeService()
           
protected  String getErrorMessages(String errorPath)
          Iterates over the list of errors each records might have and returns a single string with all the errors for each asset
protected  org.kuali.rice.kns.service.ParameterService getParameterService()
           
protected  boolean processCustomSaveDocumentBusinessRules(org.kuali.rice.kns.document.Document document)
           
 boolean validateBarcodeInventoryErrorDetail(BarcodeInventoryErrorDocument document, boolean updateStatus)
          Invokes several methods that validates each barcode error record
protected  boolean validateBuildingCode(String buildingCode, BarcodeInventoryErrorDetail detail)
          Validates the building code exists
protected  boolean validateBuildingRoomNumber(String roomNumber, BarcodeInventoryErrorDetail detail)
          Validates the building room number exists
protected  boolean validateCampusCode(String campusCode, BarcodeInventoryErrorDetail detail)
          Validates the campus code exists in the campus code table
protected  boolean validateConditionCode(String conditionCode, BarcodeInventoryErrorDetail detail)
          Validates the condition code exists in the condition table
protected  boolean validateInventoryDate(Timestamp inventoryDate)
          Validates the inventory date is not equals null
protected  boolean validateTaggingLock(String tagNumber, String documentNumber)
          Validates the Asset doesn't have any tagging locks as result of an existing document in process where the same asset being affected
protected  boolean validateTagNumber(String tagNumber)
          validates the asset tag number exists in only one active asset.
 
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, processCustomRouteDocumentBusinessRules, 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

LOG

protected static org.apache.log4j.Logger LOG
Constructor Detail

BarcodeInventoryErrorDocumentRule

public BarcodeInventoryErrorDocumentRule()
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)

validateBarcodeInventoryErrorDetail

public boolean validateBarcodeInventoryErrorDetail(BarcodeInventoryErrorDocument document,
                                                   boolean updateStatus)
Invokes several methods that validates each barcode error record

Parameters:
barcodeInventoryErrorDetails -
Returns:
boolean

validateTagNumber

protected boolean validateTagNumber(String tagNumber)
validates the asset tag number exists in only one active asset.

Parameters:
tagNumber -
Returns:
boolean

validateInventoryDate

protected boolean validateInventoryDate(Timestamp inventoryDate)
Validates the inventory date is not equals null

Parameters:
inventoryDate -
Returns:
boolean

validateCampusCode

protected boolean validateCampusCode(String campusCode,
                                     BarcodeInventoryErrorDetail detail)
Validates the campus code exists in the campus code table

Parameters:
campusCode -
detail -
Returns:
boolean

validateBuildingCode

protected boolean validateBuildingCode(String buildingCode,
                                       BarcodeInventoryErrorDetail detail)
Validates the building code exists

Parameters:
buildingCode -
detail -
Returns:
boolean

validateBuildingRoomNumber

protected boolean validateBuildingRoomNumber(String roomNumber,
                                             BarcodeInventoryErrorDetail detail)
Validates the building room number exists

Parameters:
roomNumber -
detail -
Returns:
boolean

validateConditionCode

protected boolean validateConditionCode(String conditionCode,
                                        BarcodeInventoryErrorDetail detail)
Validates the condition code exists in the condition table

Parameters:
conditionCode -
detail -
Returns:
boolean

validateTaggingLock

protected boolean validateTaggingLock(String tagNumber,
                                      String documentNumber)
Validates the Asset doesn't have any tagging locks as result of an existing document in process where the same asset being affected

Parameters:
tagNumber -
Returns:
boolean

getErrorMessages

protected String getErrorMessages(String errorPath)
Iterates over the list of errors each records might have and returns a single string with all the errors for each asset

Parameters:
errorPath -
Returns:
String

deleteLockErrorMessages

protected void deleteLockErrorMessages()
Deletes the asset locking error messages from the GlobalVariables.


getParameterService

protected org.kuali.rice.kns.service.ParameterService getParameterService()

getAssetService

protected AssetService getAssetService()

getDateTimeService

protected org.kuali.rice.kns.service.DateTimeService getDateTimeService()

getBusinessObjectService

protected org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()

getAssetBarcodeInventoryLoadService

protected AssetBarcodeInventoryLoadService getAssetBarcodeInventoryLoadService()


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