com.unboundid.ldap.sdk.persist
Class DefaultOIDAllocator

java.lang.Object
  extended by com.unboundid.ldap.sdk.persist.OIDAllocator
      extended by com.unboundid.ldap.sdk.persist.DefaultOIDAllocator
All Implemented Interfaces:
java.io.Serializable

@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class DefaultOIDAllocator
extends OIDAllocator

This class provides an OID allocator implementation that will generate OIDs which are equal to the lowercase name of the associated attribute type or object class followed by "-oid". This will not result in an OID that is technically valid, but is accepted by several directory servers.

See Also:
Serialized Form

Method Summary
 java.lang.String allocateAttributeTypeOID(java.lang.String name)
          Allocates an OID for the attribute type with the specified name.
 java.lang.String allocateObjectClassOID(java.lang.String name)
          Allocates an OID for the object class with the specified name.
static DefaultOIDAllocator getInstance()
          Retrieves the singleton instance of this OID allocator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DefaultOIDAllocator getInstance()
Retrieves the singleton instance of this OID allocator.

Returns:
The singleton instance of this OID allocator.

allocateAttributeTypeOID

public java.lang.String allocateAttributeTypeOID(java.lang.String name)
Allocates an OID for the attribute type with the specified name.

Specified by:
allocateAttributeTypeOID in class OIDAllocator
Parameters:
name - The name of the attribute type for which to generate an OID. It must not be null or empty.
Returns:
The OID to use for the attribute type definition.

allocateObjectClassOID

public java.lang.String allocateObjectClassOID(java.lang.String name)
Allocates an OID for the object class with the specified name.

Specified by:
allocateObjectClassOID in class OIDAllocator
Parameters:
name - The name of the object class for which to generate an OID. It must not be null or empty.
Returns:
The OID to use for the object class definition.