|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.types.RDN
@PublicAPI(stability=UNCOMMITTED, mayInstantiate=true, mayExtend=false, mayInvoke=true) public final class RDN
This class defines a data structure for storing and interacting with the relative distinguished names associated with entries in the Directory Server.
Constructor Summary | |
---|---|
RDN(AttributeType[] attributeTypes,
java.lang.String[] attributeNames,
AttributeValue[] attributeValues)
Creates a new RDN with the provided information. |
|
RDN(AttributeType attributeType,
AttributeValue attributeValue)
Creates a new RDN with the provided information. |
|
RDN(AttributeType attributeType,
java.lang.String attributeName,
AttributeValue attributeValue)
Creates a new RDN with the provided information. |
|
RDN(java.util.List<AttributeType> attributeTypes,
java.util.List<java.lang.String> attributeNames,
java.util.List<AttributeValue> attributeValues)
Creates a new RDN with the provided information. |
Method Summary | |
---|---|
int |
compareTo(RDN rdn)
Compares this RDN with the provided RDN based on an alphabetic comparison of the attribute names and values. |
static RDN |
create(AttributeType attributeType,
AttributeValue attributeValue)
Creates a new RDN with the provided information. |
static RDN |
decode(java.lang.String rdnString)
Decodes the provided string as an RDN. |
RDN |
duplicate()
Creates a duplicate of this RDN that can be modified without impacting this RDN. |
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is equal to this RDN. |
java.lang.String |
getAttributeName(int pos)
Retrieves the name for the attribute type at the specified position in the set of attribute types for this RDN. |
AttributeType |
getAttributeType(int pos)
Retrieves the attribute type at the specified position in the set of attribute types for this RDN. |
AttributeValue |
getAttributeValue(AttributeType attributeType)
Retrieves the attribute value that is associated with the specified attribute type. |
AttributeValue |
getAttributeValue(int pos)
Retrieves the value for the attribute type at the specified position in the set of attribute types for this RDN. |
int |
getNumValues()
Retrieves the number of attribute-value pairs contained in this RDN. |
boolean |
hasAttributeType(AttributeType attributeType)
Indicates whether this RDN includes the specified attribute type. |
boolean |
hasAttributeType(java.lang.String lowerName)
Indicates whether this RDN includes the specified attribute type. |
int |
hashCode()
Retrieves the hash code for this RDN. |
boolean |
hasValue(AttributeType type,
AttributeValue value)
Indicates whether this RDN contains the specified type-value pair. |
boolean |
isMultiValued()
Indicates whether this RDN is multivalued. |
java.lang.String |
toNormalizedString()
Retrieves a normalized string representation of this RDN. |
void |
toNormalizedString(java.lang.StringBuilder buffer)
Appends a normalized string representation of this RDN to the provided buffer. |
java.lang.String |
toString()
Retrieves a string representation of this RDN. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this RDN to the provided buffer. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RDN(AttributeType attributeType, AttributeValue attributeValue)
attributeType
- The attribute type for this RDN. It must
not be null
.attributeValue
- The value for this RDN. It must not be
null
.public RDN(AttributeType attributeType, java.lang.String attributeName, AttributeValue attributeValue)
attributeType
- The attribute type for this RDN. It must
not be null
.attributeName
- The user-provided name for this RDN. It
must not be null
.attributeValue
- The value for this RDN. It must not be
null
.public RDN(java.util.List<AttributeType> attributeTypes, java.util.List<java.lang.String> attributeNames, java.util.List<AttributeValue> attributeValues)
attributeTypes
- The set of attribute types for this RDN.
It must not be empty or null
.attributeNames
- The set of user-provided names for this
RDN. It must have the same number of
elements as the attributeTypes
argument.attributeValues
- The set of values for this RDN. It must
have the same number of elements as the
attributeTypes
argument.public RDN(AttributeType[] attributeTypes, java.lang.String[] attributeNames, AttributeValue[] attributeValues)
attributeTypes
- The set of attribute types for this RDN.
It must not be empty or null
.attributeNames
- The set of user-provided names for this
RDN. It must have the same number of
elements as the attributeTypes
argument.attributeValues
- The set of values for this RDN. It must
have the same number of elements as the
attributeTypes
argument.Method Detail |
---|
public static RDN create(AttributeType attributeType, AttributeValue attributeValue)
attributeType
- The attribute type for this RDN. It must
not be null
.attributeValue
- The value for this RDN. It must not be
null
.
public int getNumValues()
public boolean hasAttributeType(AttributeType attributeType)
attributeType
- The attribute type for which to make the
determination.
true
if the RDN includes the specified
attribute type, or false
if not.public boolean hasAttributeType(java.lang.String lowerName)
lowerName
- The name or OID for the attribute type for
which to make the determination, formatted in
all lowercase characters.
true
if the RDN includes the specified
attribute type, or false
if not.public AttributeType getAttributeType(int pos)
pos
- The position of the attribute type to retrieve.
public java.lang.String getAttributeName(int pos)
pos
- The position of the attribute type for which to
retrieve the name.
public AttributeValue getAttributeValue(AttributeType attributeType)
attributeType
- The attribute type for which to retrieve
the corresponding value.
null
if the specified attribute type is not
present in the RDN.public AttributeValue getAttributeValue(int pos)
pos
- The position of the attribute type for which to
retrieve the value.
public boolean isMultiValued()
true
if this RDN is multivalued, or
false
if not.public boolean hasValue(AttributeType type, AttributeValue value)
type
- The attribute type for which to make the
determination.value
- The value for which to make the determination.
true
if this RDN contains the specified
attribute value, or false
if not.public static RDN decode(java.lang.String rdnString) throws DirectoryException
rdnString
- The string to decode as an RDN.
DirectoryException
- If a problem occurs while trying to decode the provided
string as a RDN.public RDN duplicate()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The object for which to make the determination.
true
if it is determined that the provided
object is equal to this RDN, or false
if
not.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which the string representation
should be appended.public java.lang.String toNormalizedString()
public void toNormalizedString(java.lang.StringBuilder buffer)
buffer
- The buffer to which to append the information.public int compareTo(RDN rdn)
compareTo
in interface java.lang.Comparable<RDN>
rdn
- The RDN against which to compare this RDN.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |