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

neil_a_wilson
10.03.2007 7cf412c3943d58b388dde6b89a8b58c4da66aa95
opendj-sdk/opends/src/server/org/opends/server/api/AccessControlHandler.java
@@ -27,6 +27,9 @@
package org.opends.server.api;
import java.util.List;
import org.opends.server.admin.std.server.AccessControlHandlerCfg;
import org.opends.server.config.ConfigException;
import org.opends.server.core.*;
@@ -72,6 +75,40 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this access control handler.  It should be possible to call this
   * method on an uninitialized access control handler instance in
   * order to determine whether the handler would be able to use the
   * provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The access control handler
   *                              configuration for which to make the
   *                              determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this access control handler, or {@code false} if
   *          not.
   */
  public boolean isConfigurationAcceptable(
                      AccessControlHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by access control handler
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Performs any necessary finalization for the access control
   * handler implementation. This will be called just after the
   * handler has been deregistered with the server but before it has
opendj-sdk/opends/src/server/org/opends/server/api/AccessLogPublisher.java
@@ -28,6 +28,8 @@
import java.util.List;
import org.opends.server.admin.std.server.AccessLogPublisherCfg;
import org.opends.server.config.ConfigException;
import org.opends.server.core.*;
@@ -76,6 +78,39 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this access log publisher.  It should be possible to call this
   * method on an uninitialized access log publisher instance in
   * order to determine whether the access log publisher would be able
   * to use the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The access log publisher
   *                              configuration for which to make the
   *                              determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this access log publisher, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      AccessLogPublisherCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by access log publisher
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Close this publisher.
   */
  public abstract void close();
opendj-sdk/opends/src/server/org/opends/server/api/AccountStatusNotificationHandler.java
@@ -28,6 +28,8 @@
import java.util.List;
import org.opends.server.admin.std.server.
       AccountStatusNotificationHandlerCfg;
import org.opends.server.config.ConfigException;
@@ -77,6 +79,42 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this account status notification handler.  It should be possible
   * to call this method on an uninitialized account status
   * notification handler instance in order to determine whether the
   * handler would be able to use the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The account status notification
   *                              handler configuration for which to
   *                              make the determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this account status notification handler, or
   *          {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      AccountStatusNotificationHandlerCfg
                           configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by account status
    // notification implementations that wish to perform more detailed
    // validation.
    return true;
  }
  /**
   * Performs any finalization that may be necessary when this status
   * notification handler is taken out of service.
   */
opendj-sdk/opends/src/server/org/opends/server/api/AttributeSyntax.java
@@ -28,6 +28,8 @@
import java.util.List;
import org.opends.server.admin.std.server.AttributeSyntaxCfg;
import org.opends.server.config.ConfigException;
import org.opends.server.types.ByteString;
@@ -67,6 +69,38 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this attribute syntax.  It should be possible to call this method
   * on an uninitialized attribute syntax instance in order to
   * determine whether the syntax would be able to use the provided
   * configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The attribute syntax configuration
   *                              for which to make the determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this attribute syntax, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      AttributeSyntaxCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by attribute syntax
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Performs any finalization that may be necessary for this
   * attribute syntax. By default, no finalization is performed.
   */
opendj-sdk/opends/src/server/org/opends/server/api/Backend.java
@@ -34,6 +34,7 @@
import java.util.Set;
import java.util.concurrent.locks.Lock;
import org.opends.server.admin.Configuration;
import org.opends.server.config.ConfigException;
import org.opends.server.core.AddOperation;
import org.opends.server.core.DeleteOperation;
@@ -58,7 +59,6 @@
import static org.opends.server.messages.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import org.opends.server.admin.Configuration;
/**
@@ -67,9 +67,6 @@
 */
public abstract class Backend
{
  // The backend that holds a portion of the DIT that is
  // hierarchically above the information in this backend.
  private Backend parentBackend;
@@ -125,6 +122,37 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this backend.  It should be possible to call this method on an
   * uninitialized backend instance in order to determine whether the
   * backend would be able to use the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The backend configuration for which
   *                              to make the determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this backend, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      Configuration configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by backend implementations
    // that wish to perform more detailed validation.
    return true;
  }
  /**
   * Initializes this backend based on the information provided
   * when the backend was configured.
   *
opendj-sdk/opends/src/server/org/opends/server/api/CertificateMapper.java
@@ -29,6 +29,7 @@
import java.security.cert.Certificate;
import java.util.List;
import org.opends.server.admin.std.server.CertificateMapperCfg;
import org.opends.server.config.ConfigException;
@@ -72,6 +73,38 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this certificate mapper.  It should be possible to call this
   * method on an uninitialized certificate mapper instance in order
   * to determine whether the certificate mapper would be able to use
   * the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The certificate mapper configuration
   *                              for which to make the determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this certificate mapper, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      CertificateMapperCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by certificate mapper
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Performs any finalization that may be necessary for this
   * certificate mapper.  By default, no finalization is performed.
   */
opendj-sdk/opends/src/server/org/opends/server/api/ConnectionHandler.java
@@ -29,6 +29,7 @@
import java.util.Collection;
import java.util.List;
import org.opends.server.admin.std.server.*;
import org.opends.server.config.ConfigException;
@@ -165,6 +166,38 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this connection handler.  It should be possible to call this
   * method on an uninitialized connection handler instance in order
   * to determine whether the connection handler would be able to use
   * the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The connection handler configuration
   *                              for which to make the determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this connection handler, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      ConnectionHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by connection handler
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Operates in a loop, accepting new connections and ensuring that
   * requests on those connections are handled properly.
   */
opendj-sdk/opends/src/server/org/opends/server/api/DebugLogPublisher.java
@@ -29,6 +29,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
@@ -106,6 +107,39 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this debug log publisher.  It should be possible to call this
   * method on an uninitialized debug log publisher instance in
   * order to determine whether the debug log publisher would be able
   * to use the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The debug log publisher
   *                              configuration for which to make the
   *                              determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this debug log publisher, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      DebugLogPublisherCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by debug log publisher
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Gets the method trace levels for a specified class.
   *
   * @param  className  The fully-qualified name of the class for
opendj-sdk/opends/src/server/org/opends/server/api/EntryCache.java
@@ -91,6 +91,38 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this entry cache.  It should be possible to call this method on
   * an uninitialized entry cache instance in order to determine
   * whether the entry cache would be able to use the provided
   * configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The entry cache configuration for
   *                              which to make the determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this entry cache, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      EntryCacheCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by entry cache
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Performs any necessary cleanup work (e.g., flushing all cached
   * entries and releasing any other held resources) that should be
   * performed when the server is to be shut down or the entry cache
opendj-sdk/opends/src/server/org/opends/server/api/ErrorLogPublisher.java
@@ -30,6 +30,7 @@
import java.util.HashSet;
import java.util.HashMap;
import java.util.List;
import org.opends.server.admin.std.server.ErrorLogPublisherCfg;
import org.opends.server.config.ConfigException;
@@ -92,6 +93,39 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this error log publisher.  It should be possible to call this
   * method on an uninitialized error log publisher instance in
   * order to determine whether the error log publisher would be able
   * to use the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The error log publisher
   *                              configuration for which to make the
   *                              determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this error log publisher, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      ErrorLogPublisherCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by error log publisher
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Close this publisher.
   */
  public abstract void close();
opendj-sdk/opends/src/server/org/opends/server/api/ExtendedOperationHandler.java
@@ -29,6 +29,7 @@
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.opends.server.config.ConfigException;
@@ -91,6 +92,41 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this extended operation handler.  It should be possible to call
   * this method on an uninitialized extended operation handler
   * instance in order to determine whether the extended operation
   * handler would be able to use the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The extended operation handler
   *                              configuration for which to make the
   *                              determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this extended operation handler, or {@code false} if
   *          not.
   */
  public boolean isConfigurationAcceptable(
                      ExtendedOperationHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by extended operation
    // handler implementations that wish to perform more detailed
    // validation.
    return true;
  }
  /**
   * Performs any finalization that may be necessary for this extended
   * operation handler.  By default, no finalization is performed.
   */
@@ -224,6 +260,5 @@
      }
    }
  }
}
opendj-sdk/opends/src/server/org/opends/server/api/Group.java
@@ -63,8 +63,7 @@
 * @param  <T>  The type of configuration handled by this group
 *              implementation.
 */
public abstract class Group<T
       extends GroupImplementationCfg>
