Package org.apache.sling.feature.extension.apiregions.api.config.validation

# Class PropertyValidator

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 Summary

Constructors
Constructor
Description
`PropertyValidator()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`isLiveValues()`
Are live values validated?
`void`
`setLiveValues(boolean value)`
Set whether live values are validated.
`PropertyValidationResult`
`validate(Object value, PropertyDescription desc)`
Validate the value against the property definition
`PropertyValidationResult`
`validate(Object value, PropertyDescription desc, Mode mode)`
Validate the value against the property definition

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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