org.opends.server.controls
Class EntryChangeNotificationControl

java.lang.Object
  extended by org.opends.server.types.Control
      extended by org.opends.server.controls.EntryChangeNotificationControl

public class EntryChangeNotificationControl
extends Control

This class implements the entry change notification control defined in draft-ietf-ldapext-psearch. It may be included in entries returned in response to a persistent search operation.


Constructor Summary
EntryChangeNotificationControl(PersistentSearchChangeType changeType, DN previousDN, long changeNumber)
          Creates a new entry change notification control with the provided information.
EntryChangeNotificationControl(PersistentSearchChangeType changeType, long changeNumber)
          Creates a new entry change notification control with the provided information.
EntryChangeNotificationControl(java.lang.String oid, boolean isCritical, PersistentSearchChangeType changeType, DN previousDN, long changeNumber)
          Creates a new entry change notification control with the provided information.
 
Method Summary
static EntryChangeNotificationControl decodeControl(Control control)
          Creates a new entry change notification control from the contents of the provided control.
 long getChangeNumber()
          Retrieves the change number for this entry change notification control.
 PersistentSearchChangeType getChangeType()
          Retrieves the change type for this entry change notification control.
 DN getPreviousDN()
          Retrieves the previous DN for this entry change notification control.
 void setChangeNumber(long changeNumber)
          Specifies the change number for this entry change notification control.
 void setChangeType(PersistentSearchChangeType changeType)
          Sets the change type for this entry change notification control.
 void setPreviousDN(DN previousDN)
          Specifies the previous DN for this entry change notification control.
 java.lang.String toString()
          Retrieves a string representation of this entry change notification control.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this entry change notification control to the provided buffer.
 
Methods inherited from class org.opends.server.types.Control
getOID, getValue, hasValue, isCritical, setCritical, setOID, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntryChangeNotificationControl

public EntryChangeNotificationControl(PersistentSearchChangeType changeType,
                                      long changeNumber)
Creates a new entry change notification control with the provided information.

Parameters:
changeType - The change type for this change notification control.
changeNumber - The change number for the associated change, or a negative value if no change number is available.

EntryChangeNotificationControl

public EntryChangeNotificationControl(PersistentSearchChangeType changeType,
                                      DN previousDN,
                                      long changeNumber)
Creates a new entry change notification control with the provided information.

Parameters:
changeType - The change type for this change notification control.
previousDN - The DN that the entry had prior to a modify DN operation, or null if the operation was not a modify DN.
changeNumber - The change number for the associated change, or a negative value if no change number is available.

EntryChangeNotificationControl

public EntryChangeNotificationControl(java.lang.String oid,
                                      boolean isCritical,
                                      PersistentSearchChangeType changeType,
                                      DN previousDN,
                                      long changeNumber)
Creates a new entry change notification control with the provided information.

Parameters:
oid - The OID to use for this control.
isCritical - Indicates whether this control should be considered critical to the operation processing.
changeType - The change type for this change notification control.
previousDN - The DN that the entry had prior to a modify DN operation, or null if the operation was not a modify DN.
changeNumber - The change number for the associated change, or a negative value if no change number is available.
Method Detail

decodeControl

public static EntryChangeNotificationControl decodeControl(Control control)
                                                    throws LDAPException
Creates a new entry change notification control from the contents of the provided control.

Parameters:
control - The generic control containing the information to use to create this entry change notification control.
Returns:
The entry change notification control decoded from the provided control.
Throws:
LDAPException - If this control cannot be decoded as a valid entry change notification control.

getChangeType

public PersistentSearchChangeType getChangeType()
Retrieves the change type for this entry change notification control.

Returns:
The change type for this entry change notification control.

setChangeType

public void setChangeType(PersistentSearchChangeType changeType)
Sets the change type for this entry change notification control.

Parameters:
changeType - The change type for this entry change notification control.

getPreviousDN

public DN getPreviousDN()
Retrieves the previous DN for this entry change notification control.

Returns:
The previous DN for this entry change notification control, or null if there is none.

setPreviousDN

public void setPreviousDN(DN previousDN)
Specifies the previous DN for this entry change notification control.

Parameters:
previousDN - The previous DN for this entry change notification control.

getChangeNumber

public long getChangeNumber()
Retrieves the change number for this entry change notification control.

Returns:
The change number for this entry change notification control, or a negative value if no change number is available.

setChangeNumber

public void setChangeNumber(long changeNumber)
Specifies the change number for this entry change notification control.

Parameters:
changeNumber - The change number for this entry change notification control.

toString

public java.lang.String toString()
Retrieves a string representation of this entry change notification control.

Overrides:
toString in class Control
Returns:
A string representation of this entry change notification control.

toString

public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this entry change notification control to the provided buffer.

Overrides:
toString in class Control
Parameters:
buffer - The buffer to which the information should be appended.