org.kuali.kfs.sys.document.validation.impl
Class CompositeValidation

java.lang.Object
  extended by org.kuali.kfs.sys.document.validation.impl.CompositeValidation
All Implemented Interfaces:
Validation
Direct Known Subclasses:
CollectionValidation

public class CompositeValidation
extends Object
implements Validation

This validation represents a hiearchy of validations


Field Summary
protected  boolean shouldQuitOnFail
           
protected  List<Validation> subValidations
           
 
Constructor Summary
CompositeValidation()
           
 
Method Summary
 List<Validation> getValidations()
          Returns the List of validations to test
 void setQuitOnFail(boolean shouldQuitOnFail)
          Sets the shouldQuitOnFail attribute value.
 void setValidations(List<Validation> validations)
          Sets the List of validations to test
 boolean shouldQuitOnFail()
          Gets the shouldQuitOnFail attribute.
 boolean stageValidation(AttributedDocumentEvent event)
          Just call validate!
 boolean validate(AttributedDocumentEvent event)
          Validates each sub-validation in turn, returning the cumulative effect of each
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

subValidations

protected List<Validation> subValidations

shouldQuitOnFail

protected boolean shouldQuitOnFail
Constructor Detail

CompositeValidation

public CompositeValidation()
Method Detail

validate

public boolean validate(AttributedDocumentEvent event)
Validates each sub-validation in turn, returning the cumulative effect of each

Specified by:
validate in interface Validation
Returns:
true if validation should continue, false otherwise
See Also:
org.kuali.kfs.rules.Validation#validate(java.lang.Object[])

stageValidation

public boolean stageValidation(AttributedDocumentEvent event)
Just call validate!

Specified by:
stageValidation in interface Validation
Parameters:
event - the event the validate
Returns:
the boolean result of the staged Validation
See Also:
Validation.stageValidation(org.kuali.kfs.sys.document.validation.event.AttributedDocumentEvent)

getValidations

public List<Validation> getValidations()
Returns the List of validations to test

Returns:
a List of validations to test

setValidations

public void setValidations(List<Validation> validations)
Sets the List of validations to test

Parameters:
validations - a List of validations to test against

shouldQuitOnFail

public boolean shouldQuitOnFail()
Gets the shouldQuitOnFail attribute.

Specified by:
shouldQuitOnFail in interface Validation
Returns:
Returns the shouldQuitOnFail.

setQuitOnFail

public void setQuitOnFail(boolean shouldQuitOnFail)
Sets the shouldQuitOnFail attribute value.

Parameters:
shouldQuitOnFail - The shouldQuitOnFail to set.


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.