Package rife.cmf.validation
Class CmfPropertyValidationRule
java.lang.Object
rife.validation.AbstractValidationRule
rife.validation.PropertyValidationRule
rife.cmf.validation.CmfPropertyValidationRule
- All Implemented Interfaces:
Cloneable
,ValidationRule
- Direct Known Subclasses:
SupportedImage
,SupportedXhtml
This abstract class extends the
PropertyValidationRule
class
to provide common functionality that is useful for all concrete CMF
validation rules.- Since:
- 1.0
-
Constructor Summary
ConstructorDescriptionCmfPropertyValidationRule
(String propertyName, boolean fragment) Instantiates a newCmfPropertyValidationRule
instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether the property that is validated is a fragment.protected void
setCachedLoadedData
(Object data) Sets the cached loaded data to aConstrainedProperty
if the content data has been successfully loaded during validation.Methods inherited from class rife.validation.PropertyValidationRule
getLoadingErrors, getPropertyName, getSubject, setLoadingErrors, setPropertyName, setSubject
-
Constructor Details
-
CmfPropertyValidationRule
Instantiates a newCmfPropertyValidationRule
instance.- Parameters:
propertyName
- the name of the propertyfragment
-true
if the property is a fragment; orfalse
if it's a complete document- Since:
- 1.0
-
-
Method Details
-
getFragment
public boolean getFragment()Indicates whether the property that is validated is a fragment.- Returns:
true
if the property is a fragment; orfalse
if it's a complete document- Since:
- 1.0
-
setCachedLoadedData
Sets the cached loaded data to aConstrainedProperty
if the content data has been successfully loaded during validation. This prevents the data of having to be loaded again elsewhere.If the validation rule's bean is not
Constrained
or if it doesn't contain a correspondingConstrainedProperty
, this method does nothing.- Parameters:
data
- the loaded data- Since:
- 1.0
- See Also:
-