org.kuali.kfs.module.purap.document.validation.impl
Class ReceivingAddressPreRules
java.lang.Object
org.kuali.rice.kns.rules.PromptBeforeValidationBase
org.kuali.kfs.coa.document.validation.impl.MaintenancePreRulesBase
org.kuali.kfs.module.purap.document.validation.impl.ReceivingAddressPreRules
- All Implemented Interfaces:
- org.kuali.rice.kns.rule.PromptBeforeValidation
public class ReceivingAddressPreRules
- extends MaintenancePreRulesBase
Business Prerules applicable to ReceivingAddressMaintenanceDocument.
These prerules check whether the maintenance action to a Receiving Address business objects abide certain constraint rules.
Nested classes/interfaces inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase |
org.kuali.rice.kns.rules.PromptBeforeValidationBase.ContextSession |
Fields inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase |
buttonClicked, event, form, LOG, question |
Method Summary |
protected boolean |
doCustomPreRules(org.kuali.rice.kns.document.MaintenanceDocument document)
Checks whether the maintenance action to a Receiving Address business objects abide to the contraint that,
there is one and only one active default receiving address for each chart or chart/org at any given time,
if there exists at least one active receiving address for this chart or chart/org. |
protected void |
putFieldError(String propertyName,
String errorConstant)
Convenience method to add a property-specific error to the global errors list, with the correct prefix
added to the property name so that it will display correctly on maintenance documents. |
Methods inherited from class org.kuali.rice.kns.rules.PromptBeforeValidationBase |
abortRulesCheck, askOrAnalyzeYesNoQuestion, processPrompts |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReceivingAddressPreRules
public ReceivingAddressPreRules()
doCustomPreRules
protected boolean doCustomPreRules(org.kuali.rice.kns.document.MaintenanceDocument document)
- Checks whether the maintenance action to a Receiving Address business objects abide to the contraint that,
there is one and only one active default receiving address for each chart or chart/org at any given time,
if there exists at least one active receiving address for this chart or chart/org.
If the contraint would be broken as a result of the update, the method will present an error or warning
to the user; and if proceed, enforce the rule by updating the related receiving address as well.
Note: this method relies on the condition that the current status of the DB satisfies the constraints.
- Overrides:
doCustomPreRules
in class MaintenancePreRulesBase
- Returns:
- true if rules pass
- See Also:
MaintenancePreRulesBase.doCustomPreRules(org.kuali.rice.kns.document.MaintenanceDocument)
putFieldError
protected void putFieldError(String propertyName,
String errorConstant)
- Convenience method to add a property-specific error to the global errors list, with the correct prefix
added to the property name so that it will display correctly on maintenance documents.
- Parameters:
propertyName
- Property name of the element that is associated with the error, to mark the field as errored in the UI.errorConstant
- - Error Constant that can be mapped to a resource for the actual text message.
Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.