LDAP Classes
Implements Java LDAP

com.novell.ldap.controls
Class LDAPPersistSearchControl

java.lang.Object
  extended bycom.novell.ldap.LDAPControl
      extended bycom.novell.ldap.controls.LDAPPersistSearchControl
All Implemented Interfaces:
java.lang.Cloneable, java.io.Externalizable, java.io.Serializable

public class LDAPPersistSearchControl
extends LDAPControl

LDAPPersistSearchControl is a Server Control that allows a client to receive notifications from the server of changes to entries within the searches result set. The client can be notified when an entry is added to the result set, when an entry is deleted from the result set, when a DN has been changed or when and attribute value has been changed.

Sample Code: SearchPersist.java

See Also:
Serialized Form

Field Summary
static int ADD
          Change type specifying that you want to track additions of new entries to the directory.
static int ANY
          Change type specifying that you want to track any of the above modifications.
static int DELETE
          Change type specifying that you want to track removals of entries from the directory.
static int MODDN
          Change type specifying that you want to track modifications of the DNs of entries in the directory.
static int MODIFY
          Change type specifying that you want to track modifications of entries in the directory.
 
Constructor Summary
LDAPPersistSearchControl()
          The default constructor.
LDAPPersistSearchControl(int changeTypes, boolean changesOnly, boolean returnControls, boolean isCritical)
          Constructs an LDAPPersistSearchControl object according to the supplied parameters.
 
Method Summary
 boolean getChangesOnly()
          getChangesOnly returns true if only changes are to be returned.
 int getChangeTypes()
          Returns the change types to be monitored as a logical OR of any or all of these values: ADD, DELETE, MODIFY, and/or MODDN.
 boolean getReturnControls()
          Returns true if entry change controls are to be returned with the search results.
 void setChangesOnly(boolean changesOnly)
          When set to true, requests that only changes be returned, results from the initial search are not returned.
 void setChangeTypes(int changeTypes)
          Sets the change types to be monitored.
 void setReturnControls(boolean returnControls)
          When set to true, requests that entry change controls be returned with the search results.
 java.lang.String toString()
          Returns a string representation of this class.
 
Methods inherited from class com.novell.ldap.LDAPControl
clone, getID, getValue, isCritical, readDSML, readExternal, register, setValue, writeDSML, writeExternal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ADD

public static final int ADD
Change type specifying that you want to track additions of new entries to the directory.

See Also:
Constant Field Values

DELETE

public static final int DELETE
Change type specifying that you want to track removals of entries from the directory.

See Also:
Constant Field Values

MODIFY

public static final int MODIFY
Change type specifying that you want to track modifications of entries in the directory.

See Also:
Constant Field Values

MODDN

public static final int MODDN
Change type specifying that you want to track modifications of the DNs of entries in the directory.

See Also:
Constant Field Values

ANY

public static final int ANY
Change type specifying that you want to track any of the above modifications.

See Also:
Constant Field Values
Constructor Detail

LDAPPersistSearchControl

public LDAPPersistSearchControl()
The default constructor. A control with changes equal to ANY, isCritical equal to true, changesOnly equal to true, and returnControls equal to true


LDAPPersistSearchControl

public LDAPPersistSearchControl(int changeTypes,
                                boolean changesOnly,
                                boolean returnControls,
                                boolean isCritical)

Constructs an LDAPPersistSearchControl object according to the supplied parameters. The resulting control is used to specify a persistent search.

Parameters:
changeTypes - the change types to monitor. The bitwise OR of any of the following values:
  • LDAPPersistSearchControl.ADD
  • LDAPPersistSearchControl.DELETE
  • LDAPPersistSearchControl.MODIFY
  • LDAPPersistSearchControl.MODDN
  • To track all changes the value can be set to:
  • LDAPPersistSearchControl.ANY

  • changesOnly - true if you do not want the server to return all existing entries in the directory that match the search criteria. (Use this if you just want the changed entries to be returned.)

    returnControls - true if you want the server to return entry change controls with each entry in the search results. You need to return entry change controls to discover what type of change and other additional information about the change.

    isCritical - true if this control is critical to the search operation. If true and the server does not support this control, the server will not perform the search at all.
    Method Detail

    getChangeTypes

    public int getChangeTypes()
    Returns the change types to be monitored as a logical OR of any or all of these values: ADD, DELETE, MODIFY, and/or MODDN.

    Returns:
    the change types to be monitored. The logical or of any of the following values: ADD, DELETE, MODIFY, and/or MODDN.

    setChangeTypes

    public void setChangeTypes(int changeTypes)
    Sets the change types to be monitored. types The change types to be monitored as a logical OR of any or all of these types: ADD, DELETE, MODIFY, and/or MODDN. Can also be set to the value ANY which is defined as the logical OR of all of the preceding values.


    getReturnControls

    public boolean getReturnControls()
    Returns true if entry change controls are to be returned with the search results.

    Returns:
    true if entry change controls are to be returned with the search results. Otherwise, false is returned

    setReturnControls

    public void setReturnControls(boolean returnControls)
    When set to true, requests that entry change controls be returned with the search results.

    Parameters:
    returnControls - true to return entry change controls.

    getChangesOnly

    public boolean getChangesOnly()
    getChangesOnly returns true if only changes are to be returned. Results from the initial search are not returned.

    Returns:
    true of only changes are to be returned

    setChangesOnly

    public void setChangesOnly(boolean changesOnly)
    When set to true, requests that only changes be returned, results from the initial search are not returned.

    Parameters:
    changesOnly - true to skip results for the initial search

    toString

    public java.lang.String toString()
    Description copied from class: LDAPControl
    Returns a string representation of this class.

    Overrides:
    toString in class LDAPControl
    Returns:
    The string representation of this class.

    LDAP Classes
    Implements Java LDAP

    Copyright © 2002 Novell, Inc. All Rights Reserved.
    Novell, Inc.
    1800 South Novell Place
    Provo, Ut 84606
    Phone: (801) 861-5000