|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.ldap.LDAPUtil
public class LDAPUtil
Field Summary | |
---|---|
static String |
OBJECT_CLASS_ATTR
"objectClass" |
static String |
REVISION
|
Constructor Summary | |
---|---|
LDAPUtil()
|
Method Summary | |
---|---|
static boolean |
checkConnect(String hostname,
String port,
String isSSL,
String bindDN,
String bindPassword)
Try a LDAP connection using the given host information and credential. |
static String |
escapeDN(String name)
Escape certain meta-characters in LDAP DN. |
static String |
escapeLDAPSearchFilter(String filter)
Escape certain meta-characters of a name for use in LDAP search filter. |
static String |
getString(netscape.ldap.LDAPAttribute attribute,
String defaultValue)
Return first available value of LDAPAttribute attr,
or defaultValue if not available. |
static boolean |
isGroupEntry(netscape.ldap.LDAPEntry entry,
LDAPConfiguration conf)
Determines if the given LDAPEntry is a group entry according to parameters
specified by the given LDAPConfiguration object. |
static boolean |
isUserEntry(netscape.ldap.LDAPEntry entry,
LDAPConfiguration conf)
Determines if the given LDAPEntry is a user entry according to parameters
specified by the given LDAPConfiguration object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
public static final String OBJECT_CLASS_ATTR
Constructor Detail |
---|
public LDAPUtil()
Method Detail |
---|
public static String getString(netscape.ldap.LDAPAttribute attribute, String defaultValue)
LDAPAttribute
attr,
or defaultValue if not available.
attribute
- LDAPAttribute
from which to retrieve value.defaultValue
- the default value to use if none could be read
public static boolean isGroupEntry(netscape.ldap.LDAPEntry entry, LDAPConfiguration conf)
LDAPEntry
is a group entry according to parameters
specified by the given LDAPConfiguration
object.
entry
- the LDAPEntry to checkconf
- the LDAPConfiguration
to use, MUST NOT be null
public static boolean isUserEntry(netscape.ldap.LDAPEntry entry, LDAPConfiguration conf)
LDAPEntry
is a user entry according to parameters
specified by the given LDAPConfiguration
object.
entry
- the LDAPEntry to checkconf
- the LDAPConfiguration
to use, MUST NOT be null
public static boolean checkConnect(String hostname, String port, String isSSL, String bindDN, String bindPassword)
hostname
- the hostname of the ldap server to connect to.port
- the port of the ldap server to connect to.isSSL
- whether the connection should be made using SSL.bindDN
- the Distinguished Name to use to bind to the ldap server to connect to.bindPassword
- the password to use to bind to the ldap server to connect to.
public static String escapeDN(String name)
name
- the name to escape
public static final String escapeLDAPSearchFilter(String filter)
filter
- the filter to escape
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |