Package rife.validation
Class PropertyValidationRule
java.lang.Object
rife.validation.AbstractValidationRule
rife.validation.PropertyValidationRule
- All Implemented Interfaces:
Cloneable
,ValidationRule
- Direct Known Subclasses:
CmfPropertyValidationRule
,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
ModifierConstructorDescriptionprotected
PropertyValidationRule
(String propertyName) Instantiates a newPropertyValidationRule
instance. -
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 void
setLoadingErrors
(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 newPropertyValidationRule
instance.- 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:
getSubject
in interfaceValidationRule
- Overrides:
getSubject
in 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
null
if the data wasnull
or the property didn't exist - Since:
- 1.0
-