public class CollectionValidation extends CompositeValidation
| Modifier and Type | Field and Description | 
|---|---|
| protected String | collectionProperty | 
shouldQuitOnFail, subValidations| Constructor and Description | 
|---|
| CollectionValidation() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected String | buildPropertyName(int count)Here's a hack for all my homies: this method builds the property name of a specific item in a collection by chopping the presumed "s" at the end of collectionProperties,
 and then attaches array/list syntax to it to hold the count. | 
| protected Collection | getCollection(org.kuali.rice.krad.rules.rule.event.KualiDocumentEvent event)Based on the collection property, finds the events | 
| String | getCollectionProperty()Gets the collectionProperty attribute. | 
| void | setCollectionProperty(String collectionProperty)Sets the collectionProperty attribute value. | 
| boolean | validate(AttributedDocumentEvent event)Iterates over each member of the collection, which is assumed to be the property of the validation event named by the given collectionProperty | 
| protected boolean | validateEachObject(AttributedDocumentEvent event,
                                    Object objectToValidate,
                                    int count)Validates each object in the collection | 
getValidations, setQuitOnFail, setValidations, shouldQuitOnFail, stageValidationprotected String collectionProperty
public CollectionValidation()
public boolean validate(AttributedDocumentEvent event)
validate in interface Validationvalidate in class CompositeValidationorg.kuali.ole.sys.document.validation.impl.CompositeValidation#validate(java.lang.Object[])protected boolean validateEachObject(AttributedDocumentEvent event, Object objectToValidate, int count)
event - the event to validate againstobjectToValidate - the object from the collection which is being validatedprotected String buildPropertyName(int count)
protected Collection getCollection(org.kuali.rice.krad.rules.rule.event.KualiDocumentEvent event)
event - public String getCollectionProperty()
public void setCollectionProperty(String collectionProperty)
collectionProperty - The collectionProperty to set.Copyright © 2004–2015 The Kuali Foundation. All rights reserved.