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

Jean-Noël Rouvignac
20.42.2016 61b9eb1be03fc03a9f4bb0013a08ff44a1059503
opendj-server-legacy/src/main/java/org/opends/server/extensions/SMTPAlertHandler.java
@@ -36,8 +36,6 @@
import org.opends.server.types.InitializationException;
import org.opends.server.util.EMailMessage;
/**
 * This class implements a Directory Server alert handler that may be used to
 * send administrative alerts via SMTP.
@@ -48,16 +46,10 @@
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /** The current configuration for this alert handler. */
  private SMTPAlertHandlerCfg currentConfig;
  /**
   * Creates a new instance of this SMTP alert handler.
   */
  /** Creates a new instance of this SMTP alert handler. */
  public SMTPAlertHandler()
  {
    super();
@@ -65,9 +57,7 @@
    // All initialization should be done in the initializeAlertHandler method.
  }
  /** {@inheritDoc} */
  @Override
  public void initializeAlertHandler(SMTPAlertHandlerCfg configuration)
       throws ConfigException, InitializationException
  {
@@ -83,34 +73,26 @@
    currentConfig = configuration;
  }
  /** {@inheritDoc} */
  @Override
  public AlertHandlerCfg getAlertHandlerConfiguration()
  {
    return currentConfig;
  }
  /** {@inheritDoc} */
  @Override
  public boolean isConfigurationAcceptable(AlertHandlerCfg configuration,
                                           List<LocalizableMessage> unacceptableReasons)
  {
    return true;
  }
  /** {@inheritDoc} */
  @Override
  public void finalizeAlertHandler()
  {
    // No action is required.
  }
  /** {@inheritDoc} */
  @Override
  public void sendAlertNotification(AlertGenerator generator, String alertType,
                                    LocalizableMessage alertMessage)
  {
@@ -150,8 +132,6 @@
    }
  }
  /**
   * Replaces any occurrences of special tokens in the given string with the
   * appropriate value.  Tokens supported include:
@@ -181,9 +161,7 @@
             replace("\\n", "\r\n");
  }
  /** {@inheritDoc} */
  @Override
  public boolean isConfigurationChangeAcceptable(
                      SMTPAlertHandlerCfg configuration,
                      List<LocalizableMessage> unacceptableReasons)
@@ -191,9 +169,7 @@
    return true;
  }
  /** {@inheritDoc} */
  @Override
  public ConfigChangeResult applyConfigurationChange(
                                 SMTPAlertHandlerCfg configuration)
  {