|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kuali.kfs.sys.document.validation.impl.CompositeValidation
org.kuali.kfs.sys.document.validation.impl.CollectionValidation
public class CollectionValidation
A validation that runs a list of child validations over each member of a collection.
Field Summary | |
---|---|
protected String |
collectionProperty
|
Fields inherited from class org.kuali.kfs.sys.document.validation.impl.CompositeValidation |
---|
shouldQuitOnFail, subValidations |
Constructor Summary | |
---|---|
CollectionValidation()
|
Method Summary | |
---|---|
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.kns.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 |
Methods inherited from class org.kuali.kfs.sys.document.validation.impl.CompositeValidation |
---|
getValidations, setQuitOnFail, setValidations, shouldQuitOnFail, stageValidation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String collectionProperty
Constructor Detail |
---|
public CollectionValidation()
Method Detail |
---|
public boolean validate(AttributedDocumentEvent event)
validate
in interface Validation
validate
in class CompositeValidation
org.kuali.kfs.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 validated
protected String buildPropertyName(int count)
protected Collection getCollection(org.kuali.rice.kns.rule.event.KualiDocumentEvent event)
event
-
public String getCollectionProperty()
public void setCollectionProperty(String collectionProperty)
collectionProperty
- The collectionProperty to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |