From 2273c26793fe6e3abfd90a400823e8e46b3303bb Mon Sep 17 00:00:00 2001
From: abobrov <abobrov@localhost>
Date: Mon, 15 Dec 2008 16:07:29 +0000
Subject: [PATCH] - [Issue 274]  Recurring Tasks

---
 opends/src/server/org/opends/server/backends/task/TaskState.java |   32 ++++++++++++++++++++++++++++++++
 1 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/task/TaskState.java b/opends/src/server/org/opends/server/backends/task/TaskState.java
index d3c10ba..be920e4 100644
--- a/opends/src/server/org/opends/server/backends/task/TaskState.java
+++ b/opends/src/server/org/opends/server/backends/task/TaskState.java
@@ -76,6 +76,13 @@
 
 
   /**
+   * The task state that indicates that the task is recurring.
+   */
+  RECURRING(INFO_TASK_STATE_RECURRING.get()),
+
+
+
+  /**
    * The task state that indicates that the task has completed without any
    * errors.
    */
@@ -173,6 +180,27 @@
 
 
   /**
+   * Indicates whether a task with the specified state is recurring.
+   *
+   * @param  taskState  The task state for which to make the determination.
+   *
+   * @return  <CODE>true</CODE> if the task state indicates that the task
+   *          is recurring, or <CODE>false</CODE> otherwise.
+   */
+  public static boolean isRecurring(TaskState taskState)
+  {
+    switch (taskState)
+    {
+      case RECURRING:
+        return true;
+      default:
+        return false;
+    }
+  }
+
+
+
+  /**
    * Indicates whether a task with the specified state has completed all the
    * processing that it will do, regardless of whether it completed its
    * intended goal.
@@ -278,6 +306,10 @@
     {
       return RUNNING;
     }
+    else if (lowerString.equals("recurring"))
+    {
+      return RECURRING;
+    }
     else if (lowerString.equals("completed_successfully"))
     {
       return COMPLETED_SUCCESSFULLY;

--
Gitblit v1.10.0