Class VirtualListViewRequestDecorator
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.ControlDecorator<VirtualListViewRequest>
-
- org.apache.directory.api.ldap.extras.controls.vlv_impl.VirtualListViewRequestDecorator
-
- All Implemented Interfaces:
Asn1Object
,CodecControl<VirtualListViewRequest>
,Decorator<VirtualListViewRequest>
,VirtualListViewRequest
,Control
public class VirtualListViewRequestDecorator extends ControlDecorator<VirtualListViewRequest> implements VirtualListViewRequest
The VirtualListView decorator- Author:
- Apache Directory Project
-
-
Field Summary
-
Fields inherited from interface org.apache.directory.api.ldap.extras.controls.vlv.VirtualListViewRequest
OID
-
-
Constructor Summary
Constructors Constructor Description VirtualListViewRequestDecorator(LdapApiService codec)
Creates a new instance of VirtualListViewRequestDecorator.VirtualListViewRequestDecorator(LdapApiService codec, VirtualListViewRequest vlvRequest)
Creates a new instance of VirtualListViewRequestDecorator.
-
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
getAfterCount()
byte[]
getAssertionValue()
int
getBeforeCount()
int
getContentCount()
byte[]
getContextId()
int
getOffset()
byte[]
getValue()
Get the control valueboolean
hasAssertionValue()
boolean
hasOffset()
void
setAfterCount(int afterCount)
void
setAssertionValue(byte[] assertionValue)
void
setBeforeCount(int beforeCount)
void
setContentCount(int contentCount)
void
setContextId(byte[] contextId)
void
setOffset(int offset)
-
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
-
VirtualListViewRequestDecorator
public VirtualListViewRequestDecorator(LdapApiService codec)
Creates a new instance of VirtualListViewRequestDecorator.- Parameters:
codec
- The LDAP Service to use
-
VirtualListViewRequestDecorator
public VirtualListViewRequestDecorator(LdapApiService codec, VirtualListViewRequest vlvRequest)
Creates a new instance of VirtualListViewRequestDecorator.- Parameters:
codec
- The LDAP Service to usevlvRequest
- The VLV request to use
-
-
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<VirtualListViewRequest>
- Overrides:
getValue
in classControlDecorator<VirtualListViewRequest>
- 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<VirtualListViewRequest>
- Parameters:
controlBytes
- the encoded control bytes- Returns:
- the decoded Asn1Object for the control
- Throws:
DecoderException
- if anything goes wrong
-
getBeforeCount
public int getBeforeCount()
- Specified by:
getBeforeCount
in interfaceVirtualListViewRequest
- Returns:
- The number of entries before the target entry that are going to be sent
-
setBeforeCount
public void setBeforeCount(int beforeCount)
- Specified by:
setBeforeCount
in interfaceVirtualListViewRequest
- Parameters:
beforeCount
- Set the number of entries to be returned before the target entry
-
getAfterCount
public int getAfterCount()
- Specified by:
getAfterCount
in interfaceVirtualListViewRequest
- Returns:
- The number of entries after the target entry that are going to be sent
-
setAfterCount
public void setAfterCount(int afterCount)
- Specified by:
setAfterCount
in interfaceVirtualListViewRequest
- Parameters:
afterCount
- Set the number of entries to be returned after the target entry
-
getOffset
public int getOffset()
- Specified by:
getOffset
in interfaceVirtualListViewRequest
- Returns:
- The position of the target entry
-
setOffset
public void setOffset(int offset)
- Specified by:
setOffset
in interfaceVirtualListViewRequest
- Parameters:
offset
- the position of the target entry
-
getContentCount
public int getContentCount()
- Specified by:
getContentCount
in interfaceVirtualListViewRequest
- Returns:
- The number of expected entries
-
setContentCount
public void setContentCount(int contentCount)
- Specified by:
setContentCount
in interfaceVirtualListViewRequest
- Parameters:
contentCount
- The number of entries
-
getContextId
public byte[] getContextId()
- Specified by:
getContextId
in interfaceVirtualListViewRequest
- Returns:
- The ID used for this request
-
setContextId
public void setContextId(byte[] contextId)
- Specified by:
setContextId
in interfaceVirtualListViewRequest
- Parameters:
contextId
- Set the context ID
-
getAssertionValue
public byte[] getAssertionValue()
- Specified by:
getAssertionValue
in interfaceVirtualListViewRequest
- Returns:
- The AssertionValue
-
setAssertionValue
public void setAssertionValue(byte[] assertionValue)
- Specified by:
setAssertionValue
in interfaceVirtualListViewRequest
- Parameters:
assertionValue
- Set the AssertionValue
-
hasOffset
public boolean hasOffset()
- Specified by:
hasOffset
in interfaceVirtualListViewRequest
- Returns:
true
if the VLV target is an offset, false otherwise
-
hasAssertionValue
public boolean hasAssertionValue()
- Specified by:
hasAssertionValue
in interfaceVirtualListViewRequest
- Returns:
true
if the VLV target is an assertionValue, false otherwise
-
-