[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: Java LDAP API - LDAPControl class
I would expect that when the LDAPControl is subclassed for a specific
control that a better SetValue() method would be provided in the
subclass. For example, if the value of the control is essentially a
string, I would hope to see the subclass define a SetValue() method such
as:
public setValue(String value);
So, in the description of the SetValue() method, I would like to see
language that indicates that implementors of subclasses of "control
specific" LDAPControls SHOULD provide a setValue() method that is
specific to the value of the control being implemented...
Bruce
At 03:21 PM 10/18/2000, Steve Sonntag wrote:
I agree protected is
adequate
-Steve
>>> Rob Weltman <robw@worldspot.com> 18-Oct-00 3:02:09 PM
>>>
Does it need to be public? If it's only for use by extensions (and
I
think that is the case), the method can be protected instead.
Rob
Steve Sonntag wrote:
> The LDAPControl class needs a setValue method. I realize that
the
> value can be set on the constructor, but takethe following
> example. Suppose I want to build a class in my application
that
> extendscontrol to build my control, for example, server side
> sort. public class LDAPSortControl extends LDAPControl{ static
String
> oid="1.2.840.113556.1.4.473"; public
LDAPSortControl( boolean
> critical, LDAPSortKey key) { super(
oid, critical,
> (byte[])null); // This line must be first in the
constructor
> // oops, we haven't built the control value yet - how do we pass it
in
> to // the LDAPControl
object???? // need a
setValue
> method to get the job done. } Suggested prototype - public
setValue(
> byte[] value); -Steve ------------------------
> Steve Sonntag
> Novell, Inc., the leading provider of Net services software
==============================================
Bruce Greenblatt, Ph. D.
Directory Tools and Application Services, Inc.
http://www.directory-applications.com
See my new Book on Internet Directories:
http://www.phptr.com/ptrbooks/ptr_0139744525.html