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
ConstructorsConstructorDescriptionCmfPropertyValidationRule(String propertyName, boolean fragment) Instantiates a newCmfPropertyValidationRuleinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether the property that is validated is a fragment.protected voidsetCachedLoadedData(Object data) Sets the cached loaded data to aConstrainedPropertyif 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 newCmfPropertyValidationRuleinstance.- Parameters:
propertyName- the name of the propertyfragment-trueif the property is a fragment; orfalseif 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:
trueif the property is a fragment; orfalseif it's a complete document- Since:
- 1.0
-
setCachedLoadedData
Sets the cached loaded data to aConstrainedPropertyif 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
Constrainedor if it doesn't contain a correspondingConstrainedProperty, this method does nothing.- Parameters:
data- the loaded data- Since:
- 1.0
- See Also:
-