|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.DnParser
public final class DnParser
Parses DNs following the rules in RFC 4514. Attempts to be as generous as possible in the format of allowed DNs.
| Method Summary | |
|---|---|
static List<LdapAttribute> |
convertDnToAttributes(String dn)
Parses the supplied DN and converts each RDN into a LdapAttribute. |
protected static byte[] |
decodeHexValue(char[] value)
Decodes the supplied hexadecimal value. |
protected static String |
decodeStringValue(String value)
Decodes the supplied string attribute value. |
static String |
getValue(String dn,
String name)
Returns the RDN value for the attribute type with the supplied name. |
static Collection<String> |
getValues(String dn,
String name)
Returns the RDN values for the attribute type with the supplied name. |
static String |
substring(String dn,
int beginIndex)
Returns a string representation of the supplied DN beginning at the supplied index. |
static String |
substring(String dn,
int beginIndex,
int endIndex)
Returns a string representation of the supplied DN beginning at beginIndex (inclusive) and ending at endIndex (exclusive). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Collection<String> getValues(String dn,
String name)
dn - to parsename - of the attribute type to return values for
public static String getValue(String dn,
String name)
dn - to parsename - of the attribute to return value for
public static String substring(String dn,
int beginIndex)
dn - to parsebeginIndex - index of first RDN to include in the result in the
range [0, N-1] where N is the number of elements in
the DN
IndexOutOfBoundsException - if beginIndex is less than 0 or greater
than the number of RDNs
public static String substring(String dn,
int beginIndex,
int endIndex)
dn - to parsebeginIndex - index of first RDN to include in the result in the
range [0, N-2] where N is the number of elements in
the DNendIndex - index of last RDN to include in the result in the range
[1, N-1] where N is the number of elements in the RDN
IndexOutOfBoundsException - if beginIndex is less than 0, if
beginIndex is greater than endIndex, or endIndex is greater than the
number of RDNspublic static List<LdapAttribute> convertDnToAttributes(String dn)
LdapAttribute.
dn - to parse
protected static byte[] decodeHexValue(char[] value)
value - hex to decode
protected static String decodeStringValue(String value)
value - to decode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||