com.novell.admin.ns
Class SchemaUtil

java.lang.Object
  extended bycom.novell.admin.ns.SchemaUtil

public class SchemaUtil
extends java.lang.Object

Class to translate NDAP class and attribute names to the current protocol.

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.


Constructor Summary
SchemaUtil()
           
 
Method Summary
static java.lang.String translateNDAPAttr(ObjectEntry oe, java.lang.String ndapAttr)
           
static java.lang.String translateNDAPClass(ObjectEntry oe, java.lang.String ndapClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaUtil

public SchemaUtil()
Method Detail

translateNDAPAttr

public static java.lang.String translateNDAPAttr(ObjectEntry oe,
                                                 java.lang.String ndapAttr)

translateNDAPClass

public static java.lang.String translateNDAPClass(ObjectEntry oe,
                                                  java.lang.String ndapClass)


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 September 2 2004 0111.