|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opends.server.types.DN
org.opends.server.interop.LazyDN
@PublicAPI(stability=UNCOMMITTED,
mayInstantiate=true,
mayExtend=false,
mayInvoke=true,
notes="This is only intended for use if a DN will ever only be treated as a string and will not be transferred or processed in any way.")
public class LazyDN
This class provides an implementation of a DN which is lazily
initialized. It may be created using only a string representation and no
decoding will be performed as long as only the string representation is
accessed. If any methods are called which require the decoded DN, this class
will attempt to decode the DN string as a DN and then invoke the
corresponding method on the decoded version. If any error occurs while
trying to decode the provided string as a DN, then a RuntimeException
will be thrown.
Note that this implementation is only intended for use in cases in which the
DN is only needed as a string representation (in particular, only the
toString methods will be used). For cases in which any other methods
will need to be invoked on the object, the org.opends.server.types.DN
class should be used instead.
| Field Summary |
|---|
| Fields inherited from class org.opends.server.types.DN |
|---|
NULL_DN |
| Constructor Summary | |
|---|---|
LazyDN(java.lang.String dnString)
Creates a new lazily-initialized DN with the provided string representation. |
|
| Method Summary | |
|---|---|
int |
compareTo(DN dn)
Compares this DN with the provided DN based on a natural order. |
DN |
concat(DN relativeBaseDN)
Creates a new DN that is a descendant of this DN, using the specified DN as a relative base DN. |
DN |
concat(RDN rdn)
Creates a new DN that is a child of this DN, using the specified RDN. |
DN |
concat(RDN[] rdnComponents)
Creates a new DN that is a descendant of this DN, using the specified RDN components. |
boolean |
equals(java.lang.Object o)
Indicates whether the provided object is equal to this DN. |
int |
getNumComponents()
Retrieves the number of RDN components for this DN. |
DN |
getParent()
Retrieves the DN of the entry that is the immediate parent for this entry. |
DN |
getParentDNInSuffix()
Retrieves the DN of the entry that is the immediate parent for this entry. |
RDN |
getRDN()
Retrieves the outermost RDN component for this DN (i.e., the one that is furthest from the suffix). |
RDN |
getRDN(int pos)
Retrieves the RDN component at the specified position in the set of components for this DN. |
int |
hashCode()
Retrieves the hash code for this DN. |
boolean |
isAncestorOf(DN dn)
Indicates whether this DN is an ancestor of the provided DN (i.e., that the RDN components of this DN are the same as the last RDN components for the provided DN). |
boolean |
isDescendantOf(DN dn)
Indicates whether this DN is a descendant of the provided DN (i.e., that the RDN components of the provided DN are the same as the last RDN components for this DN). |
boolean |
isNullDN()
Indicates whether this represents a null DN. |
boolean |
matchesBaseAndScope(DN baseDN,
SearchScope scope)
Indicates whether this entry falls within the range of the provided search base DN and scope. |
java.lang.String |
toNormalizedString()
Retrieves a normalized string representation of this DN. |
void |
toNormalizedString(java.lang.StringBuilder buffer)
Appends a normalized string representation of this DN to the provided buffer. |
java.lang.String |
toString()
Retrieves a string representation of this DN. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this DN to the provided buffer. |
| Methods inherited from class org.opends.server.types.DN |
|---|
decode, decode, nullDN |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LazyDN(java.lang.String dnString)
dnString - The string representation to use for this
lazily-initialized DN.| Method Detail |
|---|
public boolean isNullDN()
throws java.lang.RuntimeException
isNullDN in class DNtrue if this does represent a null DN, or
false if it does not.
java.lang.RuntimeException
public int getNumComponents()
throws java.lang.RuntimeException
getNumComponents in class DNjava.lang.RuntimeException
public RDN getRDN()
throws java.lang.RuntimeException
getRDN in class DNnull if there are no RDN components in the
DN.
java.lang.RuntimeException
public RDN getRDN(int pos)
throws java.lang.RuntimeException
getRDN in class DNpos - The position of the RDN component to retrieve.
java.lang.RuntimeException
public DN getParent()
throws java.lang.RuntimeException
getParent in class DNnull if the entry with this
DN does not have a parent.
java.lang.RuntimeException
public DN getParentDNInSuffix()
throws java.lang.RuntimeException
getParentDNInSuffix in class DNnull if the entry with this
DN does not have a parent (either because there is only
a single RDN component or because this DN is a suffix
defined in the server).
java.lang.RuntimeException
public DN concat(RDN rdn)
throws java.lang.RuntimeException
concat in class DNrdn - The RDN for the child of this DN.
java.lang.RuntimeException
public DN concat(RDN[] rdnComponents)
throws java.lang.RuntimeException
concat in class DNrdnComponents - The RDN components for the descendant of
this DN.
java.lang.RuntimeException
public DN concat(DN relativeBaseDN)
throws java.lang.RuntimeException
concat in class DNrelativeBaseDN - The relative base DN to concatenate onto
this DN.
java.lang.RuntimeException
public boolean isDescendantOf(DN dn)
throws java.lang.RuntimeException
isDescendantOf in class DNdn - The DN for which to make the determination.
true if this DN is a descendant of the
provided DN, or false if not.
java.lang.RuntimeException
public boolean isAncestorOf(DN dn)
throws java.lang.RuntimeException
isAncestorOf in class DNdn - The DN for which to make the determination.
true if this DN is an ancestor of the
provided DN, or false if not.
java.lang.RuntimeException
public boolean matchesBaseAndScope(DN baseDN,
SearchScope scope)
throws java.lang.RuntimeException
matchesBaseAndScope in class DNbaseDN - The base DN for which to make the determination.scope - The search scope for which to make the
determination.
true if this entry is within the given
base and scope, or false if it is not.
java.lang.RuntimeException
public boolean equals(java.lang.Object o)
throws java.lang.RuntimeException
equals in class DNo - The object for which to make the determination.
true if the provided object is a DN that is
equal to this DN, or false if it is not.
java.lang.RuntimeException
public int hashCode()
throws java.lang.RuntimeException
hashCode in class DNjava.lang.RuntimeExceptionpublic java.lang.String toString()
toString in class DNpublic void toString(java.lang.StringBuilder buffer)
toString in class DNbuffer - The buffer to which the information should be
appended.
public java.lang.String toNormalizedString()
throws java.lang.RuntimeException
toNormalizedString in class DNjava.lang.RuntimeException
public void toNormalizedString(java.lang.StringBuilder buffer)
throws java.lang.RuntimeException
toNormalizedString in class DNbuffer - The buffer to which the information should be
appended.
java.lang.RuntimeException
public int compareTo(DN dn)
throws java.lang.RuntimeException
compareTo in interface java.lang.Comparable<DN>compareTo in class DNdn - The DN against which to compare this DN.
java.lang.RuntimeException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||