java.lang.Object
org.apache.sling.feature.extension.apiregions.api.config.validation.PropertyValidator

public class PropertyValidator extends Object
Validate a configuration property or framework property
  • Constructor Details

    • PropertyValidator

      public PropertyValidator()
  • Method Details

    • isLiveValues

      public boolean isLiveValues()
      Are live values validated?
      Returns:
      true if live values are validated
      Since:
      1.4
    • setLiveValues

      public void setLiveValues(boolean value)
      Set whether live values are validated.
      Parameters:
      value - Flag for validating live values
      Since:
      1.4
    • validate

      public PropertyValidationResult validate(Object value, PropertyDescription desc)
      Validate the value against the property definition
      Parameters:
      value - The value to validate
      desc - The property description
      Returns:
      A property validation result
    • validate

      public PropertyValidationResult validate(Object value, PropertyDescription desc, Mode mode)
      Validate the value against the property definition
      Parameters:
      value - The value to validate
      desc - The property description
      mode - Optional validation mode - this mode is used if the description does not define a mode. Defaults to Mode.STRICT.
      Returns:
      A property validation result
      Since:
      1.2.0