From e74242ccd53b5525ab7337c9e289a1af196b7b18 Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Fri, 28 May 2010 14:04:26 +0000
Subject: [PATCH] Fix issue #2934. RootDSEWorkflowTopology now takes into account the ds-cfg-subordinate-base-dn.
---
opends/src/server/org/opends/server/backends/RootDSEBackend.java | 42 +++++++++++++++++++++++++++++++++++++++++-
1 files changed, 41 insertions(+), 1 deletions(-)
diff --git a/opends/src/server/org/opends/server/backends/RootDSEBackend.java b/opends/src/server/org/opends/server/backends/RootDSEBackend.java
index 8481001..cf82ccf 100644
--- a/opends/src/server/org/opends/server/backends/RootDSEBackend.java
+++ b/opends/src/server/org/opends/server/backends/RootDSEBackend.java
@@ -22,7 +22,7 @@
* CDDL HEADER END
*
*
- * Copyright 2006-2009 Sun Microsystems, Inc.
+ * Copyright 2006-2010 Sun Microsystems, Inc.
*/
package org.opends.server.backends;
@@ -797,6 +797,46 @@
/**
+ * Determines the workflow nodes which handle subordinate naming contexts.
+ * A workflow node is handling a subordinate naming context if the workflow
+ * base DN is in the list of the RootDSE subordinate naming contexts.
+ *
+ * @param nodes
+ * The list from which we search the workflow nodes which
+ * are handling subordinate naming contexts
+ *
+ * @return The list of workflow nodes that are handling subordinate
+ * naming contexts
+ */
+ public Iterable<WorkflowTopologyNode> getSubordinateNamingContexts(
+ Iterable<WorkflowTopologyNode> nodes)
+ {
+ // If the list of subordinate naming contexts is null
+ // then return the whole list of workflow nodes.
+ if (subordinateBaseDNs == null)
+ {
+ return nodes;
+ }
+
+ // The returned list of subordinate naming contexts
+ List<WorkflowTopologyNode> subNC = new ArrayList<WorkflowTopologyNode>();
+
+ // Determine which workflow node is handling a subordinate naming context.
+ for (WorkflowTopologyNode node : nodes)
+ {
+ DN dn = node.getBaseDN();
+ if (subordinateBaseDNs.containsKey(dn))
+ {
+ subNC.add(node);
+ }
+ }
+
+ return subNC;
+ }
+
+
+
+ /**
* }
* Creates an attribute for the root DSE with the following criteria.
*
--
Gitblit v1.10.0