LDAP Classes
Implements Java LDAP

com.novell.ldap.controls
Class LDAPEntryChangeControl

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

public class LDAPEntryChangeControl
extends LDAPControl

LDAPEntryChangeControl is a Server Control returned at the request of the client in response to a persistent search request. It contains additional information about a change such as what type of change occurred.

Sample Code: SearchPersist.java

See Also:
Serialized Form

Constructor Summary
LDAPEntryChangeControl(java.lang.String oid, boolean critical, byte[] value)
          This constructor is called by the SDK to create an LDAPEntryChangeControl.
 
Method Summary
 int getChangeNumber()
          returns the record number of the change in the servers change log.
 int getChangeType()
          Returns the type of change that occured
 boolean getHasChangeNumber()
          returns the record number of the change in the servers change log.
 java.lang.String getPreviousDN()
          Returns the previous DN of the entry, if it was renamed.
 java.lang.String toString()
          Returns a string representation of the control for debugging.
 
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
 

Constructor Detail

LDAPEntryChangeControl

public LDAPEntryChangeControl(java.lang.String oid,
                              boolean critical,
                              byte[] value)
                       throws java.io.IOException
This constructor is called by the SDK to create an LDAPEntryChangeControl. This constructor should NOT be called by application developers. It must be public since it resides in a different package than the classes that call it.

The Entry Change Control is defined as follows:

EntryChangeNotification ::= SEQUENCE {

changeType ENUMERATED {

add (1),

delete (2),

modify (4),

modDN (8)

},

previousDN LDAPDN OPTIONAL, -- modifyDN ops. only

changeNumber INTEGER OPTIONAL -- if supported

}

Parameters:
oid - The OID of the control, as a dotted string.

critical - True if the LDAP operation should be discarded if the control is not supported. False if the operation can be processed without the control.

value - The control-specific data.
Method Detail

getHasChangeNumber

public boolean getHasChangeNumber()
returns the record number of the change in the servers change log.

Returns:
the record number of the change in the server's change log. The server may not return a change number. In this case the return value is -1

getChangeNumber

public int getChangeNumber()
returns the record number of the change in the servers change log.

Returns:
the record number of the change in the server's change log. The server may not return a change number. In this case the return value is -1

getChangeType

public int getChangeType()
Returns the type of change that occured

Returns:
returns one of the following values indicating the type of change that occurred: LDAPPersistSearchControl.ADD LDAPPersistSearchControl.DELETE LDAPPersistSearchControl.MODIFY LDAPPersistSearchControl.MODDN.

getPreviousDN

public java.lang.String getPreviousDN()
Returns the previous DN of the entry, if it was renamed.

Returns:
the previous DN of the entry if the entry was renamed (ie. if the change type is LDAPersistSearchControl.MODDN.

toString

public java.lang.String toString()
Returns a string representation of the control for debugging.

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