public class PurchasingAddItemValidation extends PurchasingAccountsPayableAddItemValidation
Constructor and Description |
---|
PurchasingAddItemValidation() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
commodityCodeIsRequired()
Predicate to do a parameter lookup and tell us whether a commodity code is required.
|
org.kuali.rice.krad.service.BusinessObjectService |
getBusinessObjectService() |
org.kuali.rice.kns.service.DataDictionaryService |
getDataDictionaryService() |
void |
setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService) |
void |
setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService) |
boolean |
validate(AttributedDocumentEvent event)
This method validates that certain parameters
|
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.
|
boolean |
validateItemDescription(PurApItem item)
Checks that a description was entered for the item.
|
boolean |
validateItemQuantity(PurApItem item)
Validates that if the item type is quantity based, the item quantity is required and if the item type is amount based, the
quantity is not allowed.
|
boolean |
validateItemUnitPrice(PurApItem item)
Validates the unit price for all applicable item types.
|
protected boolean |
validateThatCommodityCodeIsActive(PurApItem item) |
boolean |
validateUnitOfMeasure(PurApItem item)
Validates that if the item type is quantity based, the unit of measure is required.
|
getDictionaryValidationService, getItemForValidation, setDictionaryValidationService, setItemForValidation
setQuitOnFail, shouldQuitOnFail, stageValidation
getParameterProperties, populateParameterFromEvent, populateParametersFromEvent, setParameterProperties
public PurchasingAddItemValidation()
public boolean validate(AttributedDocumentEvent event)
Validation
validate
in interface Validation
validate
in class PurchasingAccountsPayableAddItemValidation
protected boolean validateCommodityCodes(PurApItem item, boolean commodityCodeRequired)
item
- The PurApItem containing the commodity code to be validated.public boolean validateItemUnitPrice(PurApItem item)
purDocument
- the purchasing document to be validatedpublic boolean validateUnitOfMeasure(PurApItem item)
item
- the item to be validatedpublic boolean validateItemDescription(PurApItem item)
item
- public boolean validateItemQuantity(PurApItem item)
item
- the item to be validatedprotected boolean commodityCodeIsRequired()
protected boolean validateThatCommodityCodeIsActive(PurApItem item)
public org.kuali.rice.krad.service.BusinessObjectService getBusinessObjectService()
public void setBusinessObjectService(org.kuali.rice.krad.service.BusinessObjectService businessObjectService)
public org.kuali.rice.kns.service.DataDictionaryService getDataDictionaryService()
public void setDataDictionaryService(org.kuali.rice.kns.service.DataDictionaryService dataDictionaryService)
Copyright © 2004–2015 The Kuali Foundation. All rights reserved.