public abstract class Group<T extends GroupImplementationCfg>
{
  /**
   * Initializes a "shell" instance of this group implementation that
@@ -89,6 +88,39 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this group implementation.  It should be possible to call this
   * method on an uninitialized group implementation instance in order
   * to determine whether the group implementation would be able to
   * use the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The group implementation
   *                              configuration for which to make the
   *                              determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this group implementation, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      GroupImplementationCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by group implementations
    // that wish to perform more detailed validation.
    return true;
  }
  /**
   * Performs any necessary finalization that may be needed whenever
   * this group implementation is taken out of service within the
   * Directory Server (e.g., if it is disabled or the server is
opendj-sdk/opends/src/server/org/opends/server/api/IdentityMapper.java
@@ -28,6 +28,8 @@
import java.util.List;
import org.opends.server.admin.std.server.IdentityMapperCfg;
import org.opends.server.config.ConfigException;
import org.opends.server.types.DirectoryException;
@@ -72,6 +74,38 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this identity mapper.  It should be possible to call this method
   * on an uninitialized identity mapper instance in order to
   * determine whether the identity mapper would be able to use the
   * provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The identity mapper configuration
   *                              for which to make the determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this identity mapper, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      IdentityMapperCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by identity mapper
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Performs any finalization that may be necessary for this identity
   * mapper.  By default, no finalization is performed.
   */
opendj-sdk/opends/src/server/org/opends/server/api/KeyManagerProvider.java
@@ -28,6 +28,7 @@
import java.util.List;
import javax.net.ssl.KeyManager;
import org.opends.server.admin.std.server.KeyManagerCfg;
@@ -71,6 +72,39 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this key manager provider.  It should be possible to call this
   * method on an uninitialized key manager provider instance in order
   * to determine whether the key manager provider would be able to
   * use the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The key manager provider
   *                              configuration for which to make the
   *                              determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this key manager provider, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      KeyManagerCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by key manager provider
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Performs any finalization that may be necessary for this key
   * manager provider.
   */
opendj-sdk/opends/src/server/org/opends/server/api/MatchingRule.java
@@ -28,6 +28,8 @@
import java.util.List;
import org.opends.server.admin.std.server.MatchingRuleCfg;
import org.opends.server.config.ConfigException;
import org.opends.server.types.ByteString;
@@ -68,6 +70,38 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this matching rule.  It should be possible to call this method on
   * an uninitialized matching rule instance in order to determine
   * whether the matching rule would be able to use the provided
   * configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The matching rule configuration for
   *                              which to make the determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this matching rule, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      MatchingRuleCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by matching rule
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Performs any finalization that may be needed whenever this
   * matching rule is taken out of service.
   */
opendj-sdk/opends/src/server/org/opends/server/api/MonitorProvider.java
@@ -110,6 +110,38 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this monitor provider.  It should be possible to call this method
   * on an uninitialized monitor provider instance in order to
   * determine whether the monitor provider would be able to use the
   * provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The monitor provider configuration
   *                              for which to make the determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this monitor provider, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      MonitorProviderCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by monitor provider
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Finalizes this monitor provider so that it may be unloaded and
   * taken out of service.  This method should be overridden by any
   * monitor provider that has resources that should be released when
opendj-sdk/opends/src/server/org/opends/server/api/PasswordGenerator.java
@@ -28,6 +28,8 @@
import java.util.List;
import org.opends.server.admin.std.server.PasswordGeneratorCfg;
import org.opends.server.config.ConfigException;
import org.opends.server.types.ByteString;
@@ -73,6 +75,38 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this password generator.  It should be possible to call this
   * method on an uninitialized password generator instance in order
   * to determine whether the password generator would be able to use
   * the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The password generator configuration
   *                              for which to make the determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this password generator, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      PasswordGeneratorCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by password generator
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Performs any finalization work that may be necessary when this
   * password generator is taken out of service.
   */
opendj-sdk/opends/src/server/org/opends/server/api/PasswordStorageScheme.java
@@ -28,6 +28,8 @@
import java.util.List;
import org.opends.server.admin.std.server.PasswordStorageSchemeCfg;
import org.opends.server.config.ConfigException;
import org.opends.server.types.ByteString;
@@ -74,6 +76,40 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this password storage scheme.  It should be possible to call this
   * method on an uninitialized password storage scheme instance in
   * order to determine whether the password storage scheme would be
   * able to use the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The password storage scheme
   *                              configuration for which to make the
   *                              determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this password storage scheme, or {@code false} if
   *          not.
   */
  public boolean isConfigurationAcceptable(
                      PasswordStorageSchemeCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by password storage scheme
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Performs any necessary finalization that might be required when
   * this password storage scheme is no longer needed (e.g., the
   * scheme is disabled or the server is shutting down).
opendj-sdk/opends/src/server/org/opends/server/api/PasswordValidator.java
@@ -28,6 +28,7 @@
import java.util.List;
import java.util.Set;
import org.opends.server.admin.std.server.PasswordValidatorCfg;
@@ -72,6 +73,38 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this password validator.  It should be possible to call this
   * method on an uninitialized password validator instance in order
   * to determine whether the password validator would be able to use
   * the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The password validator configuration
   *                              for which to make the determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this password validator, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(
                      PasswordValidatorCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by password validator
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Performs any finalization that might be required when this
   * password validator is unloaded.  No action is taken in the
   * default implementation.
opendj-sdk/opends/src/server/org/opends/server/api/SASLMechanismHandler.java
@@ -28,6 +28,8 @@
import java.util.List;
import org.opends.server.admin.std.server.SASLMechanismHandlerCfg;
import org.opends.server.config.ConfigException;
import org.opends.server.core.BindOperation;
@@ -35,7 +37,6 @@
/**
 * This class defines the set of methods and structures that must be
 * implemented by a Directory Server module that implements the
@@ -71,6 +72,40 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this SASL mechanism handler.  It should be possible to call this
   * method on an uninitialized SASL mechanism handler instance in
   * order to determine whether the SASL mechanism handler would be
   * able to use the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The SASL mechanism handler
   *                              configuration for which to make the
   *                              determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this SASL mechanism handler, or {@code false} if
   *          not.
   */
  public boolean isConfigurationAcceptable(
                      SASLMechanismHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by SASL mechanism handler
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Performs any finalization that may be necessary for this SASL
   * mechanism handler.  By default, no finalization is performed.
   */
opendj-sdk/opends/src/server/org/opends/server/api/SynchronizationProvider.java
@@ -77,6 +77,41 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this synchronization provider.  It should be possible to call
   * this method on an uninitialized synchronization provider instance
   * in order to determine whether the synchronization provider would
   * be able to use the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The synchronization provider
   *                              configuration for which to make the
   *                              the determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this synchronization provider, or {@code false} if
   *          not.
   */
  public boolean isConfigurationAcceptable(
                      SynchronizationProviderCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by synchronization
    // provider implementations that wish to perform more detailed
    // validation.
    return true;
  }
  /**
   * Performs any necessary finalization for this synchronization
   * provider.  This will be called just after the provider has been
   * deregistered with the server but before it has been unloaded.
opendj-sdk/opends/src/server/org/opends/server/api/TrustManagerProvider.java
@@ -28,6 +28,7 @@
import java.util.List;
import javax.net.ssl.TrustManager;
import org.opends.server.admin.std.server.TrustManagerCfg;
@@ -71,6 +72,40 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this trust manager provider.  It should be possible to call this
   * method on an uninitialized trust manager provider instance in
   * order to determine whether the trust manager provider would be
   * able to use the provided configuration.
   * <BR><BR>
   * Note that implementations which use a subclass of the provided
   * configuration class will likely need to cast the configuration
   * to the appropriate subclass type.
   *
   * @param  configuration        The trust manager provider
   *                              configuration for which to make the
   *                              determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this trust manager provider, or {@code false} if
   *          not.
   */
  public boolean isConfigurationAcceptable(
                      TrustManagerCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by trust manager provider
    // implementations that wish to perform more detailed validation.
    return true;
  }
  /**
   * Performs any finalization that may be necessary for this trust
   * manager provider.
   */
opendj-sdk/opends/src/server/org/opends/server/api/VirtualAttributeProvider.java
@@ -88,6 +88,37 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this virtual attribute provider.  It should be possible to call
   * this method on an uninitialized virtual attribute provider
   * instance in order to determine whether the virtual attribute
   * provider would be able to use the provided configuration.
   *
   * @param  configuration        The virtual attribute provider
   *                              configuration for which to make the
   *                              determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this virtual attribute provider, or {@code false} if
   *          not.
   */
  public boolean isConfigurationAcceptable(
                      VirtualAttributeCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by virtual attribute
    // provider implementations that wish to perform more detailed
    // validation.
    return true;
  }
  /**
   * Performs any finalization that may be necessary whenever this
   * virtual attribute provider is taken out of service.
   */
opendj-sdk/opends/src/server/org/opends/server/api/plugin/DirectoryServerPlugin.java
@@ -28,6 +28,7 @@
import java.util.List;
import java.util.Set;
import org.opends.server.admin.std.server.PluginCfg;
@@ -83,6 +84,32 @@
  /**
   * Indicates whether the provided configuration is acceptable for
   * this plugin.  It should be possible to call this method on an
   * uninitialized plugin instance in order to determine whether the
   * plugin would be able to use the provided configuration.
   *
   * @param  configuration        The plugin configuration for which
   *                              to make the determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this plugin, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(PluginCfg configuration,
                      List<String> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by plugin implementations
    // that wish to perform more detailed validation.
    return true;
  }
  /**
   * Performs any initialization that should be done for all types of
   * plugins regardless of type.  This should only be called by the
   * core Directory Server code during the course of loading a plugin.
opendj-sdk/opends/src/server/org/opends/server/backends/RootDSEBackend.java
@@ -38,6 +38,9 @@
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import org.opends.server.admin.Configuration;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.RootDSEBackendCfg;
import org.opends.server.api.Backend;
import org.opends.server.config.ConfigEntry;
import org.opends.server.config.ConfigException;
@@ -47,6 +50,7 @@
import org.opends.server.core.ModifyOperation;
import org.opends.server.core.ModifyDNOperation;
import org.opends.server.core.SearchOperation;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.protocols.asn1.ASN1OctetString;
import org.opends.server.types.Attribute;
import org.opends.server.types.AttributeType;
@@ -57,6 +61,7 @@
import org.opends.server.types.CancelRequest;
import org.opends.server.types.CancelResult;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DN;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.Entry;
@@ -74,19 +79,14 @@
import org.opends.server.util.Validator;
import static org.opends.server.config.ConfigConstants.*;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.ErrorLogger.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import static org.opends.server.messages.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.messages.ConfigMessages.
     MSGID_CONFIG_BACKEND_ERROR_INTERACTING_WITH_BACKEND_ENTRY;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
import org.opends.server.admin.std.server.RootDSEBackendCfg;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.Configuration;
/**
@@ -165,7 +165,8 @@
  /**
   * {@inheritDoc}
   */
  public void configureBackend(Configuration config) throws ConfigException
  public void configureBackend(Configuration config)
         throws ConfigException
  {
    Validator.ensureNotNull(config);
    Validator.ensureTrue(config instanceof RootDSEBackendCfg);
@@ -1337,6 +1338,19 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(Configuration configuration,
                                           List<String> unacceptableReasons)
  {
    RootDSEBackendCfg config = (RootDSEBackendCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
       RootDSEBackendCfg cfg,
       List<String> unacceptableReasons)
@@ -1550,8 +1564,5 @@
    return new ConfigChangeResult(resultCode, adminActionRequired, messages);
  }
}
opendj-sdk/opends/src/server/org/opends/server/backends/task/TaskBackend.java
@@ -34,6 +34,9 @@
import java.util.List;
import java.util.concurrent.locks.Lock;
import org.opends.server.admin.Configuration;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.TaskBackendCfg;
import org.opends.server.api.Backend;
import org.opends.server.config.ConfigException;
import org.opends.server.config.ConfigEntry;
@@ -43,12 +46,14 @@
import org.opends.server.core.ModifyOperation;
import org.opends.server.core.ModifyDNOperation;
import org.opends.server.core.SearchOperation;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
import org.opends.server.types.BackupConfig;
import org.opends.server.types.BackupDirectory;
import org.opends.server.types.CancelledOperationException;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.InitializationException;
import org.opends.server.types.LDIFExportConfig;
@@ -58,18 +63,13 @@
import org.opends.server.types.ResultCode;
import org.opends.server.types.SearchFilter;
import org.opends.server.types.SearchScope;
import org.opends.server.util.Validator;
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.BackendMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
import org.opends.server.util.Validator;
import org.opends.server.admin.std.server.TaskBackendCfg;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.Configuration;
/**
@@ -141,7 +141,8 @@
  /**
   * {@inheritDoc}
   */
  public void configureBackend(Configuration config) throws ConfigException
  public void configureBackend(Configuration config)
         throws ConfigException
  {
    Validator.ensureNotNull(config);
    Validator.ensureTrue(config instanceof TaskBackendCfg);
@@ -1088,23 +1089,66 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(Configuration configuration,
                                           List<String> unacceptableReasons)
  {
    TaskBackendCfg config = (TaskBackendCfg) configuration;
    return isConfigAcceptable(config, unacceptableReasons, null);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(TaskBackendCfg configEntry,
                                            List<String> unacceptableReasons)
  {
    return isConfigAcceptable(configEntry, unacceptableReasons,
                              taskBackingFile);
  }
  /**
   * Indicates whether the provided configuration is acceptable for this task
   * backend.
   *
   * @param  config               The configuration for which to make the
   *                              determination.
   * @param  unacceptableReasons  A list into which the unacceptable reasons
   *                              should be placed.
   * @param  taskBackingFile      The currently-configured task backing file, or
   *                              {@code null} if it should not be taken into
   *                              account.
   *
   * @return  {@code true} if the configuration is acceptable, or {@code false}
   *          if not.
   */
  private static boolean isConfigAcceptable(TaskBackendCfg config,
                                            List<String> unacceptableReasons,
                                            String taskBackingFile)
  {
    boolean configIsAcceptable = true;
    try
    {
      String tmpBackingFile = configEntry.getTaskBackingFile();
      if (! taskBackingFile.equals(tmpBackingFile))
      String tmpBackingFile = config.getTaskBackingFile();
      if ((taskBackingFile == null) ||
          (! taskBackingFile.equals(tmpBackingFile)))
      {
        File f = getFileForPath(tmpBackingFile);
        if (f.exists())
        {
          int msgID = MSGID_TASKBE_BACKING_FILE_EXISTS;
          unacceptableReasons.add(getMessage(msgID, tmpBackingFile));
          configIsAcceptable = false;
          // This is only a problem if it's different from the active one.
          if (taskBackingFile != null)
          {
            int msgID = MSGID_TASKBE_BACKING_FILE_EXISTS;
            unacceptableReasons.add(getMessage(msgID, tmpBackingFile));
            configIsAcceptable = false;
          }
        }
        else
        {
@@ -1146,9 +1190,6 @@
      configIsAcceptable = false;
    }
    return configIsAcceptable;
  }
@@ -1361,8 +1402,5 @@
  {
    return taskScheduler.getRecurringTask(taskEntryDN);
  }
}
opendj-sdk/opends/src/server/org/opends/server/core/AccessControlConfigManager.java
@@ -37,6 +37,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
@@ -253,7 +254,7 @@
      {
        if (newConfiguration.isEnabled())
        {
          newHandler = loadHandler(newHandlerClass, newConfiguration);
          newHandler = loadHandler(newHandlerClass, newConfiguration, true);
        }
        else
        {
@@ -331,7 +332,7 @@
      // can load the access control handler class.
      if (configuration.isEnabled())
      {
        loadHandler(configuration.getAclHandlerClass(), null);
        loadHandler(configuration.getAclHandlerClass(), configuration, false);
      }
    }
    catch (InitializationException e)
@@ -413,23 +414,26 @@
  /**
   * Loads the specified class, instantiates it as a AccessControlProvider, and
   * Loads the specified class, instantiates it as a AccessControlHandler, and
   * optionally initializes that instance.
   *
   * @param  className      The fully-qualified name of the Access Control
   *                        provider class to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the
   *                        Access Control Provider, or {@code null} if the
   *                        Access Control Provider should not be initialized.
   *                        Access Control Handler.  It must not be
   *                        {@code null}.
   * @param  initialize     Indicates whether the access control handler
   *                        instance should be initialized.
   *
   * @return  The possibly initialized Access Control Provider.
   * @return  The possibly initialized Access Control Handler.
   *
   * @throws  InitializationException  If a problem occurred while attempting to
   *                                   initialize the Access Control Provider.
   *                                   initialize the Access Control Handler.
   */
  private AccessControlHandler<? extends AccessControlHandlerCfg>
               loadHandler(String className,
                           AccessControlHandlerCfg configuration)
                           AccessControlHandlerCfg configuration,
                           boolean initialize)
          throws InitializationException
  {
    try
@@ -451,6 +455,36 @@
                  configuration.definition().getServerConfigurationClass());
        method.invoke(provider, configuration);
      }
      else
      {
        Method method =
             provider.getClass().getMethod("isConfigurationAcceptable",
                                           AccessControlHandlerCfg.class,
                                           List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(provider, configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_AUTHZ_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return provider;
    }
opendj-sdk/opends/src/server/org/opends/server/core/AccountStatusNotificationHandlerConfigManager.java
@@ -34,6 +34,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@@ -159,7 +160,7 @@
      try
      {
        // Load the class but don't initialize it.
        loadNotificationHandler(className, null);
        loadNotificationHandler(className, configuration, true);
      }
      catch (InitializationException ie)
      {
@@ -267,7 +268,7 @@
      try
      {
        // Load the class but don't initialize it.
        loadNotificationHandler (className, null);
        loadNotificationHandler (className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -373,7 +374,7 @@
    // Load the notification handler class...
    AccountStatusNotificationHandler
        <? extends AccountStatusNotificationHandlerCfg> handlerClass;
    handlerClass = loadNotificationHandler (className, configuration);
    handlerClass = loadNotificationHandler (className, configuration, true);
    // ... and install the entry cache in the server.
    DN configEntryDN = configuration.dn();
@@ -392,8 +393,9 @@
   * @param  className      The fully-qualified name of the notification handler
   *                        class to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the
   *                        notification handler, or {@code null} if the
   *                        notification handler should not be initialized.
   *                        notification handler.  It must not be {@code null}.
   * @param  initialize     Indicates whether the key manager provider instance
   *                        should be initialized.
   *
   * @return  The possibly initialized notification handler.
   *
@@ -405,8 +407,8 @@
       <? extends AccountStatusNotificationHandlerCfg>
    loadNotificationHandler(
       String className,
       AccountStatusNotificationHandlerCfg configuration
       )
       AccountStatusNotificationHandlerCfg configuration,
       boolean initialize)
       throws InitializationException
  {
    try
@@ -429,7 +431,7 @@
            <? extends AccountStatusNotificationHandlerCfg>)
        handlerClass.newInstance();
      if (configuration != null)
      if (initialize)
      {
        Method method = notificationHandler.getClass().getMethod(
            "initializeStatusNotificationHandler",
@@ -437,6 +439,37 @@
            );
        method.invoke(notificationHandler, configuration);
      }
      else
      {
        Method method =
             notificationHandler.getClass().getMethod(
                  "isConfigurationAcceptable",
                  AccountStatusNotificationHandlerCfg.class, List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(notificationHandler,
                                                     configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_ACCTNOTHANDLER_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return notificationHandler;
    }
opendj-sdk/opends/src/server/org/opends/server/core/AttributeSyntaxConfigManager.java
@@ -30,6 +30,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@@ -127,7 +128,8 @@
        String className = syntaxConfiguration.getSyntaxClass();
        try
        {
          AttributeSyntax syntax = loadSyntax(className, syntaxConfiguration);
          AttributeSyntax syntax = loadSyntax(className, syntaxConfiguration,
                                              true);
          try
          {
@@ -172,7 +174,7 @@
      String className = configuration.getSyntaxClass();
      try
      {
        loadSyntax(className, null);
        loadSyntax(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -211,7 +213,7 @@
    String className = configuration.getSyntaxClass();
    try
    {
      syntax = loadSyntax(className, configuration);
      syntax = loadSyntax(className, configuration, true);
      try
      {
@@ -316,7 +318,7 @@
      String className = configuration.getSyntaxClass();
      try
      {
        loadSyntax(className, null);
        loadSyntax(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -405,7 +407,7 @@
    AttributeSyntax syntax = null;
    try
    {
      syntax = loadSyntax(className, configuration);
      syntax = loadSyntax(className, configuration, true);
      try
      {
@@ -447,8 +449,9 @@
   * @param  className      The fully-qualified name of the attribute syntax
   *                        class to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the attribute
   *                        syntax, or {@code null} if the attribute syntax
   *                        should not be initialized.
   *                        syntax.  It should not be {@code null}.
   * @param  initialize     Indicates whether the key manager provider instance
   *                        should be initialized.
   *
   * @return  The possibly initialized attribute syntax.
   *
@@ -456,7 +459,8 @@
   *                                   initialize the attribute syntax.
   */
  private AttributeSyntax loadSyntax(String className,
                                     AttributeSyntaxCfg configuration)
                                     AttributeSyntaxCfg configuration,
                                     boolean initialize)
          throws InitializationException
  {
    try
@@ -469,13 +473,42 @@
           propertyDefinition.loadClass(className, AttributeSyntax.class);
      AttributeSyntax syntax = syntaxClass.newInstance();
      if (configuration != null)
      if (initialize)
      {
        Method method =
             syntax.getClass().getMethod("initializeSyntax",
                  configuration.definition().getServerConfigurationClass());
        method.invoke(syntax, configuration);
      }
      else
      {
        Method method = syntax.getClass().getMethod("isConfigurationAcceptable",
                                                    AttributeSyntaxCfg.class,
                                                    List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(syntax, configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_SCHEMA_SYNTAX_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return syntax;
    }
opendj-sdk/opends/src/server/org/opends/server/core/BackendConfigManager.java
@@ -476,6 +476,12 @@
                                          String.valueOf(backendDN)));
        return false;
      }
      Backend b = (Backend) backendClass.newInstance();
      if (! b.isConfigurationAcceptable(configEntry, unacceptableReason))
      {
        return false;
      }
    }
    catch (Exception e)
    {
opendj-sdk/opends/src/server/org/opends/server/core/CertificateMapperConfigManager.java
@@ -30,6 +30,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@@ -126,7 +127,8 @@
        String className = mapperConfiguration.getMapperClass();
        try
        {
          CertificateMapper mapper = loadMapper(className, mapperConfiguration);
          CertificateMapper mapper = loadMapper(className, mapperConfiguration,
                                                true);
          certificateMappers.put(mapperConfiguration.dn(), mapper);
          DirectoryServer.registerCertificateMapper(mapperConfiguration.dn(),
                                                    mapper);
@@ -158,7 +160,7 @@
      String className = configuration.getMapperClass();
      try
      {
        loadMapper(className, null);
        loadMapper(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -197,7 +199,7 @@
    String className = configuration.getMapperClass();
    try
    {
      certificateMapper = loadMapper(className, configuration);
      certificateMapper = loadMapper(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -273,7 +275,7 @@
      String className = configuration.getMapperClass();
      try
      {
        loadMapper(className, null);
        loadMapper(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -343,7 +345,7 @@
    CertificateMapper certificateMapper = null;
    try
    {
      certificateMapper = loadMapper(className, configuration);
      certificateMapper = loadMapper(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -374,8 +376,9 @@
   * @param  className      The fully-qualified name of the certificate mapper
   *                        class to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the
   *                        certificate mapper, or {@code null} if the
   *                        certificate mapper should not be initialized.
   *                        certificate mapper.  It must not be {@code null}.
   * @param  initialize     Indicates whether the certificate mapper instance
   *                        should be initialized.
   *
   * @return  The possibly initialized certificate mapper.
   *
@@ -383,7 +386,8 @@
   *                                   initialize the certificate mapper.
   */
  private CertificateMapper loadMapper(String className,
                                 CertificateMapperCfg configuration)
                                       CertificateMapperCfg configuration,
                                       boolean initialize)
          throws InitializationException
  {
    try
@@ -396,13 +400,42 @@
           propertyDefinition.loadClass(className, CertificateMapper.class);
      CertificateMapper mapper = mapperClass.newInstance();
      if (configuration != null)
      if (initialize)
      {
        Method method =
             mapper.getClass().getMethod("initializeCertificateMapper",
                  configuration.definition().getServerConfigurationClass());
        method.invoke(mapper, configuration);
      }
      else
      {
        Method method = mapper.getClass().getMethod("isConfigurationAcceptable",
                                                    CertificateMapperCfg.class,
                                                    List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(mapper, configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_CERTMAPPER_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return mapper;
    }
opendj-sdk/opends/src/server/org/opends/server/core/ConnectionHandlerConfigManager.java
@@ -441,10 +441,11 @@
        .getJavaImplementationClassPropertyDefinition();
    // Load the class and cast it to a connection handler.
    ConnectionHandler connectionHandler = null;
    Class<? extends ConnectionHandler> theClass;
    try {
      theClass = pd.loadClass(className, ConnectionHandler.class);
      theClass.newInstance();
      connectionHandler = theClass.newInstance();
    } catch (Exception e) {
      if (debugEnabled())
      {
@@ -464,8 +465,16 @@
      // Determine the initialization method to use: it must take a
      // single parameter which is the exact type of the configuration
      // object.
      theClass.getMethod("initializeConnectionHandler", config.definition()
          .getServerConfigurationClass());
      Method method = theClass.getMethod("isConfigurationAcceptable",
                                         ConnectionHandlerCfg.class,
                                         List.class);
      Boolean acceptable = (Boolean) method.invoke(connectionHandler, config,
                                                   unacceptableReasons);
      if (! acceptable)
      {
        return false;
      }
    } catch (Exception e) {
      if (debugEnabled())
      {
opendj-sdk/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
@@ -30,26 +30,9 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.opends.server.api.EntryCache;
import org.opends.server.extensions.DefaultEntryCache;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
import org.opends.server.config.ConfigException;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.loggers.ErrorLogger.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
import org.opends.server.admin.ClassPropertyDefinition;
import org.opends.server.admin.server.ConfigurationAddListener;
import org.opends.server.admin.server.ConfigurationChangeListener;
@@ -58,6 +41,24 @@
import org.opends.server.admin.std.server.EntryCacheCfg;
import org.opends.server.admin.std.server.RootCfg;
import org.opends.server.admin.std.meta.EntryCacheCfgDefn;
import org.opends.server.api.EntryCache;
import org.opends.server.config.ConfigException;
import org.opends.server.extensions.DefaultEntryCache;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
import static org.opends.server.loggers.ErrorLogger.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -222,7 +223,7 @@
      try
      {
        // Load the class but don't initialize it.
        loadEntryCache(className, null);
        loadEntryCache(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -314,7 +315,7 @@
      try
      {
        // Load the class but don't initialize it.
        loadEntryCache(className, null);
        loadEntryCache(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -426,7 +427,7 @@
    throws InitializationException
  {
    // Load the entry cache class...
    EntryCache entryCache = loadEntryCache (className, configuration);
    EntryCache entryCache = loadEntryCache (className, configuration, true);
    // ... and install the entry cache in the server.
    DirectoryServer.setEntryCache(entryCache);
@@ -441,8 +442,9 @@
   * @param  className      The fully-qualified name of the entry cache
   *                        class to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the
   *                        entry cache, or {@code null} if the
   *                        entry cache should not be initialized.
   *                        entry cache.  It must not be {@code null}.
   * @param  initialize     Indicates whether the key manager provider instance
   *                        should be initialized.
   *
   * @return  The possibly initialized entry cache.
   *
@@ -451,7 +453,8 @@
   */
  private EntryCache<? extends EntryCacheCfg> loadEntryCache(
    String        className,
    EntryCacheCfg configuration
    EntryCacheCfg configuration,
    boolean initialize
    )
    throws InitializationException
  {
@@ -467,7 +470,7 @@
      cacheClass = propertyDefinition.loadClass(className, EntryCache.class);
      cache = (EntryCache<? extends EntryCacheCfg>) cacheClass.newInstance();
      if (configuration != null)
      if (initialize)
      {
        Method method = cache.getClass().getMethod(
            "initializeEntryCache",
@@ -475,6 +478,35 @@
            );
        method.invoke(cache, configuration);
      }
      else
      {
        Method method = cache.getClass().getMethod("isConfigurationAcceptable",
                                                   EntryCacheCfg.class,
                                                   List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(cache, configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_ENTRYCACHE_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return cache;
    }
opendj-sdk/opends/src/server/org/opends/server/core/ExtendedOperationConfigManager.java
@@ -33,18 +33,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.lang.reflect.Method;
import org.opends.server.api.ExtendedOperationHandler;
import org.opends.server.config.ConfigException;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DN;
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.getMessage;
import org.opends.server.admin.ClassPropertyDefinition;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.server.ConfigurationAddListener;
import org.opends.server.admin.server.ConfigurationDeleteListener;
@@ -52,10 +41,22 @@
import org.opends.server.admin.std.server.ExtendedOperationHandlerCfg;
import org.opends.server.admin.std.server.RootCfg;
import org.opends.server.admin.std.meta.ExtendedOperationHandlerCfgDefn;
import org.opends.server.admin.ClassPropertyDefinition;
import org.opends.server.api.ExtendedOperationHandler;
import org.opends.server.config.ConfigException;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DN;
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
import static org.opends.server.loggers.debug.DebugLogger.*;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString;
/**
 * This class defines a utility that will be used to manage the set of extended
 * operation handlers defined in the Directory Server.  It will initialize the
@@ -75,7 +76,6 @@
  // A mapping between the DNs of the config entries and the associated extended
  // operation handlers.
  private ConcurrentHashMap<DN,ExtendedOperationHandler> handlers;
@@ -87,7 +87,7 @@
   */
  public ExtendedOperationConfigManager()
  {
    handlers      = new ConcurrentHashMap<DN,ExtendedOperationHandler>();
    handlers = new ConcurrentHashMap<DN,ExtendedOperationHandler>();
  }
@@ -382,9 +382,8 @@
  // Determines whether or not the new configuration's implementation
  // class is acceptable.
  private boolean isJavaClassAcceptable(
      ExtendedOperationHandlerCfg config,
      List<String> unacceptableReasons)
  private boolean isJavaClassAcceptable(ExtendedOperationHandlerCfg config,
                                        List<String> unacceptableReasons)
  {
    String className = config.getJavaImplementationClass();
    ExtendedOperationHandlerCfgDefn d =
@@ -396,13 +395,21 @@
    Class<? extends ExtendedOperationHandler> theClass;
    try {
      theClass = pd.loadClass(className, ExtendedOperationHandler.class);
      theClass.newInstance();
      ExtendedOperationHandler extOpHandler = theClass.newInstance();
      // Determine the initialization method to use: it must take a
      // single parameter which is the exact type of the configuration
      // object.
      theClass.getMethod("initializeExtendedOperationHandler",
                         config.definition().getServerConfigurationClass());
      Method method = theClass.getMethod("isConfigurationAcceptable",
                                         ExtendedOperationHandlerCfg.class,
                                         List.class);
      Boolean acceptable = (Boolean) method.invoke(extOpHandler, config,
                                                   unacceptableReasons);
      if (! acceptable)
      {
        return false;
      }
    }
    catch (Exception e)
    {
opendj-sdk/opends/src/server/org/opends/server/core/GroupManager.java
@@ -35,7 +35,6 @@
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.opends.server.workflowelement.localbackend.*;
import org.opends.server.admin.ClassPropertyDefinition;
import org.opends.server.admin.server.ConfigurationAddListener;
@@ -80,6 +79,7 @@
import static org.opends.server.util.StaticUtils.*;
/**
 * This class provides a mechanism for interacting with all groups defined in
 * the Directory Server.  It will handle all necessary processing at server
@@ -105,7 +105,6 @@
  // A mapping between the DNs of the config entries and the associated
  // group implementations.
  private ConcurrentHashMap<DN,Group> groupImplementations;
@@ -170,7 +169,7 @@
        String className = groupConfiguration.getGroupClass();
        try
        {
          Group group = loadGroup(className, groupConfiguration);
          Group group = loadGroup(className, groupConfiguration, true);
          groupImplementations.put(groupConfiguration.dn(), group);
        }
        catch (InitializationException ie)
@@ -200,7 +199,7 @@
      String className = configuration.getGroupClass();
      try
      {
        loadGroup(className, null);
        loadGroup(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -239,7 +238,7 @@
    String className = configuration.getGroupClass();
    try
    {
      group = loadGroup(className, configuration);
      group = loadGroup(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -323,7 +322,7 @@
      String className = configuration.getGroupClass();
      try
      {
        loadGroup(className, null);
        loadGroup(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -399,7 +398,7 @@
    Group group = null;
    try
    {
      group = loadGroup(className, configuration);
      group = loadGroup(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -431,8 +430,9 @@
   * @param  className      The fully-qualified name of the group implementation
   *                        class to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the group
   *                        implementation, or {@code null} if the group
   *                        implementation should not be initialized.
   *                        implementation.  It must not be {@code null}.
   * @param  initialize     Indicates whether the key manager provider instance
   *                        should be initialized.
   *
   * @return  The possibly initialized group implementation.
   *
@@ -440,7 +440,8 @@
   *                                   initialize the group implementation.
   */
  private Group loadGroup(String className,
                          GroupImplementationCfg configuration)
                          GroupImplementationCfg configuration,
                          boolean initialize)
          throws InitializationException
  {
    try
@@ -453,13 +454,42 @@
           propertyDefinition.loadClass(className, Group.class);
      Group group = groupClass.newInstance();
      if (configuration != null)
      if (initialize)
      {
        Method method =
             group.getClass().getMethod("initializeGroupImplementation",
                  configuration.definition().getServerConfigurationClass());
        method.invoke(group, configuration);
      }
      else
      {
        Method method = group.getClass().getMethod("isConfigurationAcceptable",
                                                   GroupImplementationCfg.class,
                                                   List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(group, configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_GROUP_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return group;
    }
opendj-sdk/opends/src/server/org/opends/server/core/IdentityMapperConfigManager.java
@@ -30,6 +30,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@@ -124,7 +125,8 @@
        String className = mapperConfiguration.getMapperClass();
        try
        {
          IdentityMapper mapper = loadMapper(className, mapperConfiguration);
          IdentityMapper mapper = loadMapper(className, mapperConfiguration,
                                             true);
          identityMappers.put(mapperConfiguration.dn(), mapper);
          DirectoryServer.registerIdentityMapper(mapperConfiguration.dn(),
                                                 mapper);
@@ -173,7 +175,7 @@
      String className = configuration.getMapperClass();
      try
      {
        loadMapper(className, null);
        loadMapper(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -212,7 +214,7 @@
    String className = configuration.getMapperClass();
    try
    {
      identityMapper = loadMapper(className, configuration);
      identityMapper = loadMapper(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -287,7 +289,7 @@
      String className = configuration.getMapperClass();
      try
      {
        loadMapper(className, null);
        loadMapper(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -356,7 +358,7 @@
    IdentityMapper identityMapper = null;
    try
    {
      identityMapper = loadMapper(className, configuration);
      identityMapper = loadMapper(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -387,8 +389,9 @@
   * @param  className      The fully-qualified name of the identity mapper
   *                        class to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the identity
   *                        mapper, or {@code null} if the identity mapper
   *                        should not be initialized.
   *                        mapper.  It must not be {@code null}.
   * @param  initialize     Indicates whether the identity mapper instance
   *                        should be initialized.
   *
   * @return  The possibly initialized identity mapper.
   *
@@ -396,7 +399,8 @@
   *                                   initialize the identity mapper.
   */
  private IdentityMapper loadMapper(String className,
                                    IdentityMapperCfg configuration)
                                    IdentityMapperCfg configuration,
                                    boolean initialize)
          throws InitializationException
  {
    try
@@ -409,13 +413,42 @@
           propertyDefinition.loadClass(className, IdentityMapper.class);
      IdentityMapper mapper = mapperClass.newInstance();
      if (configuration != null)
      if (initialize)
      {
        Method method =
             mapper.getClass().getMethod("initializeIdentityMapper",
                  configuration.definition().getServerConfigurationClass());
        method.invoke(mapper, configuration);
      }
      else
      {
        Method method = mapper.getClass().getMethod("isConfigurationAcceptable",
                                                    IdentityMapperCfg.class,
                                                    List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(mapper, configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_IDMAPPER_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return mapper;
    }
opendj-sdk/opends/src/server/org/opends/server/core/KeyManagerProviderConfigManager.java
@@ -30,6 +30,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@@ -126,7 +127,7 @@
        try
        {
          KeyManagerProvider provider =
               loadProvider(className, providerConfig);
               loadProvider(className, providerConfig, true);
          providers.put(providerConfig.dn(), provider);
          DirectoryServer.registerKeyManagerProvider(providerConfig.dn(),
                                                     provider);
@@ -157,7 +158,7 @@
      String className = configuration.getJavaImplementationClass();
      try
      {
        loadProvider(className, null);
        loadProvider(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -195,7 +196,7 @@
    String className = configuration.getJavaImplementationClass();
    try
    {
      provider = loadProvider(className, configuration);
      provider = loadProvider(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -267,7 +268,7 @@
      String className = configuration.getJavaImplementationClass();
      try
      {
        loadProvider(className, null);
        loadProvider(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -335,7 +336,7 @@
    KeyManagerProvider provider = null;
    try
    {
      provider = loadProvider(className, configuration);
      provider = loadProvider(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -365,16 +366,20 @@
   * @param  className      The fully-qualified name of the key manager
   *                        provider class to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the key
   *                        manager provider, or {@code null} if the provider
   *                        should not be initialized.
   *                        manager provider.  It must not be {@code null}.
   * @param  initialize     Indicates whether the key manager provider instance
   *                        should be initialized.
   *
   * @return  The possibly initialized key manager provider.
   *
   * @throws  InitializationException  If a problem occurred while attempting to
   *                                   initialize the key manager provider.
   * @throws  InitializationException  If the provided configuration is not
   *                                   acceptable, or if a problem occured while
   *                                   attempting to initialize the key manager
   *                                   provider using that configuration.
   */
  private KeyManagerProvider loadProvider(String className,
                                          KeyManagerCfg configuration)
                                          KeyManagerCfg configuration,
                                          boolean initialize)
          throws InitializationException
  {
    try
@@ -386,16 +391,50 @@
           propertyDefinition.loadClass(className, KeyManagerProvider.class);
      KeyManagerProvider provider = providerClass.newInstance();
      if (configuration != null)
      if (initialize)
      {
        Method method =
             provider.getClass().getMethod("initializeKeyManagerProvider",
                  configuration.definition().getServerConfigurationClass());
        method.invoke(provider, configuration);
      }
      else
      {
        Method method =
             provider.getClass().getMethod("isConfigurationAcceptable",
                                           KeyManagerCfg.class, List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(provider, configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_KEYMANAGER_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return provider;
    }
    catch (InitializationException ie)
    {
      throw ie;
    }
    catch (Exception e)
    {
      int msgID = MSGID_CONFIG_KEYMANAGER_INITIALIZATION_FAILED;
opendj-sdk/opends/src/server/org/opends/server/core/MatchingRuleConfigManager.java
@@ -30,6 +30,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@@ -138,7 +139,7 @@
        try
        {
          MatchingRule matchingRule =
               loadMatchingRule(className, mrConfiguration);
               loadMatchingRule(className, mrConfiguration, true);
          try
          {
@@ -182,7 +183,7 @@
      String className = configuration.getMatchingRuleClass();
      try
      {
        loadMatchingRule(className, null);
        loadMatchingRule(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -220,7 +221,7 @@
    String className = configuration.getMatchingRuleClass();
    try
    {
      matchingRule = loadMatchingRule(className, configuration);
      matchingRule = loadMatchingRule(className, configuration, true);
      try
      {
@@ -376,7 +377,7 @@
      String className = configuration.getMatchingRuleClass();
      try
      {
        loadMatchingRule(className, null);
        loadMatchingRule(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -518,7 +519,7 @@
    MatchingRule matchingRule = null;
    try
    {
      matchingRule = loadMatchingRule(className, configuration);
      matchingRule = loadMatchingRule(className, configuration, true);
      try
      {
@@ -560,8 +561,9 @@
   * @param  className      The fully-qualified name of the attribute syntax
   *                        class to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the attribute
   *                        syntax, or {@code null} if the attribute syntax
   *                        should not be initialized.
   *                        syntax.  It must not be {@code null}.
   * @param  initialize     Indicates whether the matching rule instance should
   *                        be initialized.
   *
   * @return  The possibly initialized attribute syntax.
   *
@@ -569,7 +571,8 @@
   *                                   initialize the attribute syntax.
   */
  private MatchingRule loadMatchingRule(String className,
                                        MatchingRuleCfg configuration)
                                        MatchingRuleCfg configuration,
                                        boolean initialize)
          throws InitializationException
  {
    try
@@ -626,13 +629,44 @@
                                 configuration.getClass().getName());
      }
      if (configuration != null)
      if (initialize)
      {
        Method method =
             matchingRule.getClass().getMethod("initializeMatchingRule",
                  configuration.definition().getServerConfigurationClass());
        method.invoke(matchingRule, configuration);
      }
      else
      {
        Method method =
             matchingRule.getClass().getMethod("isConfigurationAcceptable",
                                               MatchingRuleCfg.class,
                                               List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(matchingRule,
                                                     configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_SCHEMA_MR_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return matchingRule;
    }
opendj-sdk/opends/src/server/org/opends/server/core/PasswordGeneratorConfigManager.java
@@ -30,6 +30,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@@ -125,7 +126,8 @@
        try
        {
          PasswordGenerator<? extends PasswordGeneratorCfg>
               generator = loadGenerator(className, generatorConfiguration);
               generator = loadGenerator(className, generatorConfiguration,
                                         true);
          passwordGenerators.put(generatorConfiguration.dn(), generator);
          DirectoryServer.registerPasswordGenerator(generatorConfiguration.dn(),
              generator);
@@ -155,7 +157,7 @@
      String className = configuration.getGeneratorClass();
      try
      {
        loadGenerator(className, null);
        loadGenerator(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -225,7 +227,7 @@
         passwordGenerator = null;
    try
    {
      passwordGenerator = loadGenerator(className, configuration);
      passwordGenerator = loadGenerator(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -260,7 +262,7 @@
      String className = configuration.getGeneratorClass();
      try
      {
        loadGenerator(className, null);
        loadGenerator(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -299,7 +301,7 @@
    String className = configuration.getGeneratorClass();
    try
    {
      passwordGenerator = loadGenerator(className, configuration);
      passwordGenerator = loadGenerator(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -365,6 +367,8 @@
   * @param  configuration  The configuration to use to initialize the
   *                        password generator, or {@code null} if the
   *                        password generator should not be initialized.
   * @param  initialize     Indicates whether the password generator instance
   *                        should be initialized.
   *
   * @return  The possibly initialized password generator.
   *
@@ -373,7 +377,8 @@
   */
  private PasswordGenerator<? extends PasswordGeneratorCfg>
               loadGenerator(String className,
                             PasswordGeneratorCfg configuration)
                             PasswordGeneratorCfg configuration,
                             boolean initialize)
          throws InitializationException
  {
    try
@@ -388,13 +393,43 @@
           (PasswordGenerator<? extends PasswordGeneratorCfg>)
           generatorClass.newInstance();
      if (configuration != null)
      if (initialize)
      {
        Method method =
          generator.getClass().getMethod("initializePasswordGenerator",
                  configuration.definition().getServerConfigurationClass());
        method.invoke(generator, configuration);
      }
      else
      {
        Method method =
             generator.getClass().getMethod("isConfigurationAcceptable",
                                            PasswordGeneratorCfg.class,
                                            List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(generator, configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_PWGENERATOR_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return generator;
    }
opendj-sdk/opends/src/server/org/opends/server/core/PasswordStorageSchemeConfigManager.java
@@ -34,6 +34,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@@ -150,7 +151,7 @@
      try
      {
        // Load the class but don't initialize it.
        loadPasswordStorageScheme (className, null);
        loadPasswordStorageScheme (className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -259,7 +260,7 @@
      try
      {
        // Load the class but don't initialize it.
        loadPasswordStorageScheme (className, null);
        loadPasswordStorageScheme (className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -367,7 +368,7 @@
    // Load the password storage scheme class...
    PasswordStorageScheme
        <? extends PasswordStorageSchemeCfg> schemeClass;
    schemeClass = loadPasswordStorageScheme (className, configuration);
    schemeClass = loadPasswordStorageScheme (className, configuration, true);
    // ... and install the password storage scheme in the server.
    DN configEntryDN = configuration.dn();
@@ -383,8 +384,9 @@
   * @param  className      The fully-qualified name of the class
   *                        to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the
   *                        class, or {@code null} if the
   *                        class should not be initialized.
   *                        class.  It must not be {@code null}.
   * @param  initialize     Indicates whether the password storage scheme
   *                        instance should be initialized.
   *
   * @return  The possibly initialized password storage scheme.
   *
@@ -394,8 +396,8 @@
  private PasswordStorageScheme <? extends PasswordStorageSchemeCfg>
    loadPasswordStorageScheme(
       String className,
       PasswordStorageSchemeCfg configuration
       )
       PasswordStorageSchemeCfg configuration,
       boolean initialize)
       throws InitializationException
  {
    try
@@ -416,7 +418,7 @@
        (PasswordStorageScheme<? extends PasswordStorageSchemeCfg>)
            schemeClass.newInstance();
      if (configuration != null)
      if (initialize)
      {
        Method method = passwordStorageScheme.getClass().getMethod(
            "initializePasswordStorageScheme",
@@ -424,6 +426,36 @@
            );
        method.invoke(passwordStorageScheme, configuration);
      }
      else
      {
        Method method = passwordStorageScheme.getClass().getMethod(
                             "isConfigurationAcceptable",
                             PasswordStorageSchemeCfg.class, List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(passwordStorageScheme,
                                                     configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_PWSCHEME_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return passwordStorageScheme;
    }
opendj-sdk/opends/src/server/org/opends/server/core/PasswordValidatorConfigManager.java
@@ -30,6 +30,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@@ -127,7 +128,8 @@
        try
        {
          PasswordValidator<? extends PasswordValidatorCfg>
               validator = loadValidator(className, validatorConfiguration);
               validator = loadValidator(className, validatorConfiguration,
                                         true);
          passwordValidators.put(validatorConfiguration.dn(), validator);
          DirectoryServer.registerPasswordValidator(validatorConfiguration.dn(),
                                                    validator);
@@ -159,7 +161,7 @@
      String className = configuration.getValidatorClass();
      try
      {
        loadValidator(className, null);
        loadValidator(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -199,7 +201,7 @@
    String className = configuration.getValidatorClass();
    try
    {
      passwordValidator = loadValidator(className, configuration);
      passwordValidator = loadValidator(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -275,7 +277,7 @@
      String className = configuration.getValidatorClass();
      try
      {
        loadValidator(className, null);
        loadValidator(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -346,7 +348,7 @@
         passwordValidator = null;
    try
    {
      passwordValidator = loadValidator(className, configuration);
      passwordValidator = loadValidator(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -377,8 +379,9 @@
   * @param  className      The fully-qualified name of the password validator
   *                        class to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the
   *                        password validator, or {@code null} if the
   *                        password validator should not be initialized.
   *                        password validator.  It must not be {@code null}.
   * @param  initialize     Indicates whether the password validator instance
   *                        should be initialized.
   *
   * @return  The possibly initialized password validator.
   *
@@ -387,7 +390,8 @@
   */
  private PasswordValidator<? extends PasswordValidatorCfg>
               loadValidator(String className,
                             PasswordValidatorCfg configuration)
                             PasswordValidatorCfg configuration,
                             boolean initialize)
          throws InitializationException
  {
    try
@@ -402,13 +406,43 @@
           (PasswordValidator<? extends PasswordValidatorCfg>)
           validatorClass.newInstance();
      if (configuration != null)
      if (initialize)
      {
        Method method =
             validator.getClass().getMethod("initializePasswordValidator",
                  configuration.definition().getServerConfigurationClass());
        method.invoke(validator, configuration);
      }
      else
      {
        Method method =
             validator.getClass().getMethod("isConfigurationAcceptable",
                                            PasswordValidatorCfg.class,
                                            List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(validator, configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_PWVALIDATOR_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return validator;
    }
opendj-sdk/opends/src/server/org/opends/server/core/PluginConfigManager.java
@@ -324,7 +324,7 @@
      {
        DirectoryServerPlugin<? extends PluginCfg> plugin =
             loadPlugin(pluginConfiguration.getPluginClass(), initTypes,
                        pluginConfiguration);
                        pluginConfiguration, true);
        registerPlugin(plugin, pluginConfiguration.dn(), initTypes);
      }
      catch (InitializationException ie)
@@ -351,8 +351,9 @@
   *                        which the server is running in a special mode that
   *                        only uses a minimal set of plugins (e.g., LDIF
   *                        import or export).
   * @param  configuration  The configuration to use to initialize the plugin,
   *                        or {@code null} if the plugin should not be
   * @param  configuration  The configuration to use to initialize the plugin.
   *                        It must not be {@code null}.
   * @param  initialize     Indicates whether the plugin instance should be
   *                        initialized.
   *
   * @return  The possibly initialized plugin.
@@ -362,7 +363,7 @@
   */
  private DirectoryServerPlugin<? extends PluginCfg>
               loadPlugin(String className, Set<PluginType> pluginTypes,
                          PluginCfg configuration)
                          PluginCfg configuration, boolean initialize)
          throws InitializationException
  {
    try
@@ -377,7 +378,7 @@
           (DirectoryServerPlugin<? extends PluginCfg>)
           pluginClass.newInstance();
      if (configuration != null)
      if (initialize)
      {
        Method method = plugin.getClass().getMethod("initializeInternal",
                                                    DN.class, Set.class);
@@ -387,6 +388,35 @@
                      configuration.definition().getServerConfigurationClass());
        method.invoke(plugin, pluginTypes, configuration);
      }
      else
      {
        Method method = plugin.getClass().getMethod("isConfigurationAcceptable",
                                                    PluginCfg.class,
                                                    List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(plugin, configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_PLUGIN_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return plugin;
    }
@@ -4936,7 +4966,7 @@
      String className = configuration.getPluginClass();
      try
      {
        loadPlugin(className, pluginTypes, null);
        loadPlugin(className, pluginTypes, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -4982,7 +5012,7 @@
    String className = configuration.getPluginClass();
    try
    {
      plugin = loadPlugin(className, pluginTypes, configuration);
      plugin = loadPlugin(className, pluginTypes, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -5056,7 +5086,7 @@
      String className = configuration.getPluginClass();
      try
      {
        loadPlugin(className, pluginTypes, null);
        loadPlugin(className, pluginTypes, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -5127,7 +5157,7 @@
    DirectoryServerPlugin<? extends PluginCfg> plugin = null;
    try
    {
      plugin = loadPlugin(className, pluginTypes, configuration);
      plugin = loadPlugin(className, pluginTypes, configuration, true);
    }
    catch (InitializationException ie)
    {
opendj-sdk/opends/src/server/org/opends/server/core/SASLConfigManager.java
@@ -30,6 +30,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@@ -129,7 +130,8 @@
        try
        {
          SASLMechanismHandler handler = loadHandler(className,
                                                     handlerConfiguration);
                                                     handlerConfiguration,
                                                     true);
          handlers.put(handlerConfiguration.dn(), handler);
        }
        catch (InitializationException ie)
@@ -159,7 +161,7 @@
      String className = configuration.getHandlerClass();
      try
      {
        loadHandler(className, null);
        loadHandler(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -198,7 +200,7 @@
    String className = configuration.getHandlerClass();
    try
    {
      handler = loadHandler(className, configuration);
      handler = loadHandler(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -269,7 +271,7 @@
      String className = configuration.getHandlerClass();
      try
      {
        loadHandler(className, null);
        loadHandler(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -335,7 +337,7 @@
    SASLMechanismHandler handler = null;
    try
    {
      handler = loadHandler(className, configuration);
      handler = loadHandler(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -363,9 +365,10 @@
   *
   * @param  className      The fully-qualified name of the SASL mechanism
   *                        handler class to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the handler,
   *                        or {@code null} if the SASL mechanism handler should
   *                        not be initialized.
   * @param  configuration  The configuration to use to initialize the handler.
   *                        It must not be {@code null}.
   * @param  initialize     Indicates whether the SASL mechanism handler
   *                        instance should be initialized.
   *
   * @return  The possibly initialized SASL mechanism handler.
   *
@@ -374,7 +377,8 @@
   */
  private SASLMechanismHandler loadHandler(String className,
                                           SASLMechanismHandlerCfg
                                                configuration)
                                                configuration,
                                           boolean initialize)
          throws InitializationException
  {
    try
@@ -387,13 +391,43 @@
           propertyDefinition.loadClass(className, SASLMechanismHandler.class);
      SASLMechanismHandler handler = handlerClass.newInstance();
      if (configuration != null)
      if (initialize)
      {
        Method method =
             handler.getClass().getMethod("initializeSASLMechanismHandler",
                  configuration.definition().getServerConfigurationClass());
        method.invoke(handler, configuration);
      }
      else
      {
        Method method =
             handler.getClass().getMethod("isConfigurationAcceptable",
                                          SASLMechanismHandlerCfg.class,
                                          List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(handler, configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_SASL_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return handler;
    }
opendj-sdk/opends/src/server/org/opends/server/core/SynchronizationProviderConfigManager.java
@@ -34,6 +34,7 @@
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@@ -440,11 +441,12 @@
      d.getJavaImplementationClassPropertyDefinition();
    // Load the class and cast it to a synchronizationProvider.
    SynchronizationProvider provider = null;
    Class<? extends SynchronizationProvider> theClass;
    try
    {
       theClass = pd.loadClass(className, SynchronizationProvider.class);
       theClass.newInstance();
       provider = theClass.newInstance();
    } catch (Exception e)
    {
       // Handle the exception: put a message in the unacceptable reasons.
@@ -461,8 +463,16 @@
      // Determine the initialization method to use: it must take a
      // single parameter which is the exact type of the configuration
      // object.
      theClass.getMethod("initializeSynchronizationProvider",
                     configuration.definition().getServerConfigurationClass());
      Method method = theClass.getMethod("isConfigurationAcceptable",
                                         SynchronizationProviderCfg.class,
                                         List.class);
      Boolean acceptable = (Boolean) method.invoke(provider, configuration,
                                                   unacceptableReasons);
      if (! acceptable)
      {
        return false;
      }
    } catch (Exception e)
    {
      // Handle the exception: put a message in the unacceptable reasons.
opendj-sdk/opends/src/server/org/opends/server/core/TrustManagerProviderConfigManager.java
@@ -30,6 +30,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
@@ -127,7 +128,7 @@
        try
        {
          TrustManagerProvider provider =
               loadProvider(className, providerConfig);
               loadProvider(className, providerConfig, true);
          providers.put(providerConfig.dn(), provider);
          DirectoryServer.registerTrustManagerProvider(providerConfig.dn(),
                                                       provider);
@@ -158,7 +159,7 @@
      String className = configuration.getJavaImplementationClass();
      try
      {
        loadProvider(className, null);
        loadProvider(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -196,7 +197,7 @@
    String className = configuration.getJavaImplementationClass();
    try
    {
      provider = loadProvider(className, configuration);
      provider = loadProvider(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -269,7 +270,7 @@
      String className = configuration.getJavaImplementationClass();
      try
      {
        loadProvider(className, null);
        loadProvider(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -337,7 +338,7 @@
    TrustManagerProvider provider = null;
    try
    {
      provider = loadProvider(className, configuration);
      provider = loadProvider(className, configuration, true);
    }
    catch (InitializationException ie)
    {
@@ -368,8 +369,9 @@
   * @param  className      The fully-qualified name of the trust manager
   *                        provider class to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the trust
   *                        manager provider, or {@code null} if the provider
   *                        should not be initialized.
   *                        manager provider.  It must not be {@code null}.
   * @param  initialize     Indicates whether the trust manager provider
   *                        instance should be initialized.
   *
   * @return  The possibly initialized trust manager provider.
   *
@@ -377,7 +379,8 @@
   *                                   initialize the trust manager provider.
   */
  private TrustManagerProvider loadProvider(String className,
                                            TrustManagerCfg configuration)
                                            TrustManagerCfg configuration,
                                            boolean initialize)
          throws InitializationException
  {
    try
@@ -389,13 +392,42 @@
           propertyDefinition.loadClass(className, TrustManagerProvider.class);
      TrustManagerProvider provider = providerClass.newInstance();
      if (configuration != null)
      if (initialize)
      {
        Method method =
             provider.getClass().getMethod("initializeTrustManagerProvider",
                  configuration.definition().getServerConfigurationClass());
        method.invoke(provider, configuration);
      }
      else
      {
        Method method =
             provider.getClass().getMethod("isConfigurationAcceptable",
                                           TrustManagerCfg.class, List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(provider, configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_TRUSTMANAGER_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return provider;
    }
opendj-sdk/opends/src/server/org/opends/server/core/VirtualAttributeConfigManager.java
@@ -30,6 +30,7 @@
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.LinkedHashSet;
import java.util.concurrent.ConcurrentHashMap;
@@ -140,7 +141,7 @@
        try
        {
          VirtualAttributeProvider<? extends VirtualAttributeCfg> provider =
               loadProvider(className, cfg);
               loadProvider(className, cfg, true);
          LinkedHashSet<SearchFilter> filters =
               new LinkedHashSet<SearchFilter>();
@@ -220,7 +221,7 @@
      String className = configuration.getProviderClass();
      try
      {
        loadProvider(className, null);
        loadProvider(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -313,7 +314,7 @@
      String className = configuration.getProviderClass();
      try
      {
        provider = loadProvider(className, configuration);
        provider = loadProvider(className, configuration, true);
      }
      catch (InitializationException ie)
      {
@@ -389,7 +390,7 @@
      String className = configuration.getProviderClass();
      try
      {
        loadProvider(className, null);
        loadProvider(className, configuration, false);
      }
      catch (InitializationException ie)
      {
@@ -494,7 +495,7 @@
      String className = configuration.getProviderClass();
      try
      {
        provider = loadProvider(className, configuration);
        provider = loadProvider(className, configuration, true);
      }
      catch (InitializationException ie)
      {
@@ -536,8 +537,10 @@
   * @param  className      The fully-qualified name of the certificate mapper
   *                        class to load, instantiate, and initialize.
   * @param  configuration  The configuration to use to initialize the
   *                        certificate mapper, or {@code null} if the
   *                        certificate mapper should not be initialized.
   *                        virtual attribute provider.  It must not be
   *                        {@code null}.
   * @param  initialize     Indicates whether the virtual attribute provider
   *                        instance should be initialized.
   *
   * @return  The possibly initialized certificate mapper.
   *
@@ -545,7 +548,8 @@
   *                                   initialize the certificate mapper.
   */
  private VirtualAttributeProvider<? extends VirtualAttributeCfg>
               loadProvider(String className, VirtualAttributeCfg configuration)
               loadProvider(String className, VirtualAttributeCfg configuration,
                            boolean initialize)
          throws InitializationException
  {
    try
@@ -561,13 +565,43 @@
           (VirtualAttributeProvider<? extends VirtualAttributeCfg>)
           providerClass.newInstance();
      if (configuration != null)
      if (initialize)
      {
        Method method =
             provider.getClass().getMethod("initializeVirtualAttributeProvider",
                  configuration.definition().getServerConfigurationClass());
        method.invoke(provider, configuration);
      }
      else
      {
        Method method =
             provider.getClass().getMethod("isConfigurationAcceptable",
                                           VirtualAttributeCfg.class,
                                           List.class);
        List<String> unacceptableReasons = new ArrayList<String>();
        Boolean acceptable = (Boolean) method.invoke(provider, configuration,
                                                     unacceptableReasons);
        if (! acceptable)
        {
          StringBuilder buffer = new StringBuilder();
          if (! unacceptableReasons.isEmpty())
          {
            Iterator<String> iterator = unacceptableReasons.iterator();
            buffer.append(iterator.next());
            while (iterator.hasNext())
            {
              buffer.append(".  ");
              buffer.append(iterator.next());
            }
          }
          int    msgID   = MSGID_CONFIG_VATTR_CONFIG_NOT_ACCEPTABLE;
          String message = getMessage(msgID, String.valueOf(configuration.dn()),
                                      buffer.toString());
          throw new InitializationException(msgID, message);
        }
      }
      return provider;
    }
opendj-sdk/opends/src/server/org/opends/server/extensions/AttributeValuePasswordValidator.java
@@ -34,6 +34,7 @@
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.AttributeValuePasswordValidatorCfg;
import org.opends.server.admin.std.server.PasswordValidatorCfg;
import org.opends.server.api.PasswordValidator;
import org.opends.server.types.Attribute;
import org.opends.server.types.AttributeType;
@@ -161,6 +162,20 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(PasswordValidatorCfg configuration,
                                           List<String> unacceptableReasons)
  {
    AttributeValuePasswordValidatorCfg config =
         (AttributeValuePasswordValidatorCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      AttributeValuePasswordValidatorCfg configuration,
                      List<String> unacceptableReasons)
opendj-sdk/opends/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandler.java
@@ -39,6 +39,7 @@
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.CramMD5SASLMechanismHandlerCfg;
import org.opends.server.admin.std.server.SASLMechanismHandlerCfg;
import org.opends.server.api.ClientConnection;
import org.opends.server.api.IdentityMapper;
import org.opends.server.api.SASLMechanismHandler;
@@ -617,11 +618,27 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(
                      SASLMechanismHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    CramMD5SASLMechanismHandlerCfg config =
         (CramMD5SASLMechanismHandlerCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      CramMD5SASLMechanismHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    boolean configAcceptable = true;
    DN configEntryDN = configuration.dn();
    // Get the identity mapper that should be used to find users.
    DN identityMapperDN = configuration.getIdentityMapperDN();
opendj-sdk/opends/src/server/org/opends/server/extensions/CharacterSetPasswordValidator.java
@@ -36,6 +36,7 @@
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.CharacterSetPasswordValidatorCfg;
import org.opends.server.admin.std.server.PasswordValidatorCfg;
import org.opends.server.api.PasswordValidator;
import org.opends.server.config.ConfigException;
import org.opends.server.types.ConfigChangeResult;
@@ -258,6 +259,20 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(PasswordValidatorCfg configuration,
                                           List<String> unacceptableReasons)
  {
    CharacterSetPasswordValidatorCfg config =
         (CharacterSetPasswordValidatorCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      CharacterSetPasswordValidatorCfg configuration,
                      List<String> unacceptableReasons)
opendj-sdk/opends/src/server/org/opends/server/extensions/DictionaryPasswordValidator.java
@@ -38,6 +38,7 @@
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.DictionaryPasswordValidatorCfg;
import org.opends.server.admin.std.server.PasswordValidatorCfg;
import org.opends.server.api.PasswordValidator;
import org.opends.server.config.ConfigException;
import org.opends.server.types.ConfigChangeResult;
@@ -241,6 +242,20 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(PasswordValidatorCfg configuration,
                                           List<String> unacceptableReasons)
  {
    DictionaryPasswordValidatorCfg config =
         (DictionaryPasswordValidatorCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      DictionaryPasswordValidatorCfg configuration,
                      List<String> unacceptableReasons)
opendj-sdk/opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java
@@ -42,6 +42,7 @@
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.DigestMD5SASLMechanismHandlerCfg;
import org.opends.server.admin.std.server.SASLMechanismHandlerCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.ClientConnection;
import org.opends.server.api.IdentityMapper;
@@ -1593,11 +1594,27 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(
                      SASLMechanismHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    DigestMD5SASLMechanismHandlerCfg config =
         (DigestMD5SASLMechanismHandlerCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      DigestMD5SASLMechanismHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    boolean configAcceptable = true;
    DN configEntryDN = configuration.dn();
    // Get the identity mapper that should be used to find users.
    DN identityMapperDN = configuration.getIdentityMapperDN();
opendj-sdk/opends/src/server/org/opends/server/extensions/ErrorLogAccountStatusNotificationHandler.java
@@ -31,22 +31,19 @@
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.loggers.ErrorLogger.logError;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.getMessage;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.meta.
       ErrorLogAccountStatusNotificationHandlerCfgDefn;
import org.opends.server.admin.std.server.AccountStatusNotificationHandlerCfg;
import org.opends.server.admin.std.server.
       ErrorLogAccountStatusNotificationHandlerCfg;
import org.opends.server.api.AccountStatusNotificationHandler;
import org.opends.server.config.ConfigAttribute;
import org.opends.server.config.ConfigException;
import org.opends.server.config.MultiChoiceConfigAttribute;
import org.opends.server.types.AccountStatusNotificationType;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DN;
@@ -132,43 +129,16 @@
  /**
   * Retrieves the DN of the configuration entry with which this component is
   * associated.
   *
   * @return  The DN of the configuration entry with which this component is
   *          associated.
   * {@inheritDoc}
   */
  public DN getConfigurableComponentEntryDN()
  @Override()
  public boolean isConfigurationAcceptable(
                      AccountStatusNotificationHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    return configEntryDN;
  }
  /**
   * Retrieves the set of configuration attributes that are associated with this
   * configurable component.
   *
   * @return  The set of configuration attributes that are associated with this
   *          configurable component.
   */
  public List<ConfigAttribute> getConfigurationAttributes()
  {
    LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
    LinkedList<String> typeNames = new LinkedList<String>();
    for (AccountStatusNotificationType t : notificationTypes)
    {
      typeNames.add(t.getNotificationTypeName());
    }
    int msgID = MSGID_ERRORLOG_ACCTNOTHANDLER_DESCRIPTION_NOTIFICATION_TYPES;
    attrList.add(new MultiChoiceConfigAttribute(ATTR_ACCT_NOTIFICATION_TYPE,
                                                getMessage(msgID), true, true,
                                                false, NOTIFICATION_TYPE_NAMES,
                                                typeNames));
    return attrList;
    ErrorLogAccountStatusNotificationHandlerCfg config =
         (ErrorLogAccountStatusNotificationHandlerCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
opendj-sdk/opends/src/server/org/opends/server/extensions/ExactMatchIdentityMapper.java
@@ -38,6 +38,7 @@
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.ExactMatchIdentityMapperCfg;
import org.opends.server.admin.std.server.IdentityMapperCfg;
import org.opends.server.api.IdentityMapper;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
@@ -297,6 +298,20 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(IdentityMapperCfg configuration,
                                           List<String> unacceptableReasons)
  {
    ExactMatchIdentityMapperCfg config =
         (ExactMatchIdentityMapperCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      ExactMatchIdentityMapperCfg configuration,
                      List<String> unacceptableReasons)
opendj-sdk/opends/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java
@@ -33,6 +33,7 @@
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.ExternalSASLMechanismHandlerCfg;
import org.opends.server.admin.std.server.SASLMechanismHandlerCfg;
import org.opends.server.api.CertificateMapper;
import org.opends.server.api.ClientConnection;
import org.opends.server.api.ConnectionSecurityProvider;
@@ -466,11 +467,27 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(
                      SASLMechanismHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    ExternalSASLMechanismHandlerCfg config =
         (ExternalSASLMechanismHandlerCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      ExternalSASLMechanismHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    boolean configAcceptable = true;
    DN configEntryDN = configuration.dn();
    // Get the attribute type to use for validating the certificates.  If none
    // is provided, then default to the userCertificate type.
opendj-sdk/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
@@ -40,18 +40,21 @@
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.EntryCacheCfg;
import org.opends.server.admin.std.server.FIFOEntryCacheCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.EntryCache;
import org.opends.server.admin.std.server.FIFOEntryCacheCfg;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.config.ConfigAttribute;
import org.opends.server.config.ConfigException;
import org.opends.server.config.IntegerConfigAttribute;
import org.opends.server.config.IntegerWithUnitConfigAttribute;
import org.opends.server.config.StringConfigAttribute;
import org.opends.server.core.DirectoryServer;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.CacheEntry;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
import org.opends.server.types.InitializationException;
@@ -62,8 +65,6 @@
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -1283,6 +1284,19 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(EntryCacheCfg configuration,
                                           List<String> unacceptableReasons)
  {
    FIFOEntryCacheCfg config = (FIFOEntryCacheCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
      FIFOEntryCacheCfg configuration,
      List<String>      unacceptableReasons
@@ -1435,6 +1449,8 @@
    HashSet<SearchFilter> newIncludeFilters = null;
    HashSet<SearchFilter> newExcludeFilters = null;
    DN configEntryDN = configuration.dn();
    // Read configuration.
    newConfigEntryDN = configuration.dn();
    newLockTimeout   = configuration.getLockTimeout();
opendj-sdk/opends/src/server/org/opends/server/extensions/FileBasedKeyManagerProvider.java
@@ -42,6 +42,7 @@
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.FileBasedKeyManagerCfg;
import org.opends.server.admin.std.server.KeyManagerCfg;
import org.opends.server.api.KeyManagerProvider;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
@@ -321,11 +322,25 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(KeyManagerCfg configuration,
                                           List<String> unacceptableReasons)
  {
    FileBasedKeyManagerCfg config = (FileBasedKeyManagerCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      FileBasedKeyManagerCfg configuration,
                      List<String> unacceptableReasons)
  {
    boolean configAcceptable = true;
    DN configEntryDN = configuration.dn();
    // Get the path to the key store file.
opendj-sdk/opends/src/server/org/opends/server/extensions/FileBasedTrustManagerProvider.java
@@ -41,6 +41,7 @@
import javax.net.ssl.X509TrustManager;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.TrustManagerCfg;
import org.opends.server.admin.std.server.FileBasedTrustManagerCfg;
import org.opends.server.api.TrustManagerProvider;
import org.opends.server.config.ConfigException;
@@ -352,6 +353,21 @@
    }
  }
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(TrustManagerCfg configuration,
                                           List<String> unacceptableReasons)
  {
    FileBasedTrustManagerCfg config = (FileBasedTrustManagerCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
@@ -360,6 +376,36 @@
                      List<String> unacceptableReasons)
  {
    boolean configAcceptable = true;
    DN configEntryDN = configuration.dn();
    // Get the path to the trust store file.
    String newTrustStoreFile = configuration.getTrustStoreFile();
    try
    {
      File f = getFileForPath(newTrustStoreFile);
      if (!(f.exists() && f.isFile()))
      {
        int msgID = MSGID_FILE_TRUSTMANAGER_NO_SUCH_FILE;
        unacceptableReasons.add(getMessage(msgID,
                                           String.valueOf(newTrustStoreFile),
                                           String.valueOf(configEntryDN)));
        configAcceptable = false;
      }
    }
    catch (Exception e)
    {
      if (debugEnabled())
      {
        TRACER.debugCaught(DebugLogLevel.ERROR, e);
      }
      int msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_FILE;
      unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
                                         getExceptionMessage(e)));
      configAcceptable = false;
    }
    // Check to see if the trust store type is acceptable.
    String storeType = configuration.getTrustStoreType();
opendj-sdk/opends/src/server/org/opends/server/extensions/FileSystemEntryCache.java
@@ -55,6 +55,7 @@
import com.sleepycat.je.StatsConfig;
import org.opends.server.api.Backend;
import org.opends.server.api.EntryCache;
import org.opends.server.admin.std.server.EntryCacheCfg;
import org.opends.server.admin.std.server.FileSystemEntryCacheCfg;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.config.ConfigException;
@@ -1347,6 +1348,17 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(EntryCacheCfg configuration,
                                           List<String> unacceptableReasons)
  {
    FileSystemEntryCacheCfg config = (FileSystemEntryCacheCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
      FileSystemEntryCacheCfg configuration,
      List<String>      unacceptableReasons
@@ -1515,6 +1527,8 @@
    String                newCacheType = DEFAULT_FSCACHE_TYPE;
    String                newCacheHome = DEFAULT_FSCACHE_HOME;
    DN configEntryDN = configuration.dn();
    // Read configuration.
    newConfigEntryDN = configuration.dn();
    newLockTimeout   = configuration.getLockTimeout();
opendj-sdk/opends/src/server/org/opends/server/extensions/FingerprintCertificateMapper.java
@@ -37,16 +37,19 @@
import java.util.List;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.CertificateMapperCfg;
import org.opends.server.admin.std.server.FingerprintCertificateMapperCfg;
import org.opends.server.api.CertificateMapper;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.protocols.internal.InternalClientConnection;
import org.opends.server.protocols.internal.InternalSearchOperation;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeValue;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
import org.opends.server.types.InitializationException;
@@ -56,8 +59,6 @@
import org.opends.server.types.SearchScope;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -278,11 +279,26 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(CertificateMapperCfg configuration,
                                           List<String> unacceptableReasons)
  {
    FingerprintCertificateMapperCfg config =
         (FingerprintCertificateMapperCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      FingerprintCertificateMapperCfg configuration,
                      List<String> unacceptableReasons)
  {
    boolean configAcceptable = true;
    DN configEntryDN = configuration.dn();
    // Make sure that the fingerprint attribute is defined in the server schema.
    String attrName = configuration.getFingerprintAttribute();
opendj-sdk/opends/src/server/org/opends/server/extensions/GSSAPISASLMechanismHandler.java
@@ -37,6 +37,7 @@
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.GSSAPISASLMechanismHandlerCfg;
import org.opends.server.admin.std.server.SASLMechanismHandlerCfg;
import org.opends.server.api.ClientConnection;
import org.opends.server.api.IdentityMapper;
import org.opends.server.api.SASLMechanismHandler;
@@ -376,11 +377,27 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(
                      SASLMechanismHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    GSSAPISASLMechanismHandlerCfg config =
         (GSSAPISASLMechanismHandlerCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      GSSAPISASLMechanismHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    boolean configAcceptable = true;
    DN configEntryDN = configuration.dn();
    // Get the identity mapper that should be used to find users.
    DN identityMapperDN = configuration.getIdentityMapperDN();
opendj-sdk/opends/src/server/org/opends/server/extensions/LengthBasedPasswordValidator.java
@@ -33,6 +33,7 @@
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.LengthBasedPasswordValidatorCfg;
import org.opends.server.admin.std.server.PasswordValidatorCfg;
import org.opends.server.api.PasswordValidator;
import org.opends.server.config.ConfigException;
import org.opends.server.types.ByteString;
@@ -147,6 +148,20 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(PasswordValidatorCfg configuration,
                                           List<String> unacceptableReasons)
  {
    LengthBasedPasswordValidatorCfg config =
         (LengthBasedPasswordValidatorCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      LengthBasedPasswordValidatorCfg configuration,
                      List<String> unacceptableReasons)
opendj-sdk/opends/src/server/org/opends/server/extensions/PKCS11KeyManagerProvider.java
@@ -39,6 +39,7 @@
import javax.net.ssl.KeyManagerFactory;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.KeyManagerCfg;
import org.opends.server.admin.std.server.PKCS11KeyManagerCfg;
import org.opends.server.api.KeyManagerProvider;
import org.opends.server.config.ConfigException;
@@ -275,11 +276,25 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(KeyManagerCfg configuration,
                                           List<String> unacceptableReasons)
  {
    PKCS11KeyManagerCfg config = (PKCS11KeyManagerCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      PKCS11KeyManagerCfg configuration,
                      List<String> unacceptableReasons)
  {
    boolean configAcceptable = true;
    DN configEntryDN = configuration.dn();
    // Get the PIN needed to access the contents of the keystore file.
opendj-sdk/opends/src/server/org/opends/server/extensions/PasswordModifyExtendedOperation.java
@@ -35,6 +35,10 @@
import java.util.HashSet;
import java.util.concurrent.locks.Lock;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.ExtendedOperationHandlerCfg;
import org.opends.server.admin.std.server.
            PasswordModifyExtendedOperationHandlerCfg;
import org.opends.server.api.ClientConnection;
import org.opends.server.api.ExtendedOperationHandler;
import org.opends.server.api.IdentityMapper;
@@ -47,6 +51,7 @@
import org.opends.server.core.ExtendedOperation;
import org.opends.server.core.ModifyOperation;
import org.opends.server.core.PasswordPolicyState;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.protocols.asn1.ASN1Element;
import org.opends.server.protocols.asn1.ASN1Exception;
import org.opends.server.protocols.asn1.ASN1OctetString;
@@ -61,6 +66,7 @@
import org.opends.server.types.ByteString;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.Control;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
@@ -76,15 +82,10 @@
import static org.opends.server.extensions.ExtensionsConstants.*;
import static org.opends.server.loggers.ErrorLogger.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
import org.opends.server.admin.std.server.
     PasswordModifyExtendedOperationHandlerCfg;
import org.opends.server.admin.server.ConfigurationChangeListener;
/**
@@ -105,7 +106,6 @@
  // The current configuration state.
  private PasswordModifyExtendedOperationHandlerCfg currentConfig;
@@ -1305,6 +1305,21 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(ExtendedOperationHandlerCfg
                                                configuration,
                                           List<String> unacceptableReasons)
  {
    PasswordModifyExtendedOperationHandlerCfg config =
         (PasswordModifyExtendedOperationHandlerCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * Indicates whether the provided configuration entry has an acceptable
   * configuration for this component.  If it does not, then detailed
   * information about the problem(s) should be added to the provided list.
opendj-sdk/opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java
@@ -34,6 +34,7 @@
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.PlainSASLMechanismHandlerCfg;
import org.opends.server.admin.std.server.SASLMechanismHandlerCfg;
import org.opends.server.api.IdentityMapper;
import org.opends.server.api.SASLMechanismHandler;
import org.opends.server.config.ConfigException;
@@ -596,11 +597,27 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(
                      SASLMechanismHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    PlainSASLMechanismHandlerCfg config =
         (PlainSASLMechanismHandlerCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      PlainSASLMechanismHandlerCfg configuration,
                      List<String> unacceptableReasons)
  {
    boolean configAcceptable = true;
    DN configEntryDN = configuration.dn();
    // Get the identity mapper that should be used to find users.
    DN identityMapperDN = configuration.getIdentityMapperDN();
opendj-sdk/opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java
@@ -37,6 +37,7 @@
import java.util.concurrent.locks.ReentrantLock;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.PasswordGeneratorCfg;
import org.opends.server.admin.std.server.RandomPasswordGeneratorCfg;
import org.opends.server.api.PasswordGenerator;
import org.opends.server.config.ConfigAttribute;
@@ -353,12 +354,28 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(PasswordGeneratorCfg configuration,
                                           List<String> unacceptableReasons)
  {
    RandomPasswordGeneratorCfg config =
         (RandomPasswordGeneratorCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
      RandomPasswordGeneratorCfg configuration,
      List<String> unacceptableReasons)
  {
    int msgID;
    DN configEntryDN = configuration.dn();
    // Get the character sets for use in generating the password. At
    // least one
    // must have been provided.
opendj-sdk/opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java
@@ -38,17 +38,20 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.Lock;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.EntryCacheCfg;
import org.opends.server.admin.std.server.SoftReferenceEntryCacheCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.EntryCache;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.SoftReferenceEntryCacheCfg;
import org.opends.server.config.ConfigAttribute;
import org.opends.server.config.ConfigException;
import org.opends.server.config.IntegerWithUnitConfigAttribute;
import org.opends.server.config.StringConfigAttribute;
import org.opends.server.core.DirectoryServer;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.CacheEntry;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
import org.opends.server.types.InitializationException;
@@ -59,8 +62,6 @@
import static org.opends.server.config.ConfigConstants.*;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.ServerConstants.*;
@@ -857,6 +858,20 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(EntryCacheCfg configuration,
                                           List<String> unacceptableReasons)
  {
    SoftReferenceEntryCacheCfg config =
         (SoftReferenceEntryCacheCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
      SoftReferenceEntryCacheCfg configuration,
      List<String>               unacceptableReasons)
@@ -927,6 +942,8 @@
    HashSet<SearchFilter> newIncludeFilters = null;
    HashSet<SearchFilter> newExcludeFilters = null;
    DN configEntryDN = configuration.dn();
    // Read configuration.
    newConfigEntryDN = configuration.dn();
    newLockTimeout   = configuration.getLockTimeout();
opendj-sdk/opends/src/server/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java
@@ -38,16 +38,19 @@
import java.util.List;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.CertificateMapperCfg;
import org.opends.server.admin.std.server.
            SubjectAttributeToUserAttributeCertificateMapperCfg;
import org.opends.server.api.CertificateMapper;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.protocols.internal.InternalClientConnection;
import org.opends.server.protocols.internal.InternalSearchOperation;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.AttributeType;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
import org.opends.server.types.InitializationException;
@@ -58,8 +61,6 @@
import org.opends.server.types.SearchScope;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -92,8 +93,7 @@
  private LinkedHashMap<String,AttributeType> attributeMap;
  // The current configuration for this certificate mapper.
  private SubjectAttributeToUserAttributeCertificateMapperCfg
               currentConfig;
  private SubjectAttributeToUserAttributeCertificateMapperCfg currentConfig;
@@ -327,12 +327,27 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(CertificateMapperCfg configuration,
                                           List<String> unacceptableReasons)
  {
    SubjectAttributeToUserAttributeCertificateMapperCfg config =
         (SubjectAttributeToUserAttributeCertificateMapperCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
              SubjectAttributeToUserAttributeCertificateMapperCfg
                   configuration,
              List<String> unacceptableReasons)
  {
    boolean configAcceptable = true;
    DN configEntryDN = configuration.dn();
    // Get and validate the subject attribute to user attribute mappings.
    LinkedHashMap<String,AttributeType> newAttributeMap =
opendj-sdk/opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java
@@ -36,17 +36,20 @@
import java.util.List;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.CertificateMapperCfg;
import org.opends.server.admin.std.server.
            SubjectDNToUserAttributeCertificateMapperCfg;
import org.opends.server.api.CertificateMapper;
import org.opends.server.config.ConfigException;
import org.opends.server.core.DirectoryServer;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.protocols.internal.InternalClientConnection;
import org.opends.server.protocols.internal.InternalSearchOperation;
import org.opends.server.types.DirectoryException;
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeValue;
import org.opends.server.types.ConfigChangeResult;
import org.opends.server.types.DebugLogLevel;
import org.opends.server.types.DN;
import org.opends.server.types.Entry;
import org.opends.server.types.InitializationException;
@@ -56,8 +59,6 @@
import org.opends.server.types.SearchScope;
import static org.opends.server.loggers.debug.DebugLogger.*;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.DebugLogLevel;
import static org.opends.server.messages.ExtensionsMessages.*;
import static org.opends.server.messages.MessageHandler.*;
import static org.opends.server.util.StaticUtils.*;
@@ -241,12 +242,27 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(CertificateMapperCfg configuration,
                                           List<String> unacceptableReasons)
  {
    SubjectDNToUserAttributeCertificateMapperCfg config =
         (SubjectDNToUserAttributeCertificateMapperCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      SubjectDNToUserAttributeCertificateMapperCfg
                           configuration,
                      List<String> unacceptableReasons)
  {
    boolean configAcceptable = true;
    DN configEntryDN = configuration.dn();
    // Make sure that the subject attribute is defined in the server schema.
    String attrName = configuration.getSubjectAttribute();
opendj-sdk/opends/src/server/org/opends/server/loggers/AccessLogger.java
@@ -341,10 +341,11 @@
     ClassPropertyDefinition pd =
         d.getJavaImplementationClassPropertyDefinition();
     // Load the class and cast it to a DebugLogPublisher.
     AccessLogPublisher publisher = null;
     Class<? extends AccessLogPublisher> theClass;
     try {
       theClass = pd.loadClass(className, AccessLogPublisher.class);
       theClass.newInstance();
       publisher = theClass.newInstance();
     } catch (Exception e) {
       int    msgID   = MSGID_CONFIG_LOGGER_INVALID_ACCESS_LOGGER_CLASS;
       String message = getMessage(msgID, className,
@@ -358,8 +359,16 @@
       // Determine the initialization method to use: it must take a
       // single parameter which is the exact type of the configuration
       // object.
       theClass.getMethod("initializeAccessLogPublisher", config.definition()
           .getServerConfigurationClass());
       Method method = theClass.getMethod("isConfigurationAcceptable",
                                          AccessLogPublisherCfg.class,
                                          List.class);
       Boolean acceptable = (Boolean) method.invoke(publisher, config,
                                                    unacceptableReasons);
       if (! acceptable)
       {
         return false;
       }
     } catch (Exception e) {
       int    msgID   = MSGID_CONFIG_LOGGER_INVALID_ACCESS_LOGGER_CLASS;
       String message = getMessage(msgID, className,
opendj-sdk/opends/src/server/org/opends/server/loggers/ErrorLogger.java
@@ -337,10 +337,11 @@
    ClassPropertyDefinition pd =
        d.getJavaImplementationClassPropertyDefinition();
    // Load the class and cast it to a DebugLogPublisher.
    ErrorLogPublisher publisher = null;
    Class<? extends ErrorLogPublisher> theClass;
    try {
      theClass = pd.loadClass(className, ErrorLogPublisher.class);
      theClass.newInstance();
      publisher = theClass.newInstance();
    } catch (Exception e) {
      int    msgID   = MSGID_CONFIG_LOGGER_INVALID_ERROR_LOGGER_CLASS;
      String message = getMessage(msgID, className,
@@ -354,8 +355,16 @@
      // Determine the initialization method to use: it must take a
      // single parameter which is the exact type of the configuration
      // object.
      theClass.getMethod("initializeErrorLogPublisher", config.definition()
          .getServerConfigurationClass());
      Method method = theClass.getMethod("isConfigurationAcceptable",
                                         ErrorLogPublisherCfg.class,
                                         List.class);
      Boolean acceptable = (Boolean) method.invoke(publisher, config,
                                                   unacceptableReasons);
      if (! acceptable)
      {
        return false;
      }
    } catch (Exception e) {
      int    msgID   = MSGID_CONFIG_LOGGER_INVALID_ERROR_LOGGER_CLASS;
      String message = getMessage(msgID, className,
opendj-sdk/opends/src/server/org/opends/server/loggers/TextAccessLogPublisher.java
@@ -31,6 +31,9 @@
import java.io.IOException;
import java.util.*;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.AccessLogPublisherCfg;
import org.opends.server.admin.std.server.FileBasedAccessLogPublisherCfg;
import org.opends.server.api.*;
import org.opends.server.config.ConfigException;
import org.opends.server.core.AbandonOperation;
@@ -45,14 +48,12 @@
import org.opends.server.core.SearchOperation;
import org.opends.server.core.UnbindOperation;
import org.opends.server.types.*;
import org.opends.server.util.TimeThread;
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.MessageHandler.getMessage;
import org.opends.server.admin.std.server.FileBasedAccessLogPublisherCfg;
import org.opends.server.admin.server.ConfigurationChangeListener;
import static org.opends.server.util.StaticUtils.getFileForPath;
import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString;
import org.opends.server.util.TimeThread;
/**
@@ -188,6 +189,47 @@
    config.addFileBasedAccessChangeListener(this);
  }
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(AccessLogPublisherCfg configuration,
                                           List<String> unacceptableReasons)
  {
    FileBasedAccessLogPublisherCfg config =
         (FileBasedAccessLogPublisherCfg) configuration;
     // Validate retention and rotation policies.
     for(DN dn : config.getRotationPolicyDN())
     {
       RotationPolicy policy = DirectoryServer.getRotationPolicy(dn);
       if(policy == null)
       {
         int msgID = MSGID_CONFIG_LOGGER_INVALID_ROTATION_POLICY;
         String message = getMessage(msgID, dn.toString(),
                                     config.dn().toString());
         unacceptableReasons.add(message);
         return false;
       }
     }
     for(DN dn: config.getRetentionPolicyDN())
     {
       RetentionPolicy policy = DirectoryServer.getRetentionPolicy(dn);
       if(policy == null)
       {
         int msgID = MSGID_CONFIG_LOGGER_INVALID_RETENTION_POLICY;
         String message = getMessage(msgID, dn.toString(),
                                     config.dn().toString());
         unacceptableReasons.add(message);
         return false;
       }
     }
     return true;
  }
  /**
   * {@inheritDoc}
   */
@@ -220,33 +262,7 @@
       return false;
     }
     // Validate retention and rotation policies.
     for(DN dn : config.getRotationPolicyDN())
     {
       RotationPolicy policy = DirectoryServer.getRotationPolicy(dn);
       if(policy == null)
       {
         int msgID = MSGID_CONFIG_LOGGER_INVALID_ROTATION_POLICY;
         String message = getMessage(msgID, dn.toString(),
                                     config.dn().toString());
         unacceptableReasons.add(message);
         return false;
       }
     }
     for(DN dn: config.getRetentionPolicyDN())
     {
       RetentionPolicy policy = DirectoryServer.getRetentionPolicy(dn);
       if(policy == null)
       {
         int msgID = MSGID_CONFIG_LOGGER_INVALID_RETENTION_POLICY;
         String message = getMessage(msgID, dn.toString(),
                                     config.dn().toString());
         unacceptableReasons.add(message);
         return false;
       }
     }
     return true;
     return isConfigurationAcceptable(config, unacceptableReasons);
   }
  /**
opendj-sdk/opends/src/server/org/opends/server/loggers/TextErrorLogPublisher.java
@@ -38,6 +38,7 @@
import static org.opends.server.messages.ConfigMessages.*;
import static org.opends.server.messages.LoggerMessages.*;
import static org.opends.server.messages.MessageHandler.getMessage;
import org.opends.server.admin.std.server.ErrorLogPublisherCfg;
import org.opends.server.admin.std.server.FileBasedErrorLogPublisherCfg;
import org.opends.server.admin.std.meta.ErrorLogPublisherCfgDefn;
import org.opends.server.admin.server.ConfigurationChangeListener;
@@ -272,37 +273,17 @@
    config.addFileBasedErrorChangeListener(this);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
      FileBasedErrorLogPublisherCfg config, List<String> unacceptableReasons)
  @Override()
  public boolean isConfigurationAcceptable(ErrorLogPublisherCfg configuration,
                                           List<String> unacceptableReasons)
  {
    // Make sure the permission is valid.
    try
    {
      if(!currentConfig.getLogFileMode().equalsIgnoreCase(
          config.getLogFileMode()))
      {
        FilePermission.decodeUNIXMode(config.getLogFileMode());
      }
      if(!currentConfig.getLogFile().equalsIgnoreCase(config.getLogFile()))
      {
        File logFile = getFileForPath(config.getLogFile());
        if(logFile.createNewFile())
        {
          logFile.delete();
        }
      }
    }
    catch(Exception e)
    {
      int msgID = MSGID_CONFIG_LOGGING_CANNOT_CREATE_WRITER;
      String message = getMessage(msgID, config.dn().toString(),
                                  stackTraceToSingleLineString(e));
      unacceptableReasons.add(message);
      return false;
    }
    FileBasedErrorLogPublisherCfg config =
         (FileBasedErrorLogPublisherCfg) configuration;
    // Validate retention and rotation policies.
    for(DN dn : config.getRotationPolicyDN())
@@ -382,6 +363,41 @@
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
      FileBasedErrorLogPublisherCfg config, List<String> unacceptableReasons)
  {
    // Make sure the permission is valid.
    try
    {
      if(!currentConfig.getLogFileMode().equalsIgnoreCase(
          config.getLogFileMode()))
      {
        FilePermission.decodeUNIXMode(config.getLogFileMode());
      }
      if(!currentConfig.getLogFile().equalsIgnoreCase(config.getLogFile()))
      {
        File logFile = getFileForPath(config.getLogFile());
        if(logFile.createNewFile())
        {
          logFile.delete();
        }
      }
    }
    catch(Exception e)
    {
      int msgID = MSGID_CONFIG_LOGGING_CANNOT_CREATE_WRITER;
      String message = getMessage(msgID, config.dn().toString(),
                                  stackTraceToSingleLineString(e));
      unacceptableReasons.add(message);
      return false;
    }
    return isConfigurationAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public ConfigChangeResult applyConfigurationChange(
      FileBasedErrorLogPublisherCfg config)
  {
opendj-sdk/opends/src/server/org/opends/server/loggers/debug/DebugLogger.java
@@ -350,10 +350,11 @@
    ClassPropertyDefinition pd =
        d.getJavaImplementationClassPropertyDefinition();
    // Load the class and cast it to a DebugLogPublisher.
    DebugLogPublisher publisher = null;
    Class<? extends DebugLogPublisher> theClass;
    try {
      theClass = pd.loadClass(className, DebugLogPublisher.class);
      theClass.newInstance();
      publisher = theClass.newInstance();
    } catch (Exception e) {
      int    msgID   = MSGID_CONFIG_LOGGER_INVALID_DEBUG_LOGGER_CLASS;
      String message = getMessage(msgID, className,
@@ -367,8 +368,16 @@
      // Determine the initialization method to use: it must take a
      // single parameter which is the exact type of the configuration
      // object.
      theClass.getMethod("initializeDebugLogPublisher", config.definition()
          .getServerConfigurationClass());
      Method method = theClass.getMethod("isConfigurationAcceptable",
                                         DebugLogPublisherCfg.class,
                                         List.class);
      Boolean acceptable = (Boolean) method.invoke(publisher, config,
                                                   unacceptableReasons);
      if (! acceptable)
      {
        return false;
      }
    } catch (Exception e) {
      int    msgID   = MSGID_CONFIG_LOGGER_INVALID_DEBUG_LOGGER_CLASS;
      String message = getMessage(msgID, className,
opendj-sdk/opends/src/server/org/opends/server/loggers/debug/TextDebugLogPublisher.java
@@ -35,6 +35,7 @@
import static org.opends.server.util.StaticUtils.stackTraceToSingleLineString;
import static org.opends.server.util.StaticUtils.getFileForPath;
import static org.opends.server.util.ServerConstants.PROPERTY_DEBUG_TARGET;
import org.opends.server.admin.std.server.DebugLogPublisherCfg;
import org.opends.server.admin.std.server.DebugTargetCfg;
import org.opends.server.admin.std.server.FileBasedDebugLogPublisherCfg;
import org.opends.server.admin.std.meta.DebugLogPublisherCfgDefn;
@@ -250,6 +251,47 @@
    config.addFileBasedDebugChangeListener(this);
  }
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(DebugLogPublisherCfg configuration,
                                           List<String> unacceptableReasons)
  {
    FileBasedDebugLogPublisherCfg config =
         (FileBasedDebugLogPublisherCfg) configuration;
    // Validate retention and rotation policies.
    for(DN dn : config.getRotationPolicyDN())
    {
      RotationPolicy policy = DirectoryServer.getRotationPolicy(dn);
      if(policy == null)
      {
        int msgID = MSGID_CONFIG_LOGGER_INVALID_ROTATION_POLICY;
        String message = getMessage(msgID, dn.toString(),
                                    config.dn().toString());
        unacceptableReasons.add(message);
        return false;
      }
    }
    for(DN dn: config.getRetentionPolicyDN())
    {
      RetentionPolicy policy = DirectoryServer.getRetentionPolicy(dn);
      if(policy != null)
      {
        int msgID = MSGID_CONFIG_LOGGER_INVALID_RETENTION_POLICY;
        String message = getMessage(msgID, dn.toString(),
                                    config.dn().toString());
        unacceptableReasons.add(message);
        return false;
      }
    }
    return true;
  }
  /**
   * {@inheritDoc}
   */
@@ -282,33 +324,7 @@
      return false;
    }
    // Validate retention and rotation policies.
    for(DN dn : config.getRotationPolicyDN())
    {
      RotationPolicy policy = DirectoryServer.getRotationPolicy(dn);
      if(policy == null)
      {
        int msgID = MSGID_CONFIG_LOGGER_INVALID_ROTATION_POLICY;
        String message = getMessage(msgID, dn.toString(),
                                    config.dn().toString());
        unacceptableReasons.add(message);
        return false;
      }
    }
    for(DN dn: config.getRetentionPolicyDN())
    {
      RetentionPolicy policy = DirectoryServer.getRetentionPolicy(dn);
      if(policy != null)
      {
        int msgID = MSGID_CONFIG_LOGGER_INVALID_RETENTION_POLICY;
        String message = getMessage(msgID, dn.toString(),
                                    config.dn().toString());
        unacceptableReasons.add(message);
        return false;
      }
    }
    return true;
    return isConfigurationAcceptable(config, unacceptableReasons);
  }
  /**
opendj-sdk/opends/src/server/org/opends/server/messages/ConfigMessages.java
@@ -6857,6 +6857,181 @@
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_KEYMANAGER_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 679;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_TRUSTMANAGER_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 680;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_AUTHZ_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 681;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_ACCTNOTHANDLER_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 682;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_SCHEMA_SYNTAX_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 683;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_CERTMAPPER_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 684;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_ENTRYCACHE_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 685;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_GROUP_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 686;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_IDMAPPER_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 687;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_SCHEMA_MR_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 688;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_PWGENERATOR_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 689;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_PWSCHEME_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 690;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_PWVALIDATOR_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 691;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_PLUGIN_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 692;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_SASL_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 693;
  /**
   * The message ID for the message that will be used if a proposed
   * configuration is not acceptable.  This takes two arguments, which are the
   * DN of the configuration entry and a message explaining why the
   * configuration is not acceptable.
   */
  public static final int MSGID_CONFIG_VATTR_CONFIG_NOT_ACCEPTABLE =
            CATEGORY_MASK_CONFIG | SEVERITY_MASK_MILD_ERROR | 694;
  /**
   * Associates a set of generic messages with the message IDs defined in this
@@ -8076,6 +8251,9 @@
    registerMessage(MSGID_CONFIG_SCHEMA_CANNOT_DISABLE_MR_IN_USE_BY_MRU,
                    "Matching rule %s cannot be disabled because it is in " +
                    "use by matching rule use %s");
    registerMessage(MSGID_CONFIG_SCHEMA_MR_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the matching rule defined in " +
                    "configuration entry %s was not acceptable:  %s");
    registerMessage(MSGID_CONFIG_SCHEMA_CANNOT_GET_SYNTAX_BASE,
@@ -8165,6 +8343,9 @@
    registerMessage(MSGID_CONFIG_SCHEMA_CANNOT_DISABLE_SYNTAX_IN_USE,
                    "Attribute syntax %s cannot be disabled because it is in " +
                    "use by attribute type %s");
    registerMessage(MSGID_CONFIG_SCHEMA_SYNTAX_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the attribute syntax defined in " +
                    "configuration entry %s was not acceptable:  %s");
    registerMessage(MSGID_CONFIG_SCHEMA_NO_SCHEMA_DIR,
@@ -8334,6 +8515,9 @@
                    "an instance of class %s for use as the Directory Server " +
                    "entry cache:  %s.  As a result, the entry cache will be " +
                    "disabled");
    registerMessage(MSGID_CONFIG_ENTRYCACHE_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the entry cache defined in " +
                    "configuration entry %s was not acceptable:  %s");
    registerMessage(MSGID_CONFIG_LOGGER_NO_ROTATION_POLICY,
@@ -8482,6 +8666,9 @@
                    "applied.  This change will not take effect until the " +
                    "plugin is disabled and re-enabled or the Directory " +
                    "Server is restarted");
    registerMessage(MSGID_CONFIG_PLUGIN_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the plugin defined in " +
                    "configuration entry %s was not acceptable:  %s");
    registerMessage(MSGID_CONFIG_EXTOP_INVALID_CLASS,
@@ -8566,6 +8753,12 @@
                    "according to its internal validation.  However, no " +
                    "specific information is available regarding the " +
                    "problem(s) with the entry");
    registerMessage(MSGID_CONFIG_SASL_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the SASL mechanism handler " +
                    "defined in configuration entry %s was not acceptable:  " +
                    "%s");
    registerMessage(MSGID_CONFIG_LOGGER_INVALID_SUPPRESS_INT_OPERATION_VALUE,
        "Invalid value specified for attribute %s. " +
        "Allowed values are true or false");
@@ -8650,6 +8843,9 @@
                    "to its internal validation.  However, no specific " +
                    "information is available regarding the problem(s) with " +
                    "the entry");
    registerMessage(MSGID_CONFIG_KEYMANAGER_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the key manager provider defined " +
                    "in configuration entry %s was not acceptable:  %s");
    registerMessage(MSGID_CONFIG_TRUSTMANAGER_CANNOT_GET_BASE,
@@ -8729,6 +8925,10 @@
                    "according to its internal validation.  However, no " +
                    "specific information is available regarding the " +
                    "problem(s) with the entry");
    registerMessage(MSGID_CONFIG_TRUSTMANAGER_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the trust manager provider " +
                    "defined in configuration entry %s was not acceptable:  " +
                    "%s");
    registerMessage(MSGID_CONFIG_CERTMAPPER_CANNOT_GET_BASE,
@@ -8806,6 +9006,9 @@
                    "its internal validation.  However, no specific " +
                    "information is available regarding the problem(s) with " +
                    "the entry");
    registerMessage(MSGID_CONFIG_CERTMAPPER_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the certificate mapper defined in " +
                    "configuration entry %s was not acceptable:  %s");
    registerMessage(MSGID_CONFIG_PWSCHEME_CANNOT_GET_BASE,
@@ -8880,6 +9083,10 @@
                    "according to its internal validation.  However, no " +
                    "specific information is available regarding the " +
                    "problem(s) with the entry");
    registerMessage(MSGID_CONFIG_PWSCHEME_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the password storage scheme " +
                    "defined in configuration entry %s was not acceptable:  " +
                    "%s");
    registerMessage(MSGID_CONFIG_BACKUP_CANNOT_GET_MAC,
@@ -9108,6 +9315,9 @@
                    "its internal validation.  However, no specific " +
                    "information is available regarding the problem(s) with " +
                    "the entry");
    registerMessage(MSGID_CONFIG_IDMAPPER_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the identity mapper defined in " +
                    "configuration entry %s was not acceptable:  %s");
    registerMessage(MSGID_CONFIG_SYNCH_CANNOT_GET_CONFIG_BASE,
@@ -9262,6 +9472,9 @@
                    "its internal validation.  However, no specific " +
                    "information is available regarding the problem(s) with " +
                    "the entry");
    registerMessage(MSGID_CONFIG_PWVALIDATOR_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the password validator defined in " +
                    "configuration entry %s was not acceptable:  %s");
    registerMessage(MSGID_CONFIG_PWGENERATOR_CANNOT_GET_BASE,
@@ -9335,6 +9548,9 @@
                    "its internal validation.  However, no specific " +
                    "information is available regarding the problem(s) with " +
                    "the entry");
    registerMessage(MSGID_CONFIG_PWGENERATOR_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the password generator defined in " +
                    "configuration entry %s was not acceptable:  %s");
    registerMessage(MSGID_CONFIG_PWPOLICY_CANNOT_GET_BASE,
@@ -9453,6 +9669,10 @@
            + "Directory Server access control implementation referenced "
            + "in configuration entry %s:  %s");
    registerMessage(MSGID_CONFIG_AUTHZ_CONFIG_NOT_ACCEPTABLE,
        "The configuration for the trust manager provider defined in "
            + "configuration entry %s was not acceptable:  %s");
    registerMessage(MSGID_CONFIG_ROOTDN_CANNOT_GET_BASE,
                    "An error occurred while attempting to retrieve the " +
@@ -9596,6 +9816,12 @@
                    "acceptable according to its internal validation.  " +
                    "However, no specific information is available regarding " +
                    "the problem(s) with the entry");
    registerMessage(MSGID_CONFIG_ACCTNOTHANDLER_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the account status notification " +
                    "handler defined in configuration entry %s was not " +
                    "acceptable:  %s");
    registerMessage(MSGID_CONFIG_CORE_DESCRIPTION_LOOKTHROUGH_LIMIT,
                    "Specifies the default maximum number of candidate " +
                    "entries checked for matches when processing a search " +
@@ -9698,6 +9924,9 @@
                    "to its internal validation.  However, no specific " +
                    "information is available regarding the problem(s) with " +
                    "the entry");
    registerMessage(MSGID_CONFIG_GROUP_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the group implementation defined " +
                    "in configuration entry %s was not acceptable:  %s");
    registerMessage(
@@ -9744,6 +9973,12 @@
                    "An error occurred while trying to load an instance " +
                    "of class %s referenced in configuration entry %s as a " +
                    "virtual attribute provider:  %s");
    registerMessage(MSGID_CONFIG_VATTR_CONFIG_NOT_ACCEPTABLE,
                    "The configuration for the virtual attribute provider " +
                    "defined in configuration entry %s was not acceptable:  " +
                    "%s");
    registerMessage(MSGID_CONFIG_ROTATION_POLICY_INVALID_CLASS,
                    "Class %s specified in attribute " + ATTR_LOGGER_CLASS +
                    " of configuration entry %s cannot be instantiated as " +
opendj-sdk/opends/src/server/org/opends/server/plugins/EntryUUIDPlugin.java
@@ -232,6 +232,18 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(PluginCfg configuration,
                                           List<String> unacceptableReasons)
  {
    return isConfigurationChangeAcceptable(configuration, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(PluginCfg configuration,
                      List<String> unacceptableReasons)
  {
opendj-sdk/opends/src/server/org/opends/server/plugins/LDAPADListPlugin.java
@@ -196,6 +196,18 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(PluginCfg configuration,
                                           List<String> unacceptableReasons)
  {
    return isConfigurationChangeAcceptable(configuration, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(PluginCfg configuration,
                      List<String> unacceptableReasons)
  {
opendj-sdk/opends/src/server/org/opends/server/plugins/LastModPlugin.java
@@ -327,6 +327,18 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(PluginCfg configuration,
                                           List<String> unacceptableReasons)
  {
    return isConfigurationChangeAcceptable(configuration, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(PluginCfg configuration,
                      List<String> unacceptableReasons)
  {
opendj-sdk/opends/src/server/org/opends/server/plugins/PasswordPolicyImportPlugin.java
@@ -40,6 +40,7 @@
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.meta.PluginCfgDefn;
import org.opends.server.admin.std.server.PasswordPolicyImportPluginCfg;
import org.opends.server.admin.std.server.PluginCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.ImportTaskListener;
import org.opends.server.api.PasswordStorageScheme;
@@ -603,6 +604,20 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(PluginCfg configuration,
                                           List<String> unacceptableReasons)
  {
    PasswordPolicyImportPluginCfg config =
         (PasswordPolicyImportPluginCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      PasswordPolicyImportPluginCfg configuration,
                      List<String> unacceptableReasons)
@@ -823,6 +838,12 @@
      }
    }
    if (resultCode == ResultCode.SUCCESS)
    {
      defaultAuthPasswordSchemes = defaultAuthSchemes;
      defaultUserPasswordSchemes = defaultUserSchemes;
    }
    return new ConfigChangeResult(resultCode, adminActionRequired, messages);
  }
}
opendj-sdk/opends/src/server/org/opends/server/plugins/profiler/ProfilerPlugin.java
@@ -35,6 +35,7 @@
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.meta.PluginCfgDefn;
import org.opends.server.admin.std.server.PluginCfg;
import org.opends.server.admin.std.server.ProfilerPluginCfg;
import org.opends.server.api.plugin.DirectoryServerPlugin;
import org.opends.server.api.plugin.PluginType;
@@ -246,11 +247,25 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(PluginCfg configuration,
                                           List<String> unacceptableReasons)
  {
    ProfilerPluginCfg config = (ProfilerPluginCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
                      ProfilerPluginCfg configuration,
                      List<String> unacceptableReasons)
  {
    boolean configAcceptable = true;
    DN configEntryDN = configuration.dn();
    // Make sure that the plugin is only registered as a startup plugin.
    if (configuration.getPluginType().isEmpty())
@@ -411,3 +426,4 @@
    return new ConfigChangeResult(resultCode, adminActionRequired, messages);
  }
}
opendj-sdk/opends/src/server/org/opends/server/protocols/jmx/JmxConnectionHandler.java
@@ -42,6 +42,7 @@
import java.util.List;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.ConnectionHandlerCfg;
import org.opends.server.admin.std.server.JMXConnectionHandlerCfg;
import org.opends.server.api.AlertGenerator;
import org.opends.server.api.ClientConnection;
@@ -428,6 +429,19 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(ConnectionHandlerCfg configuration,
                                           List<String> unacceptableReasons)
  {
    JMXConnectionHandlerCfg config = (JMXConnectionHandlerCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
      JMXConnectionHandlerCfg config,
      List<String> unacceptableReasons) {
opendj-sdk/opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
@@ -54,6 +54,7 @@
import java.util.Set;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.server.ConnectionHandlerCfg;
import org.opends.server.admin.std.server.LDAPConnectionHandlerCfg;
import org.opends.server.api.AlertGenerator;
import org.opends.server.api.ClientConnection;
@@ -789,6 +790,19 @@
  /**
   * {@inheritDoc}
   */
  @Override()
  public boolean isConfigurationAcceptable(ConnectionHandlerCfg configuration,
                                           List<String> unacceptableReasons)
  {
    LDAPConnectionHandlerCfg config = (LDAPConnectionHandlerCfg) configuration;
    return isConfigurationChangeAcceptable(config, unacceptableReasons);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isConfigurationChangeAcceptable(
      LDAPConnectionHandlerCfg config,
      List<String> unacceptableReasons) {
opendj-sdk/opends/tests/unit-tests-testng/src/server/org/opends/server/api/plugin/DirectoryServerPluginTestCase.java
@@ -555,6 +555,13 @@
    sigList.add("void");
    expectedPublicMethods.add(sigList);
    sigList = new LinkedList<String>();
    sigList.add("isConfigurationAcceptable");
    sigList.add("boolean");
    sigList.add("org.opends.server.admin.std.server.PluginCfg");
    sigList.add("java.util.List");
    expectedPublicMethods.add(sigList);
    LinkedList<LinkedList<String>> newPublicMethods =
         new LinkedList<LinkedList<String>>();