Package org.openflexo.pamela.validation
Class ValidationRuleSet<V extends Validable>
- java.lang.Object
-
- org.openflexo.pamela.validation.ValidationRuleSet<V>
-
- Type Parameters:
V
- type of Validable
- All Implemented Interfaces:
java.lang.Iterable<ValidationRule<?,? super V>>
public class ValidationRuleSet<V extends Validable> extends java.lang.Object implements java.lang.Iterable<ValidationRule<?,? super V>>
This is the set of rules beeing applicable to any instance of V class
Inheritance is managed here
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DELETED_PROPERTY
-
Constructor Summary
Constructors Constructor Description ValidationRuleSet(java.lang.Class<V> type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addParentRuleSet(ValidationRuleSet<? super V> parentRuleSet)
boolean
containsRuleClass(java.lang.Class<? extends ValidationRule> ruleClass)
void
delete()
java.util.List<ValidationRule<?,V>>
getDeclaredRules()
Return declared rules for specified type
Does not return inherited rulesjava.lang.Class<V>
getDeclaredType()
java.lang.String
getDeletedProperty()
java.util.List<ValidationRuleSet<? super V>>
getParentRuleSets()
java.beans.PropertyChangeSupport
getPropertyChangeSupport()
java.util.List<ValidationRule<?,? super V>>
getRules()
Build and return a collection of all rules for specified type
Does return inherited rules (This method is really costfull and should not be called in a performance context, use getSize()/getElementAt(int) instead) FD: Beware, this method is necessary due to the way some GUI component get the validation rules, in normal code I would advocate the use of the iterator insteadint
getRulesCount()
Implementsjava.lang.String
getTypeName()
java.util.Iterator<ValidationRule<?,? super V>>
iterator()
-
-
-
Field Detail
-
DELETED_PROPERTY
public static final java.lang.String DELETED_PROPERTY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ValidationRuleSet
public ValidationRuleSet(java.lang.Class<V> type)
-
-
Method Detail
-
getParentRuleSets
public java.util.List<ValidationRuleSet<? super V>> getParentRuleSets()
-
addParentRuleSet
protected void addParentRuleSet(ValidationRuleSet<? super V> parentRuleSet)
-
getPropertyChangeSupport
public java.beans.PropertyChangeSupport getPropertyChangeSupport()
-
getDeletedProperty
public java.lang.String getDeletedProperty()
-
delete
public void delete()
-
getDeclaredRules
public java.util.List<ValidationRule<?,V>> getDeclaredRules()
Return declared rules for specified type
Does not return inherited rules- Returns:
-
getRules
public java.util.List<ValidationRule<?,? super V>> getRules()
Build and return a collection of all rules for specified type
Does return inherited rules (This method is really costfull and should not be called in a performance context, use getSize()/getElementAt(int) instead) FD: Beware, this method is necessary due to the way some GUI component get the validation rules, in normal code I would advocate the use of the iterator instead- Returns:
-
containsRuleClass
public boolean containsRuleClass(java.lang.Class<? extends ValidationRule> ruleClass)
-
getRulesCount
public int getRulesCount()
Implements- See Also:
ListModel.getSize()
-
getDeclaredType
public java.lang.Class<V> getDeclaredType()
-
getTypeName
public java.lang.String getTypeName()
-
iterator
public java.util.Iterator<ValidationRule<?,? super V>> iterator()
-
-