com.netscape.jndi.ldap.controls
Class LdapEntryChangeControl

java.lang.Object
  extended by netscape.ldap.LDAPControl
      extended by netscape.ldap.controls.LDAPEntryChangeControl
          extended by com.netscape.jndi.ldap.controls.LdapEntryChangeControl
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.naming.ldap.Control

public class LdapEntryChangeControl
extends netscape.ldap.controls.LDAPEntryChangeControl
implements javax.naming.ldap.Control

Represents an LDAP v3 server control that specifies information about a change to an entry in the directory. (The OID for this control is 2.16.840.1.113730.3.4.7.) You need to use this control in conjunction with a "persistent search" control (represented by LdapPersistentSearchControl object.

To use persistent searching for change notification, you create a "persistent search" control that specifies the types of changes that you want to track. When an entry is changed, the server sends that entry back to your client and may include an "entry change notification" control that specifies additional information about the change.

Once you retrieve an LdapEntryChangeControl object from the server, you can get the following additional information about the change made to the entry:

See Also:
LdapPersistSearchControl, Serialized Form

Field Summary
 
Fields inherited from class netscape.ldap.controls.LDAPEntryChangeControl
ENTRYCHANGED
 
Fields inherited from class netscape.ldap.LDAPControl
m_critical, m_value, MANAGEDSAIT, PWEXPIRED, PWEXPIRING
 
Fields inherited from interface javax.naming.ldap.Control
CRITICAL, NONCRITICAL
 
Method Summary
 int getChangeNumber()
          Gets the change number, which identifies the record of the change in the server's change log.
 int getChangeType()
          Gets the change type, which identifies the type of change that occurred.
 byte[] getEncodedValue()
          Retrieves the ASN.1 BER encoded value of the LDAP control.
 java.lang.String getPreviousDN()
          Gets the previous DN of the entry (if the entry was renamed).
 
Methods inherited from class netscape.ldap.controls.LDAPEntryChangeControl
setChangeNumber, setChangeType, setPreviousDN, toString
 
Methods inherited from class netscape.ldap.LDAPControl
clone, createControl, flattenBER, getID, getValue, isCritical, lookupControlClass, newInstance, register
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.naming.ldap.Control
getID, isCritical
 

Method Detail

getChangeNumber

public int getChangeNumber()
Gets the change number, which identifies the record of the change in the server's change log.

Overrides:
getChangeNumber in class netscape.ldap.controls.LDAPEntryChangeControl
Returns:
Change number identifying the change made.

getChangeType

public int getChangeType()
Gets the change type, which identifies the type of change that occurred.

Overrides:
getChangeType in class netscape.ldap.controls.LDAPEntryChangeControl
Returns:
Change type identifying the type of change that occurred. This can be one of the following values:

  • LdapPersistSearchControl.ADD (a new entry was added to the directory)
  • LdapPersistSearchControl.DELETE (an entry was removed from the directory)
  • LdapPersistSearchControl.MODIFY (an entry was modified)
  • LdapPersistSearchControl.MODDN (an entry was renamed)


getPreviousDN

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

Overrides:
getPreviousDN in class netscape.ldap.controls.LDAPEntryChangeControl
Returns:
The previous distinguished name of the entry.

getEncodedValue

public byte[] getEncodedValue()
Retrieves the ASN.1 BER encoded value of the LDAP control. Null is returned if the value is absent.

Specified by:
getEncodedValue in interface javax.naming.ldap.Control
Returns:
A possibly null byte array representing the ASN.1 BER encoded value of the LDAP control.