public class SyncInfoValueDecorator extends ControlDecorator<SyncInfoValue> implements SyncInfoValue
OID
Constructor and Description |
---|
SyncInfoValueDecorator(LdapApiService codec)
The constructor for this codec.
|
SyncInfoValueDecorator(LdapApiService codec,
SynchronizationInfoEnum type)
The constructor for this codec.
|
SyncInfoValueDecorator(LdapApiService codec,
SyncInfoValue control)
The constructor for this codec.
|
Modifier and Type | Method and Description |
---|---|
void |
addSyncUUID(byte[] syncUUID) |
int |
computeLength()
Compute the SyncInfoValue length.
|
Asn1Object |
decode(byte[] controlBytes)
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.
|
ByteBuffer |
encode(ByteBuffer buffer)
Encode the SyncInfoValue control
|
byte[] |
getCookie() |
List<byte[]> |
getSyncUUIDs() |
SynchronizationInfoEnum |
getType()
Get the control type.
|
byte[] |
getValue()
Get the control value
|
boolean |
isRefreshDeletes() |
boolean |
isRefreshDone() |
void |
setCookie(byte[] cookie) |
void |
setRefreshDeletes(boolean refreshDeletes) |
void |
setRefreshDone(boolean refreshDone) |
void |
setSyncUUIDs(List<byte[]> syncUUIDs) |
void |
setType(SynchronizationInfoEnum type) |
String |
toString()
Return a String representing a Control
|
equals, getCodecService, getDecorated, getOid, hashCode, hasValue, isCritical, setCritical, setDecorated, setValue
getOid, isCritical, setCritical
public SyncInfoValueDecorator(LdapApiService codec)
codec
- The LDAP Service to usepublic SyncInfoValueDecorator(LdapApiService codec, SyncInfoValue control)
codec
- The LDAP Service to usecontrol
- The SyncInfoValue to decoratepublic SyncInfoValueDecorator(LdapApiService codec, SynchronizationInfoEnum type)
codec
- The LDAP Service to usetype
- The kind of syncInfo we will store. Can be newCookie,
refreshPresent, refreshDelete or syncIdSetpublic SynchronizationInfoEnum getType()
getType
in interface SyncInfoValue
public void setType(SynchronizationInfoEnum type)
setType
in interface SyncInfoValue
type
- the synchronization type to setpublic byte[] getCookie()
getCookie
in interface SyncInfoValue
public void setCookie(byte[] cookie)
setCookie
in interface SyncInfoValue
cookie
- the cookie to setpublic boolean isRefreshDone()
isRefreshDone
in interface SyncInfoValue
public void setRefreshDone(boolean refreshDone)
setRefreshDone
in interface SyncInfoValue
refreshDone
- the refreshDone to setpublic boolean isRefreshDeletes()
isRefreshDeletes
in interface SyncInfoValue
public void setRefreshDeletes(boolean refreshDeletes)
setRefreshDeletes
in interface SyncInfoValue
refreshDeletes
- the refreshDeletes to setpublic List<byte[]> getSyncUUIDs()
getSyncUUIDs
in interface SyncInfoValue
public void setSyncUUIDs(List<byte[]> syncUUIDs)
setSyncUUIDs
in interface SyncInfoValue
syncUUIDs
- the syncUUIDs to setpublic void addSyncUUID(byte[] syncUUID)
addSyncUUID
in interface SyncInfoValue
syncUUID
- the syncUUIDs to setpublic int computeLength()
0xA0 L1 abcd // newCookie 0xA1 L2 // refreshDelete | [+--> 0x04 L3 abcd] // cookie [+--> 0x01 0x01 (0x00|0xFF) // refreshDone 0xA2 L4 // refreshPresent | [+--> 0x04 L5 abcd] // cookie [+--> 0x01 0x01 (0x00|0xFF) // refreshDone 0xA3 L6 // syncIdSet | [+--> 0x04 L7 abcd] // cookie [+--> 0x01 0x01 (0x00|0xFF) // refreshDeletes +--> 0x31 L8 // SET OF syncUUIDs | [+--> 0x04 L9 abcd] // syncUUID
computeLength
in interface Asn1Object
computeLength
in interface Decorator<SyncInfoValue>
computeLength
in class ControlDecorator<SyncInfoValue>
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
encode
in interface Asn1Object
encode
in interface Decorator<SyncInfoValue>
buffer
- The encoded sinkEncoderException
- If anything goes wrong.public byte[] getValue()
getValue
in interface CodecControl<SyncInfoValue>
getValue
in class ControlDecorator<SyncInfoValue>
public Asn1Object decode(byte[] controlBytes) throws DecoderException
decode
in interface CodecControl<SyncInfoValue>
controlBytes
- the encoded control bytesDecoderException
- if anything goes wrongpublic String toString()
ControlDecorator
toString
in class ControlDecorator<SyncInfoValue>
Object.toString()
Copyright © 2003–2018 The Apache Software Foundation. All rights reserved.