com.uwyn.rife.site
Class PropertyValidationRule

java.lang.Object
  extended by com.uwyn.rife.site.AbstractValidationRule
      extended by com.uwyn.rife.site.PropertyValidationRule
All Implemented Interfaces:
ValidationRule, Cloneable
Direct Known Subclasses:
CmfPropertyValidationRule, ValidationRuleEmail, ValidationRuleFormat, ValidationRuleInList, ValidationRuleLimitedDate, ValidationRuleLimitedLength, ValidationRuleNotEmpty, ValidationRuleNotEqual, ValidationRuleNotNull, ValidationRuleRange, ValidationRuleRegexp, ValidationRuleSameAs, ValidationRuleUrl

public abstract class PropertyValidationRule
extends AbstractValidationRule

This abstract class extends the AbstractValidationRule class to provide common functionality that is useful for all bean property validation rules.

Since:
1.0
Version:
$Revision: 3634 $
Author:
Geert Bevin (gbevin[remove] at uwyn dot com)

Constructor Summary
protected PropertyValidationRule(String propertyName)
          Instantiates a new PropertyValidationRule instance.
 
Method Summary
 Collection<String> getLoadingErrors()
          Retrieves the list of error messages that occurred during the loading of content data.
 String getPropertyName()
          Retrieves the name of the property.
 String getSubject()
          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>
T
setPropertyName(String propertyName)
          Set the name of the property.
 PropertyValidationRule setSubject(String subjectName)
          Set the subject that the property refers to.
 
Methods inherited from class com.uwyn.rife.site.AbstractValidationRule
clone, getBean, getError, setBean, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyValidationRule

protected PropertyValidationRule(String propertyName)
Instantiates a new PropertyValidationRule instance.

Parameters:
propertyName - the name of the property
Since:
1.0
Method Detail

setPropertyName

public <T extends PropertyValidationRule> T setPropertyName(String propertyName)
Set the name of the property.

Parameters:
propertyName - the name of the property
Since:
1.0
See Also:
getPropertyName()

getPropertyName

public String getPropertyName()
Retrieves the name of the property.

Returns:
the name of the property
Since:
1.0
See Also:
setPropertyName(java.lang.String)

setSubject

public PropertyValidationRule setSubject(String subjectName)
Set the subject that the property refers to.

Parameters:
subjectName - the subject name of the property
Since:
1.0
See Also:
getSubject()

getSubject

public String getSubject()
Retrieves the subject name of the property.

Specified by:
getSubject in interface ValidationRule
Overrides:
getSubject in class AbstractValidationRule
Returns:
the subject name of the property
Since:
1.0
See Also:
setSubject(java.lang.String)

setLoadingErrors

protected void setLoadingErrors(Collection<String> errors)
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

public Collection<String> 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 was null or the property didn't exist

Since:
1.0


Copyright © 2001-2007 Uwyn sprl/bvba. All Rights Reserved.