mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Nicolas Capponi
11.32.2016 6f14605908036dd6c2cfc64f31f1d5d8d17f86a8
Remove ConfigurationBootstrapper

- Remove ConfigurationBootstrapper class

- DirectoryServer.getConfigEntry() method must use ConfigurationHandler
to retrieve the entry
1 files deleted
2 files modified
105 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/core/ConfigurationBootstrapper.java 83 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/DirectoryServer.java 19 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/ServerContextBuilder.java 3 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/core/ConfigurationBootstrapper.java
File was deleted
opendj-server-legacy/src/main/java/org/opends/server/core/DirectoryServer.java
@@ -880,8 +880,8 @@
      // Set default values for variables that may be needed during schema processing.
      directoryServer.syntaxEnforcementPolicy = AcceptRejectWarn.REJECT;
      // Create and initialize the server schema,
      // and register a minimal set of matching rules and attribute syntaxes.
      // Create the server schema and initialize and register a minimal set of
      // matching rules and attribute syntaxes.
      try
      {
        directoryServer.setSchema(new Schema(org.forgerock.opendj.ldap.schema.Schema.getCoreSchema()));
@@ -1099,8 +1099,9 @@
   */
  public void initializeConfiguration() throws InitializationException
  {
    configFile = environmentConfig.getConfigFile();
    configClass = environmentConfig.getConfigClass();
    configurationHandler = ConfigurationBootstrapper.bootstrap(serverContext, configClass);
    configurationHandler = ConfigurationHandler.bootstrapConfiguration(serverContext, configClass);
    serverManagementContext = new ServerManagementContext(configurationHandler);
    final ConfigurationBackend configBackend = new ConfigurationBackend(serverContext, configurationHandler);
@@ -1210,6 +1211,13 @@
      initializeSchema();
      // At this point, it is necessary to reload the configuration because it was
      // loaded with an incomplete schema (meaning some attributes types and objectclasses
      // were defined by default, using a non-strict schema).
      // Configuration add/delete/change listeners are preserved by calling this method,
      // so schema elements listeners already registered are not lost.
      configurationHandler.reinitializeWithFullSchema(schema.getSchemaNG());
      commonAudit = new CommonAudit(serverContext);
      // Allow internal plugins to be registered.
@@ -1277,7 +1285,6 @@
      groupManager.performBackendPreInitializationProcessing(configBackend);
      AccessControlConfigManager.getInstance().initializeAccessControl(serverContext);
      initializeAuthenticationPolicyComponents();
      // Initialize all the backends and their associated suffixes
      // and initialize the workflows when workflow configuration mode is auto.
@@ -1302,6 +1309,7 @@
      monitorConfigManager = new MonitorConfigManager(serverContext);
      monitorConfigManager.initializeMonitorProviders();
      initializeAuthenticationPolicyComponents();
      pluginConfigManager.initializeUserPlugins(null);
@@ -1993,7 +2001,8 @@
  @Deprecated
  public static Entry getConfigEntry(DN entryDN) throws ConfigException
  {
    return Converters.to(directoryServer.configurationHandler.getEntry(entryDN));
    org.forgerock.opendj.ldap.Entry entry = directoryServer.configurationHandler.getEntry(entryDN);
    return entry != null ? Converters.to(entry) : null;
  }
  /**
opendj-server-legacy/src/test/java/org/opends/server/ServerContextBuilder.java
@@ -20,7 +20,6 @@
import java.io.File;
import org.forgerock.opendj.config.server.ServerManagementContext;
import org.opends.server.core.ConfigurationBootstrapper;
import org.opends.server.core.ConfigurationHandler;
import org.opends.server.core.ServerContext;
import org.opends.server.types.DirectoryEnvironmentConfig;
@@ -82,7 +81,7 @@
      throws InitializationException
  {
    final ConfigurationHandler configHandler =
        ConfigurationBootstrapper.bootstrap(serverContext, ConfigurationHandler.class);
        ConfigurationHandler.bootstrapConfiguration(serverContext, ConfigurationHandler.class);
    final ServerManagementContext serverManagementContext = new ServerManagementContext(configHandler);
    when(serverContext.getServerManagementContext()).thenReturn(serverManagementContext);
    return this;