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, populateParametersFromEvent
protected 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 ParameterizedValidation
org.kuali.ole.sys.document.validation.Validation#getParameterProperties()
public void setParameterProperties(List<ValidationFieldConvertible> parameterProperties)
setParameterProperties
in class ParameterizedValidation
parameterProperties
- The parameterProperties to set.public boolean shouldQuitOnFail()
Validation
shouldQuitOnFail
in interface Validation
Validation.shouldQuitOnFail()
public void setShouldQuitOnFail(boolean shouldQuitOnFail)
shouldQuitOnFail
- The shouldQuitOnFail to set.public boolean stageValidation(AttributedDocumentEvent event)
Validation
stageValidation
in interface Validation
event
- the event the validateValidation.stageValidation(org.kuali.ole.sys.document.validation.event.AttributedDocumentEvent)
public boolean validate(AttributedDocumentEvent event)
validate
in interface Validation
Validation.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–2015 The Kuali Foundation. All rights reserved.