[Date Prev][Date Next] [Chronological] [Thread] [Top]

Errors in Java LDAP Internet Drafts



Colleagues of ldapext,

  We've discovered a number of unfortunate typos and editing errors in draft-ietf-ldapext-ldap-java-api-05.txt and
draft-ietf-ldapext-ldap-java-api-asynch-ext-00.txt (which are on last call). Please read below what we've come up with.

Thanks,
Rob Weltman and Chris Tomlinson
 
 

draft-ietf-ldapext-ldap-java-api-05.txt
-------------------------------------------

5.6.9 getSearchConstraints

   public LDAPConstraints getConstraints()

should be

5.6.9 getConstraints

   public LDAPConstraints getConstraints()

5.6.9a getSearchConstraints

   public LDAPSearchConstraints getSearchConstraints()

************

5.6.15 setConstraints

   public void setConstraints(LDAPConstraints cons)

should be

5.6.15 setConstraints

   public void setConstraints(LDAPConstraints cons)

5.6.15a setSearchConstraints

   public void setSearchConstraints(LDAPSearchConstraints cons)

************

5.7.1 Constructors

   public LDAPConstraints()

   Constructs an LDAPConstraints object that specifies the default
   set of constraints.
 

   public LDAPConstraints(int msLimit,
                          boolean doReferrals,
                          LDAPBind binder,
                          LDAPRebind reauth,
                          int hop_limit)

should be

   public LDAPConstraints(int msLimit,
                          boolean doReferrals,
                          LDAPBind binder,
                          int hop_limit)

   public LDAPConstraints(int msLimit,
                          boolean doReferrals,
                          LDAPRebind reauth,
                          int hop_limit)

in other words it doesn't make sense to specify both types of referral handler.

************
Same thing for

5.23.1 Constructors

   public LDAPSearchConstraints()

   Constructs an LDAPSearchConstraints object that specifies the default
   set of search constraints.
 

   public LDAPSearchConstraints(int msLimit,
                                int serverTimeLimit,
                                int dereference,
                                int maxResults,
                                boolean doReferrals,
                                int batchSize,
                                LDAPBind binder,
                                LDAPRebind reauth,
                                int hop_limit)

should be

   public LDAPSearchConstraints(int msLimit,
                                int serverTimeLimit,
                                int dereference,
                                int maxResults,
                                boolean doReferrals,
                                int batchSize,
                                LDAPBind binder,
                                int hop_limit)

   public LDAPSearchConstraints(int msLimit,
                                int serverTimeLimit,
                                int dereference,
                                int maxResults,
                                boolean doReferrals,
                                int batchSize,
                                LDAPRebind reauth,
                                int hop_limit)

************

The I-D is also missing the following methods of LDAPConstraints:

    public void setClientControls( LDAPControl control )
    public void setClientControls( LDAPControl[] controls )

    Sets controls for use by the interface.

   Parameters are:

      control       A single client control.

      controls      An array of client controls.
 

    public void setServerControls( LDAPControl control )
    public void setServerControls( LDAPControl[] controls )

    Sets controls to be sent to the server.

   Parameters are:

      control       A single control to be sent to the server.

      controls      An array of controls to be sent to the server.
 

    public LDAPControl[] getClientControls()

    Returns controls to be used by the interface.
 

    public LDAPControl[] getServerControls()

    Returns controls to be sent to the server.
 

************
************
 

draft-ietf-ldapext-ldap-java-api-asynch-ext-00.txt
--------------------------------------------------

4.1.2 bind

   public LDAPResponseListener bind(String dn,
                                    String passwd,
                                    LDAPResponseListener listener)
                                    throws LDAPException

   public LDAPResponseListener bind(String dn,
                                    String passwd,
                                    LDAPResponseListener listener)
                                    throws LDAPException

   public LDAPResponseListener bind(String dn,
                                    String[] mechanisms,
                                    String packageName,
                                    Properties props,
                                    SASLClientCB getter)
                                    throws LDAPException

should be

