Class CmfPropertyValidationRule

All Implemented Interfaces:
Cloneable, ValidationRule
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
  • Constructor Details

    • 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 Details

    • 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: