From 403b6a83e7d68de2b5159c3421b8d91d704566bb Mon Sep 17 00:00:00 2001
From: jdemendi <jdemendi@localhost>
Date: Tue, 30 Oct 2007 13:09:42 +0000
Subject: [PATCH] s set of files provides the workflow configuration manual mode.
---
opends/src/server/org/opends/server/core/WorkflowImpl.java | 61 ++++++++++++++++++++++++++++++
1 files changed, 61 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/WorkflowImpl.java b/opends/src/server/org/opends/server/core/WorkflowImpl.java
index dd1f551..0d09a43 100644
--- a/opends/src/server/org/opends/server/core/WorkflowImpl.java
+++ b/opends/src/server/org/opends/server/core/WorkflowImpl.java
@@ -30,6 +30,7 @@
import org.opends.messages.Message;
import static org.opends.server.util.Validator.ensureNotNull;
+import java.util.Collection;
import java.util.TreeMap;
import org.opends.server.types.DN;
@@ -108,6 +109,17 @@
/**
+ * Performs any finalization that might be required when this
+ * workflow is unloaded. No action is taken in the default
+ * implementation.
+ */
+ public void finalizeWorkflow()
+ {
+ // No action is required by default.
+ }
+
+
+ /**
* Gets the base DN of the data set being handled by the workflow.
*
* @return the workflow base DN
@@ -230,6 +242,7 @@
return workflowToDeregister;
}
+
/**
* Deregisters all Workflows that have been registered. This should be
* called when the server is shutting down.
@@ -242,4 +255,52 @@
new TreeMap<String, Workflow>();
}
}
+
+
+ /**
+ * Gets a workflow that was registered with the server.
+ *
+ * @param workflowID the ID of the workflow to get
+ * @return the requested workflow
+ */
+ public static Workflow getWorkflow(
+ String workflowID)
+ {
+ return registeredWorkflows.get(workflowID);
+ }
+
+
+ /**
+ * Gets all the workflows that were registered with the server.
+ *
+ * @return the list of registered workflows
+ */
+ public static Collection<Workflow> getWorkflows()
+ {
+ return registeredWorkflows.values();
+ }
+
+
+ /**
+ * Gets the root workflow element for test purpose only.
+ *
+ * @return the root workflow element.
+ */
+ WorkflowElement getRootWorkflowElement()
+ {
+ return rootWorkflowElement;
+ }
+
+
+ /**
+ * Resets all the registered workflows.
+ */
+ public static void resetConfig()
+ {
+ synchronized (registeredWorkflowsLock)
+ {
+ registeredWorkflows = new TreeMap<String, Workflow>();
+ }
+ }
+
}
--
Gitblit v1.10.0