|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.directory.shared.asn1.AbstractAsn1Object
org.apache.directory.shared.ldap.codec.controls.AbstractControl
org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeControl
public class EntryChangeControl
A response control that may be returned by Persistent Search entry responses. It contains addition change information to describe the exact change that occurred to an entry. The exact details of this control are covered in section 5 of this (yes) expired draft: Persistent Search Draft v03 which is printed out below for convenience:
5. Entry Change Notification Control This control provides additional information about the change the caused a particular entry to be returned as the result of a persistent search. The controlType is "2.16.840.1.113730.3.4.7". If the client set the returnECs boolean to TRUE in the PersistentSearch control, servers MUST include an EntryChangeNotification control in the Controls portion of each SearchResultEntry that is returned due to an entry being added, deleted, or modified. EntryChangeNotification ::= SEQUENCE { changeType ENUMERATED { add (1), delete (2), modify (4), modDN (8) }, previousDN LDAPDN OPTIONAL, -- modifyDN ops. only changeNumber INTEGER OPTIONAL -- if supported } changeType indicates what LDAP operation caused the entry to be returned. previousDN is present only for modifyDN operations and gives the DN of the entry before it was renamed and/or moved. Servers MUST include this optional field only when returning change notifications as a result of modifyDN operations. changeNumber is the change number [CHANGELOG] assigned by a server for the change. If a server supports an LDAP Change Log it SHOULD include this field.
Field Summary | |
---|---|
static java.lang.String |
CONTROL_OID
The EntryChange control |
static int |
UNDEFINED_CHANGE_NUMBER
|
Fields inherited from class org.apache.directory.shared.ldap.codec.controls.AbstractControl |
---|
decoder, value, valueLength |
Fields inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
---|
parent |
Constructor Summary | |
---|---|
EntryChangeControl()
|
Method Summary | |
---|---|
int |
computeLength()
Compute the EntryChangeControl length 0x30 L1 | +--> 0x0A 0x0(1-4) [1|2|4|8] (changeType) [+--> 0x04 L2 previousDN] [+--> 0x02 0x0(1-4) [0..2^63-1] (changeNumber)] |
java.nio.ByteBuffer |
encode(java.nio.ByteBuffer buffer)
Encodes the entry change control. |
long |
getChangeNumber()
|
ChangeType |
getChangeType()
|
DN |
getPreviousDn()
|
byte[] |
getValue()
Get the control value |
void |
setChangeNumber(long changeNumber)
|
void |
setChangeType(ChangeType changeType)
Set the ChangeType |
void |
setPreviousDn(DN previousDn)
|
java.lang.String |
toString()
Return a String representing this EntryChangeControl. |
Methods inherited from class org.apache.directory.shared.ldap.codec.controls.AbstractControl |
---|
computeLength, getDecoder, getOid, hasValue, isCritical, setCritical, setValue |
Methods inherited from class org.apache.directory.shared.asn1.AbstractAsn1Object |
---|
addLength, getCurrentLength, getExpectedLength, getParent, getTlvId, setCurrentLength, setExpectedLength, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONTROL_OID
public static final int UNDEFINED_CHANGE_NUMBER
Constructor Detail |
---|
public EntryChangeControl()
Asn1Object#Asn1Object
Method Detail |
---|
public int computeLength()
computeLength
in interface Asn1Object
computeLength
in interface CodecControl
computeLength
in class AbstractControl
public java.nio.ByteBuffer encode(java.nio.ByteBuffer buffer) throws EncoderException
encode
in interface Asn1Object
encode
in interface CodecControl
encode
in class AbstractControl
buffer
- The encoded sink
EncoderException
- If anything goes wrong.public byte[] getValue()
getValue
in interface Control
getValue
in class AbstractControl
public ChangeType getChangeType()
public void setChangeType(ChangeType changeType)
changeType
- Add, Delete; Modify or ModifyDNpublic DN getPreviousDn()
public void setPreviousDn(DN previousDn)
public long getChangeNumber()
public void setChangeNumber(long changeNumber)
public java.lang.String toString()
toString
in class AbstractControl
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |