All LDAP Classes
Internal LDAP Classes

com.novell.ldap.controls
Class LDAPPersistSearchControl

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

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.
private static int CHANGESONLY_INDEX
           
private static int CHANGETYPES_INDEX
           
static int DELETE
          Change type specifying that you want to track removals of entries from the directory.
private  boolean m_changesOnly
           
private  int m_changeTypes
           
private  boolean m_returnControls
           
private  ASN1Sequence m_sequence
           
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.
private static java.lang.String requestOID
          The requestOID of the persistent search control
private static java.lang.String responseOID
          The responseOID of the psersistent search - entry change control
private static int RETURNCONTROLS_INDEX
           
private static LBEREncoder s_encoder
           
private static int SEQUENCE_SIZE
           
 
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.
private  void setValue()
          Sets the encoded value of the LDAPControlClass
 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

SEQUENCE_SIZE

private static int SEQUENCE_SIZE

CHANGETYPES_INDEX

private static int CHANGETYPES_INDEX

CHANGESONLY_INDEX

private static int CHANGESONLY_INDEX

RETURNCONTROLS_INDEX

private static int RETURNCONTROLS_INDEX

s_encoder

private static LBEREncoder s_encoder

m_changeTypes

private int m_changeTypes

m_changesOnly

private boolean m_changesOnly

m_returnControls

private boolean m_returnControls

m_sequence

private ASN1Sequence m_sequence

requestOID

private static java.lang.String requestOID
The requestOID of the persistent search control


responseOID

private static java.lang.String responseOID
The responseOID of the psersistent search - entry change control


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.

    setValue

    private void setValue()
    Sets the encoded value of the LDAPControlClass


    All LDAP Classes
    Internal LDAP Classes

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