Oracle® Mail Java API Reference
10g Release 1 (10.1.1)

B14492-01

oracle.mail.ldap
Class ESDSSchemaManager

java.lang.Object
  |
  +--oracle.mail.ldap.ESDSSchemaManager

public final class ESDSSchemaManager
extends java.lang.Object

This class queries, parses and caches the LDAP schema. This class is a singleton class, so there is exactly one instance of this class in a JVM. It provides the Schema Definition Methods. This caches schema based on the oid criteria specified in the oids.properties. It caches the standard defns and the ones specified in the properties file by default. At runtime if it gets a request for some definition that doesn't exist in cache, it throws an exception. If that's the case, the caller needs to add the criteria to the oids.properties file. Since all standard LDAP schema, and the Email/Um schema is cached by default this situation will not arise.


Method Summary
ESDSAttribMetaData getAttribMetaData(java.lang.String oid)
Gets the metadata associated with an attribute definition.
java.lang.String getAttributeMultiplicity(java.lang.String oid)
Returns the multiplicity of the attribute.
java.lang.String getAttributeSyntax(java.lang.String oid)
Returns the syntax of the attribute.
java.lang.String getAttributeType(java.lang.String oid)
Returns the syntax type of the attribute.
static ESDSSchemaManager getMgrInstance(ESDSContext context)
Gets the unique instance of this class.
static ESDSSchemaManager getMgrInstance(java.lang.String hostName, java.lang.String port)
Deprecated.
java.lang.String getName(java.lang.String oid)
Gets the name of an attribute from a given OID.
java.util.Vector getObjectClassMandatoryAttribs(java.lang.String oid)
Returns the name of the mandatory attributes of the objectclass.
java.util.Vector getObjectClassOptionalAttribs(java.lang.String oid)
Returns the name of the optional attributes of the object.
java.lang.String getOid(java.lang.String name)
Gets the OID of an attribute.
void printAllObjs()
void setDebug(boolean debug)

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getMgrInstance

public static ESDSSchemaManager getMgrInstance(ESDSContext context)
                                        throws ESDSException
Gets the unique instance of this class. This method is called when the handles from pool are used, and the schema is shared across the JVM
Parameters:
ESDSContext - an authenticated context
Returns:
ESDSSchemaManager instance

getMgrInstance

public static ESDSSchemaManager getMgrInstance(java.lang.String hostName,
                                               java.lang.String port)
Deprecated.
Gets the unique instance of this class.
Returns:
ESDSSchemaManager

setDebug

public void setDebug(boolean debug)

getAttribMetaData

public ESDSAttribMetaData getAttribMetaData(java.lang.String oid)
                                     throws ESDSException
Gets the metadata associated with an attribute definition.
Parameters:
oid - of attribute
Returns:
ESDSSAttribMetaData attribute definition
Throws:
ESDSException - Throws ESDSException with error code ESDSConstants.ESDSJ_NO_SUCH_SCHEMA_DEFINITION if definition is not present in cache/oid

getOid

public java.lang.String getOid(java.lang.String name)
                        throws ESDSException
Gets the OID of an attribute.
Parameters:
name - of attribute
Returns:
oid of attribute
Throws:
ESDSException - Throws ESDSException with error code ESDSConstants.ESDSJ_NO_SUCH_SCHEMA_DEFINITION if definition is not present in cache/oid

getName

public java.lang.String getName(java.lang.String oid)
                         throws ESDSException
Gets the name of an attribute from a given OID.
Parameters:
oid - of attribute
Returns:
name of attribute
Throws:
ESDSException - Throws ESDSException with error code ESDSConstants.ESDSJ_NO_SUCH_SCHEMA_DEFINITION if definition is not present in cache/oid

getAttributeSyntax

public java.lang.String getAttributeSyntax(java.lang.String oid)
                                    throws ESDSException
Returns the syntax of the attribute.
Parameters:
oid - The oid of the attribute
Returns:
the LDAP syntax
Throws:
ESDSException - Throws ESDSException with error code ESDSConstants.ESDSJ_NO_SUCH_SCHEMA_DEFINITION if definition is not present in cache/oid

printAllObjs

public void printAllObjs()

getAttributeType

public java.lang.String getAttributeType(java.lang.String oid)
                                  throws ESDSException
Returns the syntax type of the attribute.
Parameters:
oid - The oid of the attribute
Returns:
String, the syntax type, String, int or byte
Throws:
ESDSException - Throws ESDSException with error code ESDSConstants.ESDSJ_NO_SUCH_SCHEMA_DEFINITION if definition is not present in cache/oid

getAttributeMultiplicity

public java.lang.String getAttributeMultiplicity(java.lang.String oid)
                                          throws ESDSException
Returns the multiplicity of the attribute.
Parameters:
oid - The oid of the attribute
Returns:
The multiplicity of attribute, SINGLE/MULTIPLE
Throws:
ESDSException - Throws ESDSException with error code ESDSConstants.ESDSJ_NO_SUCH_SCHEMA_DEFINITION if definition is not present in cache/oid

getObjectClassMandatoryAttribs

public java.util.Vector getObjectClassMandatoryAttribs(java.lang.String oid)
                                                throws ESDSException
Returns the name of the mandatory attributes of the objectclass.
Parameters:
oid - The oid of the objectclass
Returns:
the name of the mandatory attributes of the objectclass as an Vector of Strings
Throws:
ESDSException - Throws ESDSException with error code ESDSConstants.ESDSJ_NO_SUCH_SCHEMA_DEFINITION if definition is not present in cache/oid

getObjectClassOptionalAttribs

public java.util.Vector getObjectClassOptionalAttribs(java.lang.String oid)
                                               throws ESDSException
Returns the name of the optional attributes of the object.
Parameters:
oid - The oid of the objectclass
Returns:
the name of the optional attributes of the objectclass as an Vector of Strings
Throws:
ESDSException - Throws ESDSException with error code ESDSConstants.ESDSJ_NO_SUCH_SCHEMA_DEFINITION if definition is not present in cache/oid

Oracle® Mail Java API Reference
10g Release 1 (10.1.1)

B14492-01

Copyright © 1988, 2005, Oracle. All rights reserved.