Package rife.validation
Class PropertyValidationRule
java.lang.Object
rife.validation.AbstractValidationRule
rife.validation.PropertyValidationRule
- All Implemented Interfaces:
Cloneable,ValidationRule
- Direct Known Subclasses:
ValidationRuleEmail,ValidationRuleFormat,ValidationRuleInList,ValidationRuleLimitedDate,ValidationRuleLimitedLength,ValidationRuleNotEmpty,ValidationRuleNotEqual,ValidationRuleNotNull,ValidationRuleRange,ValidationRuleRegexp,ValidationRuleSameAs,ValidationRuleUrl
This abstract class extends the
AbstractValidationRule class
to provide common functionality that is useful for all bean property
validation rules.- Since:
- 1.0
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPropertyValidationRule(String propertyName) Instantiates a newPropertyValidationRuleinstance. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the list of error messages that occurred during the loading of content data.Retrieves the name of the property.Retrieves the subject name of the property.protected voidsetLoadingErrors(Collection<String> errors) Set the list of error messages that occurred during the loading of content data.<T extends PropertyValidationRule>
TsetPropertyName(String propertyName) Set the name of the property.setSubject(String subjectName) Set the subject that the property refers to.
-
Constructor Details
-
PropertyValidationRule
Instantiates a newPropertyValidationRuleinstance.- Parameters:
propertyName- the name of the property- Since:
- 1.0
-
-
Method Details
-
setPropertyName
Set the name of the property.- Parameters:
propertyName- the name of the property- Since:
- 1.0
- See Also:
-
getPropertyName
Retrieves the name of the property.- Returns:
- the name of the property
- Since:
- 1.0
- See Also:
-
setSubject
Set the subject that the property refers to.- Parameters:
subjectName- the subject name of the property- Since:
- 1.0
- See Also:
-
getSubject
Retrieves the subject name of the property.- Specified by:
getSubjectin interfaceValidationRule- Overrides:
getSubjectin classAbstractValidationRule- Returns:
- the subject name of the property
- Since:
- 1.0
- See Also:
-
setLoadingErrors
Set the list of error messages that occurred during the loading of content data.- Parameters:
errors- the collection of errors messages- Since:
- 1.0
-
getLoadingErrors
Retrieves the list of error messages that occurred during the loading of content data.- Returns:
- the collection of errors messages; or
nullif the data wasnullor the property didn't exist - Since:
- 1.0
-