com.uwyn.rife.cmf.validation
Class CmfPropertyValidationRule

java.lang.Object
  extended by com.uwyn.rife.site.AbstractValidationRule
      extended by com.uwyn.rife.site.PropertyValidationRule
          extended by com.uwyn.rife.cmf.validation.CmfPropertyValidationRule
All Implemented Interfaces:
ValidationRule, Cloneable
Direct Known Subclasses:
SupportedImage, SupportedXhtml

public abstract class CmfPropertyValidationRule
extends PropertyValidationRule

This abstract class extends the PropertyValidationRule class to provide common functionality that is useful for all concrete CMF validation rules.

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

Constructor Summary
CmfPropertyValidationRule(String propertyName, boolean fragment)
          Instantiates a new CmfPropertyValidationRule instance.
 
Method Summary
 boolean getFragment()
          Indicates whether the property that is validated is a fragment.
protected  void setCachedLoadedData(Object data)
          Sets the cached loaded data to a ConstrainedProperty if the content data has been successfully loaded during validation.
 
Methods inherited from class com.uwyn.rife.site.PropertyValidationRule
getLoadingErrors, getPropertyName, getSubject, setLoadingErrors, setPropertyName, setSubject
 
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

CmfPropertyValidationRule

public CmfPropertyValidationRule(String propertyName,
                                 boolean fragment)
Instantiates a new CmfPropertyValidationRule instance.

Parameters:
propertyName - the name of the property
fragment - true if the property is a fragment; or

false if it's a complete document

Since:
1.0
Method Detail

getFragment

public boolean getFragment()
Indicates whether the property that is validated is a fragment.

Returns:
true if the property is a fragment; or

false if it's a complete document

Since:
1.0

setCachedLoadedData

protected void setCachedLoadedData(Object data)
Sets the cached loaded data to a ConstrainedProperty 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 corresponding ConstrainedProperty, this method does nothing.

Parameters:
data - the loaded data
Since:
1.0
See Also:
ConstrainedProperty.setCachedLoadedData(Object)


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