public enum DnParser extends Enum<DnParser>
- <distinguishedName> ::= <name> | e
- <name> ::=
<name-component> <name-components>
- <name-components>
::= <spaces> <separator> <spaces> <name-component>
<name-components> | e
- <name-component> ::=
<attributeType> <spaces> '=' <spaces>
<attributeValue> <attributeTypeAndValues>
-
<attributeTypeAndValues> ::= <spaces> '+' <spaces>
<attributeType> <spaces> '=' <spaces>
<attributeValue> <attributeTypeAndValues> | e
-
<attributeType> ::= [a-zA-Z] <keychars> | <oidPrefix> [0-9]
<digits> <oids> | [0-9] <digits> <oids>
-
<keychars> ::= [a-zA-Z] <keychars> | [0-9] <keychars> | '-'
<keychars> | e
- <oidPrefix> ::= 'OID.' | 'oid.' | e
-
<oids> ::= '.' [0-9] <digits> <oids> | e
-
<attributeValue> ::= <pairs-or-strings> | '#' <hexstring>
|'"' <quotechar-or-pairs> '"'
- <pairs-or-strings> ::= '\'
<pairchar> <pairs-or-strings> | <stringchar>
<pairs-or-strings> | e
- <quotechar-or-pairs> ::=
<quotechar> <quotechar-or-pairs> | '\' <pairchar>
<quotechar-or-pairs> | e
- <pairchar> ::= ',' | '=' | '+' |
'<' | '>' | '#' | ';' | '\' | '"' | [0-9a-fA-F] [0-9a-fA-F]
-
<hexstring> ::= [0-9a-fA-F] [0-9a-fA-F] <hexpairs>
-
<hexpairs> ::= [0-9a-fA-F] [0-9a-fA-F] <hexpairs> | e
-
<digits> ::= [0-9] <digits> | e
- <stringchar> ::=
[0x00-0xFF] - [,=+<>#;\"\n\r]
- <quotechar> ::= [0x00-0xFF] -
[\"]
- <separator> ::= ',' | ';'
- <spaces> ::= ' '
<spaces> | e
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
static DnParser |
getNameParser()
Get a reference to the NameParser.
|
DN |
parse(String dn)
Parse a String and return a DN if the String is a valid DN
|
static void |
parseInternal(String name,
List<RDN> rdns)
Parse a DN.
|
static boolean |
validateInternal(String name)
Validate a DN
|
static DnParser |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DnParser[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DnParser INSTANCE
public static DnParser[] values()
for (DnParser c : DnParser.values()) System.out.println(c);
public static DnParser valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic static DnParser getNameParser()
public static void parseInternal(String name, List<RDN> rdns) throws LdapInvalidDnException
dn
- The DN to be parsedrdns
- The list that will contain the RDNsLdapInvalidDnException
- If the DN is invalidpublic static boolean validateInternal(String name)
dn
- The DN to be parsedtrue
if the DN is validpublic DN parse(String dn) throws LdapInvalidDnException
dn
- The DN to parseLdapInvalidDnException
- If the String is not a valid DNCopyright © 2003–2013 The Apache Software Foundation. All rights reserved.