From e5783d9d5e678cb4b8d69d98162c26d2858bbe33 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Thu, 25 Jan 2007 01:59:52 +0000
Subject: [PATCH] Make a number of updates to schema processing, all of which fall under the umbrella of issue #1163. The individual issues addressed include:
---
opends/src/server/org/opends/server/core/DirectoryServer.java | 36 +++++++++++++++++++++++++++++++++++-
1 files changed, 35 insertions(+), 1 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/DirectoryServer.java b/opends/src/server/org/opends/server/core/DirectoryServer.java
index 280134a..d4654fd 100644
--- a/opends/src/server/org/opends/server/core/DirectoryServer.java
+++ b/opends/src/server/org/opends/server/core/DirectoryServer.java
@@ -2952,7 +2952,41 @@
objectClass = new ObjectClass(definition, name,
Collections.singleton(name), oid, null,
getTopObjectClass(), null, null,
- ObjectClassType.ABSTRACT, false, null);
+ ObjectClassType.STRUCTURAL, false, null);
+ }
+
+ return objectClass;
+ }
+
+
+
+ /**
+ * Causes the Directory Server to construct a new auxiliary objectclass
+ * definition with the provided name and with no required or allowed
+ * attributes. This should only be used if there is no objectclass for the
+ * specified name. It will not register the created objectclass with the
+ * Directory Server.
+ *
+ * @param name The name to use for the objectclass, as provided by the user.
+ *
+ * @return The constructed objectclass definition.
+ */
+ public static ObjectClass getDefaultAuxiliaryObjectClass(String name)
+ {
+ assert debugEnter(CLASS_NAME, "getDefaultObjectClass",
+ String.valueOf(name));
+
+ String lowerName = toLowerCase(name);
+ ObjectClass objectClass = directoryServer.schema.getObjectClass(lowerName);
+ if (objectClass == null)
+ {
+ String oid = lowerName + "-oid";
+ String definition = "( " + oid + " NAME '" + name + "' ABSTRACT )";
+
+ objectClass = new ObjectClass(definition, name,
+ Collections.singleton(name), oid, null,
+ getTopObjectClass(), null, null,
+ ObjectClassType.AUXILIARY, false, null);
}
return objectClass;
--
Gitblit v1.10.0