@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class AttributeTypeDefinition extends SchemaElement
Constructor and Description |
---|
AttributeTypeDefinition(java.lang.String s)
Creates a new attribute type from the provided string representation.
|
AttributeTypeDefinition(java.lang.String oid,
java.lang.String[] names,
java.lang.String description,
boolean isObsolete,
java.lang.String superiorType,
java.lang.String equalityMatchingRule,
java.lang.String orderingMatchingRule,
java.lang.String substringMatchingRule,
java.lang.String syntaxOID,
boolean isSingleValued,
boolean isCollective,
boolean isNoUserModification,
AttributeUsage usage,
java.util.Map<java.lang.String,java.lang.String[]> extensions)
Creates a new attribute type 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 |
getBaseSyntaxOID()
Retrieves the OID of the syntax for this attribute type, if available.
|
java.lang.String |
getBaseSyntaxOID(Schema schema)
Retrieves the base OID of the syntax for this attribute type, examining
superior types if necessary.
|
static java.lang.String |
getBaseSyntaxOID(java.lang.String syntaxOID)
Retrieves the base OID of the syntax for this attribute type, examining
superior types if necessary.
|
java.lang.String |
getDescription()
Retrieves the description for this attribute type, if available.
|
java.lang.String |
getEqualityMatchingRule()
Retrieves the name or OID of the equality matching rule for this attribute
type, if available.
|
java.lang.String |
getEqualityMatchingRule(Schema schema)
Retrieves the name or OID of the equality matching rule for this attribute
type, examining superior attribute types if necessary.
|
java.util.Map<java.lang.String,java.lang.String[]> |
getExtensions()
Retrieves the set of extensions for this attribute type.
|
java.lang.String |
getNameOrOID()
Retrieves the primary name that can be used to reference this attribute
type.
|
java.lang.String[] |
getNames()
Retrieves the set of names for this attribute type.
|
java.lang.String |
getOID()
Retrieves the OID for this attribute type.
|
java.lang.String |
getOrderingMatchingRule()
Retrieves the name or OID of the ordering matching rule for this attribute
type, if available.
|
java.lang.String |
getOrderingMatchingRule(Schema schema)
Retrieves the name or OID of the ordering matching rule for this attribute
type, examining superior attribute types if necessary.
|
java.lang.String |
getSubstringMatchingRule()
Retrieves the name or OID of the substring matching rule for this attribute
type, if available.
|
java.lang.String |
getSubstringMatchingRule(Schema schema)
Retrieves the name or OID of the substring matching rule for this attribute
type, examining superior attribute types if necessary.
|
java.lang.String |
getSuperiorType()
Retrieves the name or OID of the superior type for this attribute type, if
available.
|
AttributeTypeDefinition |
getSuperiorType(Schema schema)
Retrieves the superior attribute type definition for this attribute type,
if available.
|
int |
getSyntaxMinimumUpperBound()
Retrieves the value of the minimum upper bound element of the syntax
definition for this attribute type, if defined.
|
int |
getSyntaxMinimumUpperBound(Schema schema)
Retrieves the value of the minimum upper bound element of the syntax
definition for this attribute type, if defined.
|
static int |
getSyntaxMinimumUpperBound(java.lang.String syntaxOID)
Retrieves the value of the minimum upper bound element of the syntax
definition for this attribute type, if defined.
|
java.lang.String |
getSyntaxOID()
Retrieves the OID of the syntax for this attribute type, if available.
|
java.lang.String |
getSyntaxOID(Schema schema)
Retrieves the OID of the syntax for this attribute type, examining superior
types if necessary.
|
AttributeUsage |
getUsage()
Retrieves the attribute usage for this attribute type.
|
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 attribute type.
|
boolean |
isCollective()
Indicates whether this attribute type is declared collective, and therefore
values may be dynamically generated as described in RFC 3671.
|
boolean |
isNoUserModification()
Indicates whether this attribute type is declared no-user-modification,
and therefore attributes of this type will not be allowed to be altered
by clients.
|
boolean |
isObsolete()
Indicates whether this attribute type is declared obsolete.
|
boolean |
isOperational()
Indicates whether this attribute type has an operational attribute usage.
|
boolean |
isSingleValued()
Indicates whether this attribute type is declared single-valued, and
therefore attributes of this type will only be allowed to have at most one
value.
|
java.lang.String |
toString()
Retrieves a string representation of this attribute type definition, in the
format described in RFC 4512 section 4.1.2.
|
extensionsEqual
public AttributeTypeDefinition(java.lang.String s) throws LDAPException
s
- The string representation of the attribute type to create, using
the syntax described in RFC 4512 section 4.1.2. It must not be
null
.LDAPException
- If the provided string cannot be decoded as an
attribute type definition.public AttributeTypeDefinition(java.lang.String oid, java.lang.String[] names, java.lang.String description, boolean isObsolete, java.lang.String superiorType, java.lang.String equalityMatchingRule, java.lang.String orderingMatchingRule, java.lang.String substringMatchingRule, java.lang.String syntaxOID, boolean isSingleValued, boolean isCollective, boolean isNoUserModification, AttributeUsage usage, java.util.Map<java.lang.String,java.lang.String[]> extensions)
oid
- The OID for this attribute type. It must
not be null
.names
- The set of names for this attribute type.
It may be null
or empty if the
attribute type should only be referenced by
OID.description
- The description for this attribute type. It
may be null
if there is no
description.isObsolete
- Indicates whether this attribute type is
declared obsolete.superiorType
- The name or OID of the superior attribute
type. It may be null
if there is no
superior type.equalityMatchingRule
- The name or OID of the equality matching
rule for this attribute type. It may be
null
if a default rule is to be
inherited.orderingMatchingRule
- The name or OID of the ordering matching
rule for this attribute type. It may be
null
if a default rule is to be
inherited.substringMatchingRule
- The name or OID of the substring matching
rule for this attribute type. It may be
null
if a default rule is to be
inherited.syntaxOID
- The syntax OID for this attribute type. It
may be null
if a default syntax is
to be inherited.isSingleValued
- Indicates whether attributes of this type
are only allowed to have a single value.isCollective
- Indicates whether this attribute type should
be considered collective.isNoUserModification
- Indicates whether clients should be allowed
to modify attributes of this type.usage
- The attribute usage for this attribute type.
It may be null
if the default usage
of userApplications is to be used.extensions
- The set of extensions for this attribute
type. 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 attribute type, or false
if not.public java.lang.String getDescription()
null
if there
is no description defined.public boolean isObsolete()
true
if this attribute type is declared obsolete, or
false
if it is not.public java.lang.String getSuperiorType()
null
if no superior type is defined.public AttributeTypeDefinition getSuperiorType(Schema schema)
schema
- The schema to use to get the superior attribute type.null
if no superior type is defined, or if the superior
type is not included in the provided schema.public java.lang.String getEqualityMatchingRule()
null
if no equality matching rule is defined or a
default rule will be inherited.public java.lang.String getEqualityMatchingRule(Schema schema)
schema
- The schema to use to get the superior attribute type.null
if no equality matching rule is defined.public java.lang.String getOrderingMatchingRule()
null
if no ordering matching rule is defined or a
default rule will be inherited.public java.lang.String getOrderingMatchingRule(Schema schema)
schema
- The schema to use to get the superior attribute type.null
if no ordering matching rule is defined.public java.lang.String getSubstringMatchingRule()
null
if no substring matching rule is defined or
a default rule will be inherited.public java.lang.String getSubstringMatchingRule(Schema schema)
schema
- The schema to use to get the superior attribute type.null
if no substring matching rule is defined.public java.lang.String getSyntaxOID()
null
if
the syntax will be inherited.public java.lang.String getSyntaxOID(Schema schema)
schema
- The schema to use to get the superior attribute type.null
if
no syntax is defined.public java.lang.String getBaseSyntaxOID()
null
if
the syntax will be inherited.public java.lang.String getBaseSyntaxOID(Schema schema)
schema
- The schema to use to get the superior attribute type, if
necessary.null
if
no syntax is defined.public static java.lang.String getBaseSyntaxOID(java.lang.String syntaxOID)
syntaxOID
- The syntax OID (optionally including the minimum upper
bound element) to examine.null
if
no syntax is defined.public int getSyntaxMinimumUpperBound()
public int getSyntaxMinimumUpperBound(Schema schema)
schema
- The schema to use to get the superior attribute type, if
necessary.public static int getSyntaxMinimumUpperBound(java.lang.String syntaxOID)
syntaxOID
- The syntax OID (optionally including the minimum upper
bound element) to examine.null
or
does not have a valid minimum upper bound.public boolean isSingleValued()
true
if this attribute type is declared single-valued, or
false
if not.public boolean isCollective()
true
if this attribute type is declared collective, or
false
if not.public boolean isNoUserModification()
true
if this attribute type is declared
no-user-modification, or false
if not.public AttributeUsage getUsage()
public boolean isOperational()
true
if this attribute type has an operational attribute
usage, or false
if not.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