I discovered I was incorrect about setOption not supporting
controls.
Section 4.41 describes this funtionality. However the keys that
control the operation of setOption are not defined in a consistent
way.
The LDAPv2 keys are defined in LDAPConnection:, i.e.
LDAPConnection.DEREF = 2
LDAPConnection.SIZELIMIT = 3
and so forth.
The function setOption is defined in LDAPv2.
The LDAPv3 keys are defined in LDAPv3
SERVERCONTROLS (no value)
CLIENTCONTROLS (no value)
The LDAPv2 keys for setOption() should be moved to
the LDAPv2 interface and out of LDAPConnection.
Are the LDAPv3 keys names consistent with LDAPv2 key names?
The LDAPv3 keys need a value defined so as to
guarantee there is no value collision with LDAPv2 keys values.
Section 4.41 would be better if moved to 4.40 and defined
as setOption / getOption keys as part of the LDAPv3 interface.
I still think though that the setOption method is not needed, but
if kept IMO the above needs to be fixed as well as that previously
discussed.
-Steve
>>> "Steve Sonntag" <VTAG@novell.com> 31-Aug-00 11:55:40 AM
>>>
Section 4.39.13 LDAPV2.setOption
This method of the LDAPV2 interface seems a little strange.
1) It probably does not belong under the interface
LDAPV2,
but instead under LDAPConnection. This would allow it to support setting client & server controls which it cannot do under LDAPV2. This functionality is currently missing in the method. Setting STRING_FORMAT is also an LDAPV3 setting, as UTF-8 is only meaningful under LDAPV3.
2) STRING_FORMAT is set only by the setOption
method.
There should be a way to set or get STRING_FORMAT with LDAPSearchConstraints methods. 3) setOption operates only on the LDAPSearchConstraints
object
that is associated with an LDAPConnection object. Yet there may also be an LDAPConstraints object associated with the LDAPConnection object. It may or may not be the same as the LDAPSearchConstraints object. Should there be a setOption kind of method that operates on the LDAPConstraints object associated with a connection? 4) All functionality of SetOption can be performed by
code
that references the LDAPSearchConstraints object of a connection - i.e. LDAPConnection.getSearchConstraints.method(). This method is superfluous and problematic.
IMO, it is not needed and should be eliminated from the API. -Steve
|