Package org.opends.server.schema
Class JsonSchemaProvider
- java.lang.Object
-
- org.opends.server.schema.JsonSchemaProvider
-
- All Implemented Interfaces:
ConfigurationChangeListener<JsonSchemaCfg>,SchemaProvider<JsonSchemaCfg>
public class JsonSchemaProvider extends Object implements SchemaProvider<JsonSchemaCfg>, ConfigurationChangeListener<JsonSchemaCfg>
Allows users to configure custom JSON matching rules and indexing.
-
-
Constructor Summary
Constructors Constructor Description JsonSchemaProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigChangeResultapplyConfigurationChange(JsonSchemaCfg configuration)Applies the configuration changes to this change listener.voidfinalizeProvider()Finalize the provider.voidinitialize(ServerContext serverContext, JsonSchemaCfg configuration, SchemaBuilder initialSchemaBuilder)Initialize the schema provider from provided configuration and schema builder.booleanisConfigurationAcceptable(JsonSchemaCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)Indicates whether the provided configuration is acceptable for this provider.booleanisConfigurationChangeAcceptable(JsonSchemaCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)Indicates whether the proposed change to the configuration is acceptable to this change listener.
-
-
-
Method Detail
-
initialize
public void initialize(ServerContext serverContext, JsonSchemaCfg configuration, SchemaBuilder initialSchemaBuilder) throws ConfigException, InitializationException
Description copied from interface:SchemaProviderInitialize the schema provider from provided configuration and schema builder.- Specified by:
initializein interfaceSchemaProvider<JsonSchemaCfg>- Parameters:
serverContext- The server context.configuration- Configuration of the provider.initialSchemaBuilder- Schema builder to update during initialization phase.- Throws:
ConfigException- If a configuration problem arises in the process of performing the initialization.InitializationException- If a problem that is not configuration-related occurs during initialization.
-
finalizeProvider
public void finalizeProvider()
Description copied from interface:SchemaProviderFinalize the provider.- Specified by:
finalizeProviderin interfaceSchemaProvider<JsonSchemaCfg>
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(JsonSchemaCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
Description copied from interface:SchemaProviderIndicates whether the provided configuration is acceptable for this provider.- Specified by:
isConfigurationAcceptablein interfaceSchemaProvider<JsonSchemaCfg>- Parameters:
configuration- The provider configuration for which to make the determination.unacceptableReasons- A list that may be used to hold the reasons that the provided configuration is not acceptable.- Returns:
trueif the provided configuration is acceptable for this provider, orfalseif not.
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(JsonSchemaCfg configuration, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons)
Description copied from interface:ConfigurationChangeListenerIndicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptablein interfaceConfigurationChangeListener<JsonSchemaCfg>- Parameters:
configuration- The new configuration containing the changes.unacceptableReasons- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
trueif the proposed change is acceptable, orfalseif it is not.
-
applyConfigurationChange
public ConfigChangeResult applyConfigurationChange(JsonSchemaCfg configuration)
Description copied from interface:ConfigurationChangeListenerApplies the configuration changes to this change listener.- Specified by:
applyConfigurationChangein interfaceConfigurationChangeListener<JsonSchemaCfg>- Parameters:
configuration- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-
-