Subject: Re: Java LDAP API - LDAPControl class

From: "Steve Sonntag" <[email-masked]>
Date: Wed, 18 Oct 2000 16:21:51 -0600

I agree protected is adequate

-Steve

>>> Rob Weltman <[email-masked]> 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

---

From: Bruce Greenblatt <[email-masked]>
Date: Wed, 18 Oct 2000 15:31:45 -0700

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

> > 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