@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class NameFormDefinition extends SchemaElement
Constructor and Description |
---|
NameFormDefinition(java.lang.String s)
Creates a new name form from the provided string representation.
|
NameFormDefinition(java.lang.String oid,
java.lang.String[] names,
java.lang.String description,
boolean isObsolete,
java.lang.String structuralClass,
java.lang.String[] requiredAttributes,
java.lang.String[] optionalAttributes,
java.util.Map<java.lang.String,java.lang.String[]> extensions)
Creates a new name form with the provided information.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is equal to this schema element.
|
java.lang.String |
getDescription()
Retrieves the description for this name form, if available.
|
java.util.Map<java.lang.String,java.lang.String[]> |
getExtensions()
Retrieves the set of extensions for this name form.
|
java.lang.String |
getNameOrOID()
Retrieves the primary name that can be used to reference this name form.
|
java.lang.String[] |
getNames()
Retrieves the set of names for this name form.
|
java.lang.String |
getOID()
Retrieves the OID for this name form.
|
java.lang.String[] |
getOptionalAttributes()
Retrieves the names or OIDs of the attributes that may optionally be
present in the RDN of entries with the associated structural object class.
|
java.lang.String[] |
getRequiredAttributes()
Retrieves the names or OIDs of the attributes that are required to be
present in the RDN of entries with the associated structural object class.
|
java.lang.String |
getStructuralClass()
Retrieves the name or OID of the structural object class associated with
this name form.
|
int |
hashCode()
Retrieves a hash code for this schema element.
|
boolean |
hasNameOrOID(java.lang.String s)
Indicates whether the provided string matches the OID or any of the names
for this name form.
|
boolean |
isObsolete()
Indicates whether this name form is declared obsolete.
|
java.lang.String |
toString()
Retrieves a string representation of this name form definition, in the
format described in RFC 4512 section 4.1.7.2.
|
extensionsEqual
public NameFormDefinition(java.lang.String s) throws LDAPException
s
- The string representation of the name form to create, using the
syntax described in RFC 4512 section 4.1.7.2. It must not be
null
.LDAPException
- If the provided string cannot be decoded as a name
form definition.public NameFormDefinition(java.lang.String oid, java.lang.String[] names, java.lang.String description, boolean isObsolete, java.lang.String structuralClass, java.lang.String[] requiredAttributes, java.lang.String[] optionalAttributes, java.util.Map<java.lang.String,java.lang.String[]> extensions)
oid
- The OID for this name form. It must not be
null
.names
- The set of names for this name form. It may
be null
or empty if the name form
should only be referenced by OID.description
- The description for this name form. It may be
null
if there is no description.isObsolete
- Indicates whether this name form is declared
obsolete.structuralClass
- The name or OID of the structural object class
with which this name form is associated. It
must not be null
.requiredAttributes
- The names/OIDs of the attributes which must be
present the RDN for entries with the associated
structural class. It must not be null
or empty.optionalAttributes
- The names/OIDs of the attributes which may
optionally be present in the RDN for entries
with the associated structural class. It may
be null
or emptyextensions
- The set of extensions for this name form. It
may be null
or empty if there should
not be any extensions.public java.lang.String getOID()
public java.lang.String[] getNames()
public java.lang.String getNameOrOID()
public boolean hasNameOrOID(java.lang.String s)
s
- The string for which to make the determination. It must not be
null
.true
if the provided string matches the OID or any of the
names for this name form, or false
if not.public java.lang.String getDescription()
null
if there is no
description defined.public boolean isObsolete()
true
if this name form is declared obsolete, or
false
if it is not.public java.lang.String getStructuralClass()
public java.lang.String[] getRequiredAttributes()
public java.lang.String[] getOptionalAttributes()
public java.util.Map<java.lang.String,java.lang.String[]> getExtensions()
public int hashCode()
hashCode
in class SchemaElement
public boolean equals(java.lang.Object o)
equals
in class SchemaElement
o
- The object for which to make the determination.true
if the provided object may be considered equal to
this schema element, or false
if not.public java.lang.String toString()
toString
in class SchemaElement