Package org.revapi.configuration
Class ConfigurationValidator
- java.lang.Object
-
- org.revapi.configuration.ConfigurationValidator
-
public final class ConfigurationValidator extends Object
- Since:
- 0.1
- Author:
- Lukas Krejci
- See Also:
validate(JsonNode, Configurable)
-
-
Constructor Summary
Constructors Constructor Description ConfigurationValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ValidationResult
validate(com.fasterxml.jackson.databind.JsonNode extensionConfiguration, com.fasterxml.jackson.databind.JsonNode configurationSchema)
Validates the provided configuration against the provided schema.ValidationResult
validate(com.fasterxml.jackson.databind.JsonNode fullConfiguration, Configurable configurable)
Validates that the full configuration contains valid configuration for given configurable.ValidationResult
validate(org.jboss.dmr.ModelNode extensionConfiguration, org.jboss.dmr.ModelNode configurationSchema)
Deprecated.use the Jackson-based variantValidationResult
validate(org.jboss.dmr.ModelNode fullConfiguration, Configurable configurable)
Deprecated.use the Jackson-based variant
-
-
-
Method Detail
-
validate
@Deprecated public ValidationResult validate(@Nonnull org.jboss.dmr.ModelNode fullConfiguration, @Nonnull Configurable configurable) throws ConfigurationException
Deprecated.use the Jackson-based variantValidates that the full configuration contains valid configuration for given configurable.- Parameters:
fullConfiguration
- the full configuration containing properties for all configurablesconfigurable
- the configurable to validate the configuration for- Returns:
- the result of the validation.
- Throws:
ConfigurationException
- if reading the JSON schemas of the configurable failed
-
validate
public ValidationResult validate(@Nullable com.fasterxml.jackson.databind.JsonNode fullConfiguration, Configurable configurable) throws ConfigurationException
Validates that the full configuration contains valid configuration for given configurable.- Parameters:
fullConfiguration
- the full configuration containing properties for all configurablesconfigurable
- the configurable to validate the configuration for- Returns:
- the result of the validation.
- Throws:
ConfigurationException
- if reading the JSON schemas of the configurable failed
-
validate
@Deprecated public ValidationResult validate(@Nonnull org.jboss.dmr.ModelNode extensionConfiguration, @Nonnull org.jboss.dmr.ModelNode configurationSchema) throws ConfigurationException
Deprecated.use the Jackson-based variantValidates the provided configuration against the provided schema.- Parameters:
extensionConfiguration
- the actual configuration of some extension (not wrapped in the identifying object as is the case with the full configuration provided tovalidate(ModelNode, Configurable)
.configurationSchema
- the schema to validate the configuration against- Returns:
- the results of the validation
- Throws:
ConfigurationException
- if an error occurs during the processing of the data or schema as opposed to a simple validation failure which would be captured in the returned object
-
validate
public ValidationResult validate(com.fasterxml.jackson.databind.JsonNode extensionConfiguration, com.fasterxml.jackson.databind.JsonNode configurationSchema) throws ConfigurationException
Validates the provided configuration against the provided schema.- Parameters:
extensionConfiguration
- the actual configuration of some extension (not wrapped in the identifying object as is the case with the full configuration provided tovalidate(JsonNode, Configurable)
.configurationSchema
- the schema to validate the configuration against- Returns:
- the results of the validation
- Throws:
ConfigurationException
- if an error occurs during the processing of the data or schema as opposed to a simple validation failure which would be captured in the returned object
-
-