public class SchemaUtil
extends java.lang.Object
This class allows the user to write generic code, using NDAP class and attribute names. The methods translate the name, if necessary, to the corresponding LDAP name.
The algorithm is: 1. Determine the namespace from the ObjectEntry parameter. If it's an NDS namespace, no further conversion is necessary.
2. Get the SchemaDefinition object from the ObjectEntry. If the class or attribute name is in the schema, just return it.
3. Try to look up the name in our local table. If there's an entry for it in our table, return the corresponding LDAP name.
4. Remove all colons and spaces from the name. In the majority of cases, this will produce the correct LDAP name.
5. If any characters were removed and the resulting 'cleansed' name is in the schema, add the entry to our local table and for fast lookup next time.
6. Return the cleansed name.
Note: [All Attribute Rights] and [Entry Rights] are returned unchanged (spaces are not removed). We do not translate [All Attribute Rights] to "any" since that only applies to NVDS and not eDirectory.
| Constructor and Description |
|---|
SchemaUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
FindUnescapedChar(char target,
java.lang.String str)
Finds the first unescaped occurence of the specified character.
|
static void |
putThisClassAndSubClassesIntoSet(java.lang.String className,
java.util.LinkedHashSet classSet,
SchemaDefinition classSchemaDef)
Recursively called routine called from getSubClassSearchExpression() for forming
the complete subClass search expression
Note that if the className is "Top" then subclasses are not expanded because
everything inherits from "Top".
|
static java.lang.String |
translateNDAPAttr(ObjectEntry oe,
java.lang.String ndapAttr) |
static java.lang.String |
translateNDAPClass(ObjectEntry oe,
java.lang.String ndapClass) |
public static java.lang.String translateNDAPClass(ObjectEntry oe, java.lang.String ndapClass)
public static java.lang.String translateNDAPAttr(ObjectEntry oe, java.lang.String ndapAttr)
public static void putThisClassAndSubClassesIntoSet(java.lang.String className,
java.util.LinkedHashSet classSet,
SchemaDefinition classSchemaDef)
public static int FindUnescapedChar(char target,
java.lang.String str)
target - The character to search for.str - The string to search
API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated ${TODAY} ${TSTAMP}.