public class LDAPEntryChangeControl extends LDAPControl
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.
Typically, you use the getResponseControls
method of
the LDAPConnection
object to get any
LDAPEntryChangeControl
objects returned by the server.
Once you retrieve an LDAPEntryChangeControl
object from
the server, you can get the following additional information about
the change made to the entry:
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENTRYCHANGED |
m_critical, m_value, MANAGEDSAIT, PWEXPIRED, PWEXPIRING
Constructor and Description |
---|
LDAPEntryChangeControl()
Constructs a new
LDAPEntryChangeControl object. |
LDAPEntryChangeControl(java.lang.String oid,
boolean critical,
byte[] value)
Contructs an
LDAPEntryChangedControl object. |
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.String |
getPreviousDN()
Gets the previous DN of the entry (if the entry was renamed).
|
void |
setChangeNumber(int num)
Sets the change number (which identifies the record of the change
in the server's change log) in this "entry change notification"
control.
|
void |
setChangeType(int num)
Sets the change type (which identifies the type of change
that occurred) in this "entry change notification" control.
|
void |
setPreviousDN(java.lang.String dn)
Sets the previous DN of the entry (if the entry was renamed)
in the "entry change notification control".
|
java.lang.String |
toString()
Return a string representation of the control for debugging
|
clone, createControl, flattenBER, getID, getValue, isCritical, lookupControlClass, newInstance, register
public static final java.lang.String ENTRYCHANGED
public LDAPEntryChangeControl()
LDAPEntryChangeControl
object.LDAPControl
,
LDAPPersistSearchControl
public LDAPEntryChangeControl(java.lang.String oid, boolean critical, byte[] value) throws LDAPException, java.io.IOException
LDAPEntryChangedControl
object.
This constructor is used by LDAPControl.register
to
instantiate entry change controls.oid
- this parameter must be
LDAPEntryChangeControl.ENTRYCHANGED
or an LDAPException
is throwncritical
- true
if this control is criticalvalue
- the value associated with this controlLDAPException
- If oid is not
LDAPEntryChangeControl.ENTRYCHANGED
.java.io.IOException
- If value is not a valid BER sequence.LDAPControl.register(java.lang.String, java.lang.Class)
public void setChangeNumber(int num)
num
- change number to setgetChangeNumber()
public void setChangeType(int num)
num
- change type to set. 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)
getChangeType()
public void setPreviousDN(java.lang.String dn)
dn
- the previous distinguished name of the entrygetPreviousDN()
public int getChangeNumber()
setChangeNumber(int)
public int getChangeType()
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)
setChangeType(int)
public java.lang.String getPreviousDN()
setPreviousDN(java.lang.String)
public java.lang.String toString()
LDAPControl
toString
in class LDAPControl