| java.lang.Object org.acegisecurity.ldap.LdapUtils
LdapUtils | final public class LdapUtils (Code) | | LDAP Utility methods.
author: Luke Taylor version: $Id: LdapUtils.java 1784 2007-02-24 21:00:24Z luke_t $ |
Method Summary | |
public static void | closeContext(Context ctx) | public static String | getRelativeName(String fullDn, Context baseCtx) Obtains the part of a DN relative to a supplied base context.If the DN is
"cn=bob,ou=people,dc=acegisecurity,dc=org" and the base context name is "ou=people,dc=acegisecurity,dc=org" it
would return "cn=bob".
Parameters: fullDn - the DN Parameters: baseCtx - the context to work out the name relative to. | public static byte[] | getUtf8Bytes(String s) | public static String | parseRootDnFromUrl(String url) |
getRelativeName | public static String getRelativeName(String fullDn, Context baseCtx) throws NamingException(Code) | | Obtains the part of a DN relative to a supplied base context. If the DN is
"cn=bob,ou=people,dc=acegisecurity,dc=org" and the base context name is "ou=people,dc=acegisecurity,dc=org" it
would return "cn=bob".
Parameters: fullDn - the DN Parameters: baseCtx - the context to work out the name relative to. the throws: NamingException - any exceptions thrown by the context are propagated. |
getUtf8Bytes | public static byte[] getUtf8Bytes(String s)(Code) | | |
parseRootDnFromUrl | public static String parseRootDnFromUrl(String url)(Code) | | Works out the root DN for an LDAP URL. For example, the URL
ldap://monkeymachine:11389/dc=acegisecurity,dc=org has the root DN "dc=acegisecurity,dc=org".
Parameters: url - the LDAP URL the root DN |
|
|