public abstract class BranchingValidation extends ParameterizedValidation implements Validation
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Validation> |
branchMap |
protected List<ValidationFieldConvertible> |
parameterProperties |
protected boolean |
shouldQuitOnFail |
| Constructor and Description |
|---|
BranchingValidation() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
determineBranch(AttributedDocumentEvent event)
Determines which branch, if any, within the branchMap should be used as the validation to take.
|
Map<String,Validation> |
getBranchMap()
Gets the branchMap attribute.
|
List<ValidationFieldConvertible> |
getParameterProperties()
Note: these parameter properties only help determine what branching should take place; these properties will not affect in anyway the branch children
|
void |
setBranchMap(Map<String,Validation> branchMap)
Sets the branchMap attribute value.
|
void |
setParameterProperties(List<ValidationFieldConvertible> parameterProperties)
Sets the parameterProperties attribute value.
|
void |
setShouldQuitOnFail(boolean shouldQuitOnFail)
Sets the shouldQuitOnFail attribute value.
|
boolean |
shouldQuitOnFail()
Returns whether the validation process should quit on the failure of this validation
|
boolean |
stageValidation(AttributedDocumentEvent event)
Stages the execution of a Validation
|
boolean |
validate(AttributedDocumentEvent event)
Using the branch name returned by determineBranch(), validates the event against the corresponding
branch in the branch map.
|
populateParameterFromEvent, populateParametersFromEventprotected Map<String,Validation> branchMap
protected List<ValidationFieldConvertible> parameterProperties
protected boolean shouldQuitOnFail
public BranchingValidation()
protected abstract String determineBranch(AttributedDocumentEvent event)
event - the event which triggered this validationpublic List<ValidationFieldConvertible> getParameterProperties()
getParameterProperties in class ParameterizedValidationorg.kuali.ole.sys.document.validation.Validation#getParameterProperties()public void setParameterProperties(List<ValidationFieldConvertible> parameterProperties)
setParameterProperties in class ParameterizedValidationparameterProperties - The parameterProperties to set.public boolean shouldQuitOnFail()
ValidationshouldQuitOnFail in interface ValidationValidation.shouldQuitOnFail()public void setShouldQuitOnFail(boolean shouldQuitOnFail)
shouldQuitOnFail - The shouldQuitOnFail to set.public boolean stageValidation(AttributedDocumentEvent event)
ValidationstageValidation in interface Validationevent - the event the validateValidation.stageValidation(org.kuali.ole.sys.document.validation.event.AttributedDocumentEvent)public boolean validate(AttributedDocumentEvent event)
validate in interface ValidationValidation.validate(org.kuali.ole.sys.document.validation.event.AttributedDocumentEvent)public Map<String,Validation> getBranchMap()
public void setBranchMap(Map<String,Validation> branchMap)
branchMap - The branchMap to set.Copyright © 2004–2014 The Kuali Foundation. All rights reserved.