From a0c742dc589e56e8b1a7498de1d165e039f58aac 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.

---
 opendj-sdk/opends/src/server/org/opends/server/messages/BackendMessages.java |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/messages/BackendMessages.java b/opendj-sdk/opends/src/server/org/opends/server/messages/BackendMessages.java
index 942417a..c0f7e13 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/messages/BackendMessages.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/messages/BackendMessages.java
@@ -3237,6 +3237,17 @@
 
 
   /**
+   * The message ID for the message that will be used as the body of the
+   * notification e-mail message sent when a task is completed.  It takes
+   * five arguments, which are string representations of the task ID, task
+   * state, scheduled start date, actual start date, and completion date.
+   */
+  public static final int MSGID_TASK_COMPLETION_BODY =
+       CATEGORY_MASK_BACKEND | SEVERITY_MASK_INFORMATIONAL | 299;
+
+
+
+  /**
    * Associates a set of generic messages with the message IDs defined in this
    * class.
    */
@@ -3993,6 +4004,14 @@
     registerMessage(MSGID_TASK_EXECUTE_FAILED,
                     "An error occurred while executing the task defined in " +
                     "entry %s:  %s");
+    registerMessage(MSGID_TASK_COMPLETION_BODY,
+                    "Task ID:  %s\r\n" +
+                    "Task State:  %s\r\n" +
+                    "Scheduled Start Time:  %s\r\n" +
+                    "Actual Start Time:  %s\r\n" +
+                    "Completion Time:  %s\r\n" +
+                    "\r\n" +
+                    "Log Messages:\r\n");
 
 
     registerMessage(MSGID_RECURRINGTASK_NO_ID_ATTRIBUTE,

--
Gitblit v1.10.0