|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pf.directory.DistinguishedName
Contains a normalized form of a distinguished name that allows comparison.
| Field Summary | |
static DistinguishedName |
EMPTY_DN
This is a special DN with an empty string as name and no elements at all |
| Constructor Summary | |
DistinguishedName(java.lang.String dn)
Initialize the new instance with a DN. |
|
| Method Summary | |
boolean |
equals(java.lang.Object obj)
|
DistinguishedName |
getParent()
Returns the parent DN of this DN or EMPTY_DN if this DN has no parent. |
DistinguishedNameElement[] |
getParts()
Returns a copy of the parts that build this DN. |
DistinguishedNameElement[] |
getPartsWithout(int skip)
Returns a copy of the parts that build this DN without the number of elements given by the parameter. |
DistinguishedNameElement |
getRDN()
Returns the relative distinguished name (i.e. the left most element) of this distinguished name. |
int |
hashCode()
|
boolean |
isDirectParentOf(DistinguishedName dn)
Returns true if the this distinguished name represents an object that is the direct parent of the given dn in the DIT. |
static boolean |
isDistinguishedName(java.lang.String name)
Returns true if the given name is a valid distinguished name. |
boolean |
isEmptyDN()
Returns true if this object is the empty DN (i.e. the object specified by constant EMPTY_DN). |
boolean |
isEqual(java.lang.String dn)
Returns true if the given dn is equal to this distinguished name after normalization |
boolean |
isParentOf(DistinguishedName dn)
Returns true if the this distinguished name represents an object that is logically a parent of the given dn in the DIT. |
static boolean |
looksLikeDistinguishedName(java.lang.String name)
Returns true if the given name could be a distinguished (rather than a uid or a common name). |
DistinguishedName |
makeChild(DistinguishedNameElement rdn)
Returns the new distinguished name that represents a child of this DN. |
int |
partCount()
Returns how many parts this DN consists of |
java.lang.String |
toString()
Returns the DN as string where all elements are separated by comma (',') without leading or trailing blanks. |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final DistinguishedName EMPTY_DN
| Constructor Detail |
public DistinguishedName(java.lang.String dn)
dn - The DN that is internally used by the new instance (must not be null)
java.lang.IllegalArgumentException - If the given DN is null or blank| Method Detail |
public static boolean looksLikeDistinguishedName(java.lang.String name)
public static boolean isDistinguishedName(java.lang.String name)
public java.lang.String toString()
public boolean equals(java.lang.Object obj)
public int hashCode()
public boolean isEqual(java.lang.String dn)
public boolean isEmptyDN()
public boolean isParentOf(DistinguishedName dn)
Be aware that the EMPTY_DN is NOT parent of any other DN and therefore always returns false here.
dn - The DN to be checked.isDirectParentOf(DistinguishedName)public boolean isDirectParentOf(DistinguishedName dn)
dn - The DN to be checked.public DistinguishedNameElement[] getParts()
public DistinguishedNameElement[] getPartsWithout(int skip)
skip - defines how many parts from the right not to returnpublic DistinguishedNameElement getRDN()
public int partCount()
public DistinguishedName getParent()
public DistinguishedName makeChild(DistinguishedNameElement rdn)
rdn - The relative distinguished name to be added as child element
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||