|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.novell.ldap.util.DN
A DN encapsulates a Distinguished Name (an ldap name with context). A DN does not need to be fully distinguished, or extend to the Root of a directory. It provides methods to get information about the DN and to manipulate the DN.
The following are examples of valid DN:
Note: Multivalued attributes are all considered to be one component and are represented in one RDN (see RDN)
RDN
Constructor Summary | |
DN()
|
|
DN(java.lang.String dnString)
Constructs a new DN based on the specified string representation of a distinguished name. |
Method Summary | |
void |
addRDN(RDN rdn)
Adds the RDN to the beginning of the current DN. |
void |
addRDNToBack(RDN rdn)
Adds the RDN to the end of the current DN |
void |
addRDNToFront(RDN rdn)
Adds the RDN to the beginning of the current DN. |
int |
countRDNs()
Retrieves the count of RDNs, or individule names, in the Distinguished name |
boolean |
equals(DN toDN)
Compares this DN to the specified DN to determine if they are equal. |
java.lang.String[] |
explodeDN(boolean noTypes)
return a string array of the individual RDNs contained in the DN |
DN |
getParent()
Returns the Parent of this DN |
java.util.Vector |
getRDNs()
Retrieves a list of RDN Objects, or individual names of the DN |
boolean |
isDescendantOf(DN containerDN)
Determines if this DN is contained by the DN passed in. |
java.lang.String |
toString()
Creates and returns a string that represents this DN. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public DN()
public DN(java.lang.String dnString)
dnString
- a string representation of the distinguished name
java.lang.IllegalArgumentException
- if the the value of the dnString
parameter does not adhere to the syntax described in
RFC 2253Method Detail |
public java.lang.String toString()
public boolean equals(DN toDN)
toDN
- the DN to compare to
true
if the DNs are equal; otherwise
false
public java.lang.String[] explodeDN(boolean noTypes)
noTypes
- If true, returns only the values of the
components, and not the names, e.g. "Babs
Jensen", "Accounting", "Acme", "us" - instead of
"cn=Babs Jensen", "ou=Accounting", "o=Acme", and
"c=us".
String[]
containing the rdns in the DN with
the leftmost rdn in the first element of the arraypublic int countRDNs()
public java.util.Vector getRDNs()
public boolean isDescendantOf(DN containerDN)
containerDN
- of a container
public DN getParent()
public void addRDN(RDN rdn)
rdn
- an RDN to be addedpublic void addRDNToFront(RDN rdn)
rdn
- an RDN to be addedpublic void addRDNToBack(RDN rdn)
rdn
- an RDN to be added
|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |