Class PropertyValidator
java.lang.Object
org.apache.sling.feature.extension.apiregions.api.config.validation.PropertyValidator
Validate a configuration property or framework property
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAre live values validated?voidsetLiveValues(boolean value) Set whether live values are validated.validate(Object value, PropertyDescription desc) Validate the value against the property definitionvalidate(Object value, PropertyDescription desc, Mode mode) Validate the value against the property definition
-
Constructor Details
-
PropertyValidator
public PropertyValidator()
-
-
Method Details
-
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
Validate the value against the property definition- Parameters:
value- The value to validatedesc- The property description- Returns:
- A property validation result
-
validate
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
-