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

# 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 the `ConfigurationValidator`. This class is not thread safe.

## Constructor Summary

Constructors
Constructor
Description
`ConfigurationValidationResult()`

## Method Summary

Modifier and Type
Method
Description
`List<String>`
`getErrors()`
Return the list of errors
`Map<String,PropertyValidationResult>`
`getPropertyResults()`
Get a property validation result for each property of the configuration
`List<String>`
`getWarnings()`
Return the list of warnings
`boolean`
`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

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

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

## Constructor Details

### ConfigurationValidationResult

public ConfigurationValidationResult()

## Method Details

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