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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisLiveValues()Are live values validated?voidsetLiveValues(boolean value)Set whether live values are validated.PropertyValidationResultvalidate(Object value, PropertyDescription desc)Validate the value against the property definitionPropertyValidationResultvalidate(Object value, PropertyDescription desc, Mode mode)Validate the value against the property definition
-
-
-
Method Detail
-
isLiveValues
public boolean isLiveValues()
Are live values validated?- Returns:
trueif 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 validatedesc- 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 validatedesc- The property descriptionmode- Optional validation mode - this mode is used if the description does not define a mode. Defaults toMode.STRICT.- Returns:
- A property validation result
- Since:
- 1.2.0
-
-