public final class BudgetModularTotalDirectCostRule extends Object
The validation methods in this class may produce errors and/or warnings.
The error handling behavior in this class is important to mention
since it is a little different than the rest of KC.
This class adds error messages directly to the
GlobalVariables.getMessageMap()
Make sure to add to the error map's path before calling the validate method.
Currently warning are generated and placed in a Set<String>.
This is different because warnings are not supported by the rice framework
and therefore behave differently from errors.
See getErrorMessages()
| Constructor and Description |
|---|
BudgetModularTotalDirectCostRule() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
validateTotalDirectCost(BudgetParentDocument parentDocument,
boolean reportErrors,
Set<String> warningMessages)
Validates the total direct cost (tdc) for each budget version.
|
public boolean validateTotalDirectCost(BudgetParentDocument parentDocument, boolean reportErrors, Set<String> warningMessages)
This method will validate tdc for every completed budget version that has a modular budget.
The tdc rule that this method is checking is whether or not the tdc contains a positive value. If none of the budget versions meeting the aforementioned criteria is positive than an error is produced. If at least one budget version meeting the aforementioned criteria is positive and at least one is not positive than a warning is produced.
parentDocument - the document to check rule againstreportErrors - whether to report errorswarningMessages - container to place warning messages. Warning messages
are added to this set to be accessed by the caller.NullPointerException - if the pdDocument or warningMessages are null.Copyright © 2013 The Kuali Foundation. All Rights Reserved.