Class ConfigurationValidationResult
- java.lang.Object
-
- org.apache.sling.feature.extension.apiregions.api.config.validation.ConfigurationValidationResult
-
public class ConfigurationValidationResult extends Object
A configuration validation result is returned by theConfigurationValidator
. This class is not thread safe.
-
-
Constructor Summary
Constructors Constructor Description ConfigurationValidationResult()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getErrors()
Return the list of errorsMap<String,PropertyValidationResult>
getPropertyResults()
Get a property validation result for each property of the configurationList<String>
getWarnings()
Return the list of warningsboolean
isUseDefaultValue()
Should the default be used instead of the configuration values?boolean
isValid()
Is the configuration valid?void
setUseDefaultValue(boolean useDefault)
Set whether the default values should be used
-
-
-
Method Detail
-
isValid
public boolean isValid()
Is the configuration valid?- Returns:
true
if it is valid
-
getErrors
public List<String> getErrors()
Return the list of errors- Returns:
- A list of errors. Might be empty.
-
getPropertyResults
public Map<String,PropertyValidationResult> getPropertyResults()
Get a property validation result for each property of the configuration- Returns:
- A map of property results keyed by property name
-
getWarnings
public List<String> getWarnings()
Return the list of warnings- Returns:
- The list of warnings - might be empty
-
isUseDefaultValue
public boolean isUseDefaultValue()
Should the default be used instead of the configuration values?- Returns:
true
if the default should be used.- Since:
- 1.3
-
setUseDefaultValue
public void setUseDefaultValue(boolean useDefault)
Set whether the default values should be used- Parameters:
useDefault
- boolean flag- Since:
- 1.3
-
-