Share

LDAP framework

Code

Programming Languages: Java

License: Apache License V2.0

Repositories

browse code, statistics, last commit on 2008-03-10 cvs -d:pserver:anonymous@ldapframework.cvs.sourceforge.net:/cvsroot/ldapframework login

cvs -z3 -d:pserver:anonymous@ldapframework.cvs.sourceforge.net:/cvsroot/ldapframework co -P modulename

Show:

What's happening?

  • Active Directory Paging

    Will the framework help me with AD Paging? Our directory only allows for 1000 entries in one query. I am trying to get a list of all users - we have several thousand. I was able to get the first 1000 using the framework. I found some documentation at Sun about how to do Paging which gets around this problem here: http://java.sun.com/docs/books/tutorial/jndi/newstuff/paged-results.html.

    2008-08-08 21:31:00 UTC by trames

  • LDAP framework

    Anonymous committed patchset 1 of module CVSROOT to the LDAP framework CVS repository, changing 11 files.

    2008-03-10 06:08:44 UTC by nobody

  • LDAPResultSet boolean next() fix

    If you try to read more results than are in the LDAPResultSet, an exception is returned (PartialResultSet). I think the intention was to return "false" back to the caller to let it know there are no more results. Here is a fix: public boolean next() throws DAOException { try { if(result.hasMore()) { logger.debug("LDAPResultSet::next() - has more");.

    2008-02-29 17:48:54 UTC by trames

  • LDAPResultSet List getResultSetNames()

    Add this method to retrieve a List object of all the field names returned by the ResultSet. Handy if you requested all fields "SELECT *" /** * Returns a List of all of the field names contained * within the result set * * @return * @throws DAOException */ public List getResultSetNames() throws DAOException {...

    2008-02-28 21:27:01 UTC by trames

  • LDAPResultSet getList(String attrName)

    Add this method to retrieve by name instead of number: // getList by attribute name public List getList(String attrName) throws DAOException { try { ArrayList list = new ArrayList(); Attribute attr = attrs.get(attrName); if(attr != null){ NamingEnumeration en = attr.getAll(); while(en.hasMore()) {.

    2008-02-27 18:34:23 UTC by trames

  • Followup: RE: Multi value entries

    Thanks for help. :-)

    2008-02-26 00:47:27 UTC by pavelsavin

  • Followup: RE: What is number in WHERE clause

    The number at the end is a search scope. See: javax.naming.directory.SearchControls http://java.sun.com/j2se/1.5.0/docs/api/javax/naming/directory/SearchControls.html It can be one of: OBJECT_SCOPE = 0; ONELEVEL_SCOPE = 1; SUBTREE_SCOPE = 2;.

    2008-02-26 00:44:43 UTC by pavelsavin

  • Enhance WHERE clause

    A cool feature would be to get rid of the LDAP silly syntax and use SQL AND/OR and even IN clauses after the WHERE. (&(objectClass=fooOrganziation)(&(&(&(orgName=?)(orgType=?))(st=?))(orgBusinessUnit=?))) (objectClass=fooOrganization) AND (orgName=? AND orgType=? AND st=? AND orgBusinessUnit=?) ... or something like that.

    2008-02-25 22:27:20 UTC by trames

  • Followup: RE: Multi value entries

    Sorry, I answered this one myself. In case anyone wants to know: Only read one record from the result set if you are only expecting one. To get the multi-valued entries like "memberOf", use the "getList(n)" method of LDAPResultSet. The "n" represents the field number in the SEARCH list. So to print an Active Directory user name and then all of the memberOf's...

    2008-02-25 22:14:39 UTC by trames

  • What is number in WHERE clause

    What does the number at the end of the WHERE clause represent (2)? In some of your examples you have a 1 (one) in that place. I could find no documentation for it. String query = "SEARCH memberOf " + " IN ? WHERE (samAccountName=?) 2";.

    2008-02-25 21:47:43 UTC by trames

Our Numbers