From 5d6e9428fedead57a9c9438cebe58b485ff476d2 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 14 Sep 2007 10:22:17 +0000
Subject: [PATCH] Avoid managed object definition initialization dependency problems. Using features like inherited default values and aggregation properties it is quite straightforward to encounter initialization dependency problems. For example: the global configuration will contain an aggregation property which references the default password policy. This aggregation definition is defined using a managed object path which, when decoded, contains a reference to the root configuration and its "password-policy" relation. This is what happens during initialization of the root configuration:

---
 opends/src/server/org/opends/server/admin/PropertyDefinition.java |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/opends/src/server/org/opends/server/admin/PropertyDefinition.java b/opends/src/server/org/opends/server/admin/PropertyDefinition.java
index fe7c856..dec0715 100644
--- a/opends/src/server/org/opends/server/admin/PropertyDefinition.java
+++ b/opends/src/server/org/opends/server/admin/PropertyDefinition.java
@@ -26,7 +26,6 @@
  */
 
 package org.opends.server.admin;
-import org.opends.messages.Message;
 
 
 
@@ -38,6 +37,8 @@
 import java.util.MissingResourceException;
 import java.util.Set;
 
+import org.opends.messages.Message;
+
 
 
 /**
@@ -661,4 +662,18 @@
    */
   public abstract void validateValue(T value)
       throws IllegalPropertyValueException;
+
+
+
+  /**
+   * Performs any run-time initialization required by this property
+   * definition. This may include resolving managed object paths and
+   * property names.
+   *
+   * @throws Exception
+   *           If this property definition could not be initialized.
+   */
+  protected void initialize() throws Exception {
+    // No implementation required.
+  }
 }

--
Gitblit v1.10.0