Class VirtualListViewResponseDecorator
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.ControlDecorator<VirtualListViewResponse>
-
- org.apache.directory.api.ldap.extras.controls.vlv_impl.VirtualListViewResponseDecorator
-
- All Implemented Interfaces:
Asn1Object
,CodecControl<VirtualListViewResponse>
,Decorator<VirtualListViewResponse>
,VirtualListViewResponse
,Control
public class VirtualListViewResponseDecorator extends ControlDecorator<VirtualListViewResponse> implements VirtualListViewResponse
The VirtualListView response decorator- Author:
- Apache Directory Project
-
-
Field Summary
-
Fields inherited from interface org.apache.directory.api.ldap.extras.controls.vlv.VirtualListViewResponse
OID
-
-
Constructor Summary
Constructors Constructor Description VirtualListViewResponseDecorator(LdapApiService codec)
Create a new SyncRequestValueDecorator instanceVirtualListViewResponseDecorator(LdapApiService codec, VirtualListViewResponse vlvRequest)
Create a new SyncRequestValueDecorator instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
computeLength()
Compute the object length, which is the sum of all inner length.Asn1Object
decode(byte[] controlBytes)
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.ByteBuffer
encode(ByteBuffer buffer)
Encode the object to a PDU.int
getContentCount()
byte[]
getContextId()
int
getTargetPosition()
byte[]
getValue()
Get the control valueVirtualListViewResultCode
getVirtualListViewResult()
void
setContentCount(int contentCount)
Sets the number of returned entriesvoid
setContextId(byte[] contextId)
Sets the context IDvoid
setTargetPosition(int targetPosition)
Sets the position in the list of entriesvoid
setVirtualListViewResult(VirtualListViewResultCode virtualListViewResult)
Store the VLV result-
Methods inherited from class org.apache.directory.api.ldap.codec.api.ControlDecorator
equals, getCodecService, getDecorated, getOid, hashCode, hasValue, isCritical, setCritical, setDecorated, setValue, toString
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Control
getOid, isCritical, setCritical
-
-
-
-
Constructor Detail
-
VirtualListViewResponseDecorator
public VirtualListViewResponseDecorator(LdapApiService codec)
Create a new SyncRequestValueDecorator instance- Parameters:
codec
- The LDAP API service to use
-
VirtualListViewResponseDecorator
public VirtualListViewResponseDecorator(LdapApiService codec, VirtualListViewResponse vlvRequest)
Create a new SyncRequestValueDecorator instance- Parameters:
codec
- The LDAP API service to usevlvRequest
- The decorated VLV request
-
-
Method Detail
-
computeLength
public int computeLength()
Compute the object length, which is the sum of all inner length.- Specified by:
computeLength
in interfaceAsn1Object
- Returns:
- The object's computed length
-
encode
public ByteBuffer encode(ByteBuffer buffer) throws EncoderException
Encode the object to a PDU.- Specified by:
encode
in interfaceAsn1Object
- Parameters:
buffer
- The buffer where to put the PDU- Returns:
- The encoded PDU.
- Throws:
EncoderException
- if the buffer can't be encoded
-
getValue
public byte[] getValue()
Get the control value- Specified by:
getValue
in interfaceCodecControl<VirtualListViewResponse>
- Overrides:
getValue
in classControlDecorator<VirtualListViewResponse>
- Returns:
- The control value
-
decode
public Asn1Object decode(byte[] controlBytes) throws DecoderException
Decodes raw ASN.1 encoded bytes into an Asn1Object for the control.- Specified by:
decode
in interfaceCodecControl<VirtualListViewResponse>
- Parameters:
controlBytes
- the encoded control bytes- Returns:
- the decoded Asn1Object for the control
- Throws:
DecoderException
- if anything goes wrong
-
getTargetPosition
public int getTargetPosition()
- Specified by:
getTargetPosition
in interfaceVirtualListViewResponse
- Returns:
- the position in the list of entries
-
setTargetPosition
public void setTargetPosition(int targetPosition)
Sets the position in the list of entries- Specified by:
setTargetPosition
in interfaceVirtualListViewResponse
- Parameters:
targetPosition
- the position in the list of entries
-
getContentCount
public int getContentCount()
- Specified by:
getContentCount
in interfaceVirtualListViewResponse
- Returns:
- The number of returned entries
-
setContentCount
public void setContentCount(int contentCount)
Sets the number of returned entries- Specified by:
setContentCount
in interfaceVirtualListViewResponse
- Parameters:
contentCount
- The number of returned entries
-
getVirtualListViewResult
public VirtualListViewResultCode getVirtualListViewResult()
- Specified by:
getVirtualListViewResult
in interfaceVirtualListViewResponse
- Returns:
- The VLV result
-
setVirtualListViewResult
public void setVirtualListViewResult(VirtualListViewResultCode virtualListViewResult)
Store the VLV result- Specified by:
setVirtualListViewResult
in interfaceVirtualListViewResponse
- Parameters:
virtualListViewResult
- The result
-
getContextId
public byte[] getContextId()
- Specified by:
getContextId
in interfaceVirtualListViewResponse
- Returns:
- The context ID
-
setContextId
public void setContextId(byte[] contextId)
Sets the context ID- Specified by:
setContextId
in interfaceVirtualListViewResponse
- Parameters:
contextId
- The context ID
-
-