4.1.2 bind

   public LDAPResponseListener bind(String dn,
                                    String passwd,
                                    LDAPResponseListener listener)
                                    throws LDAPException

   public LDAPResponseListener bind(String dn,
                                    String passwd,
                                    LDAPResponseListener listener,
                                    LDAPConstraints cons)
                                   throws LDAPException

   public LDAPResponseListener bind(String dn,
                                    String[] mechanisms,
                                    String packageName,
                                    Properties props,
                                    SASLClientCB getter,
                                    LDAPResponseListener listener)
                                    throws LDAPException
 

   public LDAPResponseListener bind(String dn,
                                    String[] mechanisms,
                                    String packageName,
                                    Properties props,
                                    SASLClientCB getter,
                                    LDAPResponseListener listener,
                                    LDAPConstraints cons)
                                    throws LDAPException
 

      listener       Handler for messages returned from a server in
                     response to this request. If it is null, a
                     listener object is created internally.

      cons           Constraints specific to the operation.

**********

   public LDAPResponseListener delete(String dn,
                                      LDAPResponseListener listener)
                                      LDAPConstraints cons)
                                      throws LDAPException

should be

   public LDAPResponseListener delete(String dn,
                                      LDAPResponseListener listener,
                                      LDAPConstraints cons)
                                      throws LDAPException

**********

   public LDAPResponseListener modify(String dn,
                                      LDAPModificationSet mods)
                                      LDAPResponseListener listener)
                                      throws LDAPException

should be

   public LDAPResponseListener modify(String dn,
                                      LDAPModificationSet mods,
                                      LDAPResponseListener listener)
                                      throws LDAPException
**********

LDAPResponse and LDAPMessage should not be declared abstract.

**********

Missing the following methods of LDAPAsynchronousConnection:

4.1.7 compare

   public LDAPResponseListener compare(String dn,
                                       LDAPAttribute attr,
                                       LDAPResponseListener listener)
                                       throws LDAPException

   public LDAPResponseListener compare(String dn,
                                       LDAPAttribute attr,
                                       LDAPResponseListener listener)
                                       LDAPConstraints cons)
                                       throws LDAPException

   Compare an attribute value with one in the directory. The result can
   be obtained by calling getResultCode on the LDAPResponse from the
   LDAPResponseListener. The code will be LDAPException.COMPARE_TRUE or
   LDAPException.COMPARE_FALSE.
 

   Parameters are:

      dn             Distinguished name of the entry to compare.

      attr           Attribute with a value to compare. The

      listener       Handler for messages returned from a server in
                     response to this request. If it is null, a
                     listener object is created internally.

      cons           Constraints specific to the operation.
 

4.1.8 unbind

   public LDAPResponseListener unbind(LDAPResponseListener listener)
                                                             throws LDAPException

   public LDAPResponseListener unbind(LDAPResponseListener listener,
                                                            LDAPConstraints cons)
                                                            throws LDAPException

   Deauthenticate the connection, which reduces it to an anonymous
   connection.
 

4.1.9 abandon

   public LDAPResponseListener abandon(LDAPSearchListener searchlistener,
                                                               LDAPResponseListener listener)
                                                               throws LDAPException

   public LDAPResponseListener abandon(LDAPSearchListener searchlistener,
                                                               LDAPResponseListener listener,
                                                               LDAPConstraints cons)
                                                               throws LDAPException

   Notifies the server to not send additional results associated with
   this LDAPSearchResults object, and discards any results already
   received.

   Parameters are:

      searchListener  A search listener returned from a search.

      listener       Handler for messages returned from a server in
                      response to this request. If it is null, a
                      listener object is created internally.

      cons           Constraints specific to the operation.
 
********

In the examples of using the asynchronous API:

               LDAPSearchListener l = ld.search( MY_SEARCHBASE,
                                                 ld.SCOPE_ONE,
                                                 MY_FILTER,
                                                 null,
                                                 false,
                                                 null,
                                                 cons );

               /* Loop on results until finished */
               LDAPMessage res;
               while ( (res = l.next()) != null ) {

should be

               LDAPSearchListener l = ld.search( MY_SEARCHBASE,
                                                 ld.SCOPE_ONE,
                                                 MY_FILTER,
                                                 null,
                                                 false,
                                                 null,
                                                 cons );

               /* Loop on results until finished */
               LDAPMessage res;
               Enumeration en = l.getSearchResults();
               while ( en.hasMoreElements() ) {
                   res = (LDAPMessage)en.nextElement();
 

That occurs twice in the examples.