Package com.unboundid.ldap.sdk.persist
Class DefaultOIDAllocator
- java.lang.Object
-
- com.unboundid.ldap.sdk.persist.OIDAllocator
-
- 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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 classOIDAllocator
- Parameters:
name
- The name of the attribute type for which to generate an OID. It must not benull
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 classOIDAllocator
- Parameters:
name
- The name of the object class for which to generate an OID. It must not benull
or empty.- Returns:
- The OID to use for the object class definition.
-
-