org.kuali.kfs.module.purap.document.validation.impl
Class PurchasingCommodityCodeValidation
java.lang.Object
org.kuali.kfs.sys.document.validation.ParameterizedValidation
org.kuali.kfs.sys.document.validation.GenericValidation
org.kuali.kfs.module.purap.document.validation.impl.PurchasingCommodityCodeValidation
- All Implemented Interfaces:
- Validation
public class PurchasingCommodityCodeValidation
- extends GenericValidation
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PurchasingCommodityCodeValidation
public PurchasingCommodityCodeValidation()
validate
public boolean validate(AttributedDocumentEvent event)
- Description copied from interface:
Validation
- This method validates that certain parameters
- Returns:
- true if validation should continue, false otherwise
getItemForValidation
public PurApItem getItemForValidation()
setItemForValidation
public void setItemForValidation(PurApItem itemForValidation)
validateCommodityCodes
protected boolean validateCommodityCodes(PurApItem item,
boolean commodityCodeRequired)
- Validates whether the commodity code existed on the item, and if existed, whether the
commodity code on the item existed in the database, and if so, whether the commodity
code is active. Display error if any of these 3 conditions are not met.
- Parameters:
item
- The PurApItem containing the commodity code to be validated.
- Returns:
- boolean false if the validation fails and true otherwise.
validateThatCommodityCodeIsActive
protected boolean validateThatCommodityCodeIsActive(PurApItem item)
commodityCodeIsRequired
protected boolean commodityCodeIsRequired()
- Predicate to do a parameter lookup and tell us whether a commodity code is required.
Override in child classes.
- Returns:
- True if a commodity code is required.
getBusinessObjectService
public org.kuali.rice.kns.service.BusinessObjectService getBusinessObjectService()
setBusinessObjectService
public void setBusinessObjectService(org.kuali.rice.kns.service.BusinessObjectService businessObjectService)
getDataDictionaryService
public org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
setDataDictionaryService
public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.