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

# Class ConfigurationValidator

java.lang.Object
org.apache.sling.feature.extension.apiregions.api.config.validation.ConfigurationValidator

public class ConfigurationValidator extends Object
Validator to validate a configuration or factory configuration

## Field Summary

Fields
Modifier and Type
Field
Description
`static final List<String>`
`ALLOWED_PROPERTIES`
List of properties which are always allowed

## Constructor Summary

Constructors
Constructor
Description
`ConfigurationValidator()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`isLiveValues()`
Are live values validated?
`void`
`setLiveValues(boolean value)`
Set whether live values are validated.
`ConfigurationValidationResult`
`validate(org.apache.sling.feature.Configuration config, ConfigurableEntity desc, Region region)`
Validate a configuration
`ConfigurationValidationResult`
`validate(org.apache.sling.feature.Configuration config, ConfigurableEntity desc, Region region, Mode mode)`
Validate a configuration

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

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

## Field Details

### ALLOWED_PROPERTIES

public static final List<String> ALLOWED_PROPERTIES
List of properties which are always allowed

## Constructor Details

### ConfigurationValidator

public ConfigurationValidator()

## 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 ConfigurationValidationResult validate(org.apache.sling.feature.Configuration config, ConfigurableEntity desc, Region region)
Validate a configuration

Parameters:
  `config` - The OSGi configuration
  `desc` - The configuration description
  `region` - The optional region for the configuration
Returns:
  The result

### validate

public ConfigurationValidationResult validate(org.apache.sling.feature.Configuration config, ConfigurableEntity desc, Region region, Mode mode)
Validate a configuration

Parameters:
  `config` - The OSGi configuration
  `desc` - The configuration description
  `region` - The optional region for the configuration
  `mode` - The optional validation mode. This is used if the configuration/property has no mode is set. Defaults to `Mode.STRICT`.
Returns:
  The result
Since:
  1.2