| | |
| | | */ |
| | | package org.opends.server.schema; |
| | | |
| | | import static org.forgerock.opendj.rest2ldap.schema.JsonSchema.addJsonSyntaxesAndMatchingRulesToSchema; |
| | | import static org.opends.server.util.SchemaUtils.is02ConfigLdif; |
| | | |
| | | import static java.util.Collections.emptyList; |
| | |
| | | // Start from the core schema |
| | | final SchemaBuilder schemaBuilder = new SchemaBuilder(Schema.getCoreSchema()); |
| | | |
| | | loadSchemaFromProviders(serverContext.getRootConfig(), schemaBuilder); |
| | | |
| | | // Load core syntaxes and matching rules first then let providers adjust them if needed. |
| | | addServerSyntaxesAndMatchingRules(schemaBuilder); |
| | | |
| | | loadSchemaFromProviders(serverContext.getRootConfig(), schemaBuilder); |
| | | loadSchemaFromFiles(schemaBuilder); |
| | | |
| | | try |
| | |
| | | addHistoricalCsnOrderingMatchingRule(schemaBuilder); |
| | | addAuthPasswordEqualityMatchingRule(schemaBuilder); |
| | | addUserPasswordEqualityMatchingRule(schemaBuilder); |
| | | addJsonSyntaxesAndMatchingRulesToSchema(schemaBuilder); |
| | | } |
| | | catch (ConflictingSchemaElementException e) |
| | | { |
| | |
| | | * The root to retrieve schema provider configurations. |
| | | * @param schemaBuilder |
| | | * The schema builder that providers should update. |
| | | * @param schemaUpdater |
| | | * The updater that providers should use when applying a configuration change. |
| | | */ |
| | | private void loadSchemaFromProviders(final RootCfg rootConfiguration, final SchemaBuilder schemaBuilder) |
| | | throws ConfigException, InitializationException { |