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

neil_a_wilson
31.30.2007 a0c742dc589e56e8b1a7498de1d165e039f58aac
opendj-sdk/opends/src/server/org/opends/server/backends/task/TaskBackend.java
@@ -29,6 +29,7 @@
import java.io.File;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
@@ -116,6 +117,9 @@
  // removed from the set of scheduled tasks.
  private long retentionTime;
  // The e-mail address to use for the sender from notification messages.
  private String notificationSenderAddress;
  // The path to the task backing file.
  private String taskBackingFile;
@@ -226,6 +230,22 @@
    retentionTime = cfg.getTaskRetentionTime();
    // Get the notification sender address.
    notificationSenderAddress = cfg.getNotificationSenderAddress();
    if (notificationSenderAddress == null)
    {
      try
      {
        notificationSenderAddress = "opends-task-notification@" +
             InetAddress.getLocalHost().getCanonicalHostName();
      }
      catch (Exception e)
      {
        notificationSenderAddress = "opends-task-notification@opends.org";
      }
    }
    // Get the path to the task data backing file.
    taskBackingFile = cfg.getTaskBackingFile();
@@ -1285,6 +1305,22 @@
    }
    String tmpNotificationAddress = configEntry.getNotificationSenderAddress();
    if (tmpNotificationAddress == null)
    {
      try
      {
        tmpNotificationAddress = "opends-task-notification@" +
             InetAddress.getLocalHost().getCanonicalHostName();
      }
      catch (Exception e)
      {
        tmpNotificationAddress = "opends-task-notification@opends.org";
      }
    }
    notificationSenderAddress = tmpNotificationAddress;
    currentConfig = configEntry;
    return new ConfigChangeResult(resultCode, adminActionRequired, messages);
  }
@@ -1319,6 +1355,20 @@
  /**
   * Retrieves the sender address that should be used for e-mail notifications
   * of task completion.
   *
   * @return  The sender address that should be used for e-mail notifications of
   *          task completion.
   */
  public String getNotificationSenderAddress()
  {
    return notificationSenderAddress;
  }
  /**
   * Retrieves the length of time in seconds that information for a task should
   * be retained after processing on it has completed.
   *