From 8a4435e154a3307e0602fe359f8f1210c183af73 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Tue, 02 Oct 2007 16:38:40 +0000
Subject: [PATCH] Partially addressed issues 2335 and 2336 which call for support of task notifications and dependencies in client task scheduling tools.
---
opendj-sdk/opends/src/server/org/opends/server/backends/task/FailedDependencyAction.java | 28 +++++++++++++++++++++-------
1 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/backends/task/FailedDependencyAction.java b/opendj-sdk/opends/src/server/org/opends/server/backends/task/FailedDependencyAction.java
index 68b38d3..3e59556 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/backends/task/FailedDependencyAction.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/backends/task/FailedDependencyAction.java
@@ -27,7 +27,7 @@
package org.opends.server.backends.task;
import org.opends.messages.Message;
-import org.opends.messages.TaskMessages;
+import static org.opends.messages.TaskMessages.*;
/**
@@ -41,14 +41,14 @@
* The action that indicates that the dependent task should be processed
* anyway.
*/
- PROCESS(TaskMessages.INFO_FAILED_DEPENDENCY_ACTION_PROCESS.get()),
+ PROCESS(INFO_FAILED_DEPENDENCY_ACTION_PROCESS.get()),
/**
* The action that indicates that the dependent task should be canceled.
*/
- CANCEL(TaskMessages.INFO_FAILED_DEPENDENCY_ACTION_CANCEL.get()),
+ CANCEL(INFO_FAILED_DEPENDENCY_ACTION_CANCEL.get()),
@@ -56,9 +56,17 @@
* The action that indicates that the dependent task should be disabled so
* that an administrator will have to re-enable it before it can start.
*/
- DISABLE(TaskMessages.INFO_FAILED_DEPENDENCY_ACTION_DISABLE.get());
+ DISABLE(INFO_FAILED_DEPENDENCY_ACTION_DISABLE.get());
+ /**
+ * Returns the default action.
+ *
+ * @return the default action
+ */
+ public static FailedDependencyAction defaultValue() {
+ return CANCEL;
+ }
/**
* Retrieves the failed dependency action that corresponds to the provided
@@ -73,15 +81,21 @@
public static FailedDependencyAction fromString(String s)
{
String lowerString = s.toLowerCase();
- if (lowerString.equals("process"))
+ if (lowerString.equals("process") ||
+ lowerString.equals(INFO_FAILED_DEPENDENCY_ACTION_PROCESS.get().
+ toString().toLowerCase()))
{
return PROCESS;
}
- else if (lowerString.equals("cancel"))
+ else if (lowerString.equals("cancel") ||
+ lowerString.equals(INFO_FAILED_DEPENDENCY_ACTION_CANCEL.get().
+ toString().toLowerCase()))
{
return CANCEL;
}
- else if (lowerString.equals("disable"))
+ else if (lowerString.equals("disable") ||
+ lowerString.equals(INFO_FAILED_DEPENDENCY_ACTION_DISABLE.get().
+ toString().toLowerCase()))
{
return DISABLE;
}
--
Gitblit v1.10.0