|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.ca.commons.naming.NameUtility
Some specialised String utilities for parsing ldap names.
| Constructor Summary | |
NameUtility()
|
|
| Method Summary | |
static java.lang.String |
checkEndSpaces(java.lang.String ldapDNString)
Apparently jndi does not handle end spaces correctly. |
protected static java.lang.String |
cleanupSlashes(java.lang.String string)
|
static java.lang.String |
escape(java.lang.String string)
escapes special characters using a backslash, as per RFC 2253. |
static int |
next(java.lang.String searchMe,
int startpos,
char c)
return position of next non-escaped character 'c' in a DN. |
static java.lang.String |
removeEscapedUTF(java.lang.String utfString)
|
static java.lang.String |
trimQuotes(java.lang.String string)
Not currently used? |
static java.lang.String |
unescape(java.lang.String string)
A commutative twin to escape(), this removes the leading slashes from a string. |
static java.lang.String |
unescape(java.lang.String string,
boolean jndiHack)
Removes the escaping. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NameUtility()
| Method Detail |
public static int next(java.lang.String searchMe,
int startpos,
char c)
public static java.lang.String unescape(java.lang.String string)
throws javax.naming.InvalidNameException
javax.naming.InvalidNameException
public static java.lang.String removeEscapedUTF(java.lang.String utfString)
throws javax.naming.InvalidNameException
javax.naming.InvalidNameException
public static java.lang.String unescape(java.lang.String string,
boolean jndiHack)
throws javax.naming.InvalidNameException
If used for DNs, The string argument should be the smallest possible unit of an rdn value.
If the argument has beginning and end quotes, they are removed, leaving
text otherwise untouched (ldap v2 escaping).
Otherwise, remove all leading '\' characters, giving special handling to
escaped slashes.
Note that in the second form this ftn is not commutative with escape.
string - the string to remove escape characters fromjndiHack - if true, indicates special handling for ldap v2 escaping, and
wierd jndi return values.
javax.naming.InvalidNameExceptionpublic static java.lang.String trimQuotes(java.lang.String string)
protected static java.lang.String cleanupSlashes(java.lang.String string)
public static java.lang.String escape(java.lang.String string)
string - the string to convert to escaped form.public static java.lang.String checkEndSpaces(java.lang.String ldapDNString)
ldapDNString - the potentially illegal DN to rescue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||