From d2a3ab51e80e40206f97bb4e84117f86447f231f Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Mon, 30 Jul 2007 23:30:38 +0000
Subject: [PATCH] Update the task backend to provide a mechanism for sending e-mail messages to notify administrators whenever a given task has been completed. It is possible to specify a set of administrators that should be notified only if the task does not complete successfully, and/or a set of administrators that should be notified regardless of the task's success or failure. The basic framework for this capability has always been in place, and this change only provides the final implementation that actually generates and sends the e-mail message.
---
opends/src/server/org/opends/server/core/DirectoryServer.java | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/DirectoryServer.java b/opends/src/server/org/opends/server/core/DirectoryServer.java
index 4d56604..f315d7d 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -2058,6 +2058,21 @@
/**
+ * Indicates whether the Directory Server is configured with information about
+ * one or more mail servers and may therefore be used to send e-mail messages.
+ *
+ * @return {@code true} if the Directory Server is configured to be able to
+ * send e-mail messages, or {@code false} if not.
+ */
+ public static boolean mailServerConfigured()
+ {
+ return ((directoryServer.mailServerPropertySets != null) &&
+ (! directoryServer.mailServerPropertySets.isEmpty()));
+ }
+
+
+
+ /**
* Specifies the set of mail server properties that should be used for SMTP
* communication.
*
--
Gitblit v1.10.0