|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.stratelia.silverpeas.domains.ldapdriver.LDAPUtility
public class LDAPUtility
This class contains some usefull static functions to access to LDAP elements
| Field Summary | |
|---|---|
static String |
BASEDN_SEPARATOR
|
static int |
MAX_NB_RETRY_CONNECT
|
static int |
MAX_NB_RETRY_TIMELIMIT
|
| Constructor Summary | |
|---|---|
LDAPUtility()
|
|
| Method Summary | |
|---|---|
static void |
closeConnection(String connectionId)
Method declaration |
static String |
dblBackSlashesForDNInFilters(String theDN)
|
static String |
escapeDN(String name)
Escaping DN to prevent LDAP injection. |
static String[] |
getAttributeValues(com.novell.ldap.LDAPEntry theEntry,
String theAttributeName)
Reads the values of an attribute and return the strings |
static com.novell.ldap.LDAPConnection |
getConnection(String connectionId)
Method declaration |
static String |
getFirstAttributeValue(com.novell.ldap.LDAPEntry theEntry,
String attributeName)
Returns the first value of a specific attribute from an entry. |
static com.novell.ldap.LDAPEntry |
getFirstEntryFromSearch(String lds,
String baseDN,
int scope,
String filter,
String[] attrs)
Search and returns the first Entry that match the parameters baseDN, scope and filter |
static AbstractLDAPTimeStamp |
getTimeStamp(String lds,
String baseDN,
int scope,
String filter,
String timeStampVar,
String minTimeStamp)
|
static boolean |
isAGuid(String attName)
|
static String |
normalizeFilterValue(String theFilter)
|
static String |
openConnection(LDAPSettings driverSettings)
Method declaration |
static boolean |
recoverConnection(String connectionId,
com.novell.ldap.LDAPException ex)
Method declaration |
static com.novell.ldap.LDAPEntry[] |
search1000Plus(String lds,
String baseDN,
int scope,
String filter,
String varToSort,
String[] args)
Method declaration |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_NB_RETRY_CONNECT
public static final int MAX_NB_RETRY_TIMELIMIT
public static final String BASEDN_SEPARATOR
| Constructor Detail |
|---|
public LDAPUtility()
| Method Detail |
|---|
public static String openConnection(LDAPSettings driverSettings)
throws AdminException
driverSettings -
AdminExceptionpublic static com.novell.ldap.LDAPConnection getConnection(String connectionId)
connectionId -
AdminException
public static boolean recoverConnection(String connectionId,
com.novell.ldap.LDAPException ex)
connectionId - ex -
AdminException
public static void closeConnection(String connectionId)
throws AdminException
connectionId -
AdminException
public static String getFirstAttributeValue(com.novell.ldap.LDAPEntry theEntry,
String attributeName)
theEntry - the LDAP entryattributeName - the name of the attribute to retreive
public static com.novell.ldap.LDAPEntry getFirstEntryFromSearch(String lds,
String baseDN,
int scope,
String filter,
String[] attrs)
throws AdminException
lds - the LDAP connection namebaseDN - the base DN for the searchscope - the scope (LDAPConnection.SCOPE_BASE, LDAPConnection.SCOPE_ONE or
LDAPConnection.SCOPE_SUB)filter - the filter for the search (if null, use '(objectClass=*)' )attrs - hidden attributes
AdminException - if a problem occurpublic static boolean isAGuid(String attName)
public static String[] getAttributeValues(com.novell.ldap.LDAPEntry theEntry,
String theAttributeName)
theEntry - entry to read the attributetheAttributeName - name of the attribute to retreive
public static String dblBackSlashesForDNInFilters(String theDN)
public static String normalizeFilterValue(String theFilter)
public static String escapeDN(String name)
name - the DN to be espaced.
public static com.novell.ldap.LDAPEntry[] search1000Plus(String lds,
String baseDN,
int scope,
String filter,
String varToSort,
String[] args)
throws AdminException
lds - baseDN - scope - filter - varToSort - args -
AdminException
public static AbstractLDAPTimeStamp getTimeStamp(String lds,
String baseDN,
int scope,
String filter,
String timeStampVar,
String minTimeStamp)
throws AdminException
AdminException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||