From c2d0d212b510d8e82b9b123b4d06a80b835c8cd4 Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Fri, 06 Dec 2013 16:52:01 +0000
Subject: [PATCH] OpenDJ 3 : config framework

---
 opendj-admin/src/main/java/org/opends/server/config/ConfigEntry.java |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/opendj-admin/src/main/java/org/opends/server/config/ConfigEntry.java b/opendj-admin/src/main/java/org/opends/server/config/ConfigEntry.java
index a81424a..832668b 100644
--- a/opendj-admin/src/main/java/org/opends/server/config/ConfigEntry.java
+++ b/opendj-admin/src/main/java/org/opends/server/config/ConfigEntry.java
@@ -26,6 +26,7 @@
  */
 package org.opends.server.config;
 
+import java.util.Set;
 import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.forgerock.opendj.ldap.DN;
@@ -59,14 +60,17 @@
     /** The actual entry wrapped by this configuration entry. */
     private Entry entry;
 
+    private final ConfigurationRepository configRepository;
+
     /**
      * Creates a new config entry with the provided entry.
      *
      * @param entry
      *            The entry that will be encapsulated by this config entry.
      */
-    public ConfigEntry(Entry entry) {
+    public ConfigEntry(Entry entry, ConfigurationRepository configRepository) {
         this.entry = entry;
+        this.configRepository = configRepository;
         addListeners = new CopyOnWriteArrayList<ConfigAddListener>();
         changeListeners = new CopyOnWriteArrayList<ConfigChangeListener>();
         deleteListeners = new CopyOnWriteArrayList<ConfigDeleteListener>();
@@ -219,4 +223,13 @@
     public String toString() {
         return entry.getName().toNormalizedString();
     }
+
+    /**
+     * Retrieves the set of children associated with this configuration entry.
+     *
+     * @return  The set of children associated with this configuration entry.
+     */
+    public Set<DN> getChildren() {
+        return configRepository.getChildren(entry);
+    }
 }

--
Gitblit v1.10.0