public class PersistentSearchDecorator extends ControlDecorator<PersistentSearch> implements PersistentSearch
CHANGE_TYPES_MAX, CHANGE_TYPES_MIN, OID
Constructor and Description |
---|
PersistentSearchDecorator(LdapApiService codec)
Default constructor creates a PersistentSearch Control automatically
wrapped in a decorator object inside this container.
|
PersistentSearchDecorator(LdapApiService codec,
PersistentSearch control)
Creates a PersistentSearch Control wrapping a supplied PersistentSearch
Control.
|
Modifier and Type | Method and Description |
---|---|
int |
computeLength()
Compute the PagedSearchControl length, which is the sum
of the control length and the value length.
|
Asn1Object |
decode(byte[] controlBytes)
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.
|
void |
disableNotification(ChangeType changeType)
Unsets the notification for a given changeType
|
void |
enableNotification(ChangeType changeType)
Sets the notification for a given changeType
|
ByteBuffer |
encode(ByteBuffer buffer)
Encodes the persistent search control.
|
int |
getChangeTypes() |
byte[] |
getValue()
Get the control value
|
boolean |
isChangesOnly() |
boolean |
isNotificationEnabled(ChangeType changeType)
For each changeType, tells if the notification is enabled
|
boolean |
isReturnECs() |
void |
setChangesOnly(boolean changesOnly)
Sets the ChangesOnly flag
|
void |
setChangeTypes(int changeTypes)
Set the changeType value we want to get back ( a combinaison of Add, Delete,
Modify and ModifyDN)
|
void |
setReturnECs(boolean returnECs)
Sets the return entry changes flag
|
equals, getCodecService, getDecorated, getOid, hashCode, hasValue, isCritical, setCritical, setDecorated, setValue, toString
getOid, isCritical, setCritical
public PersistentSearchDecorator(LdapApiService codec)
codec
- The LDAP service instancepublic PersistentSearchDecorator(LdapApiService codec, PersistentSearch control)
codec
- The LDAP service instancecontrol
- The PersistentSearch Control to wrap.public int computeLength()
PersistentSearchDecorator value length : 0x30 L1 | +--> 0x02 0x0(1-4) [0..2^31-1] (changeTypes) +--> 0x01 0x01 [0x00 | 0xFF] (changeOnly) +--> 0x01 0x01 [0x00 | 0xFF] (returnRCs)
computeLength
in interface Asn1Object
computeLength
in interface Decorator<PersistentSearch>
computeLength
in class ControlDecorator<PersistentSearch>
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
encode
in interface Asn1Object
encode
in interface Decorator<PersistentSearch>
buffer
- The encoded sinkEncoderException
- If anything goes wrong.public byte[] getValue()
getValue
in interface CodecControl<PersistentSearch>
getValue
in class ControlDecorator<PersistentSearch>
public void setChangesOnly(boolean changesOnly)
setChangesOnly
in interface PersistentSearch
changesOnly
- The ChangesOnly flagpublic boolean isChangesOnly()
isChangesOnly
in interface PersistentSearch
public void setReturnECs(boolean returnECs)
setReturnECs
in interface PersistentSearch
returnECs
- the return entry changes flagpublic boolean isReturnECs()
isReturnECs
in interface PersistentSearch
public void setChangeTypes(int changeTypes)
setChangeTypes
in interface PersistentSearch
changeTypes
- The changeType values (Add, Modify, Delete and ModifyDn)public int getChangeTypes()
getChangeTypes
in interface PersistentSearch
public boolean isNotificationEnabled(ChangeType changeType)
isNotificationEnabled
in interface PersistentSearch
changeType
- The ChnageType we are interested inpublic void enableNotification(ChangeType changeType)
enableNotification
in interface PersistentSearch
changeType
- The chnageType we want some notification to be setpublic void disableNotification(ChangeType changeType)
disableNotification
in interface PersistentSearch
changeType
- The chnageType we want some notification to be unsetpublic Asn1Object decode(byte[] controlBytes) throws DecoderException
decode
in interface CodecControl<PersistentSearch>
controlBytes
- the encoded control bytesDecoderException
- if anything goes wrongCopyright © 2003–2018 The Apache Software Foundation. All rights reserved.