org.opends.server.controls
Class VLVResponseControl

java.lang.Object
  extended by org.opends.server.types.Control
      extended by org.opends.server.controls.VLVResponseControl

public class VLVResponseControl
extends Control

This class implements the virtual list view response controls as defined in draft-ietf-ldapext-ldapv3-vlv. The ASN.1 description for the control value is:

 VirtualListViewResponse ::= SEQUENCE {
       targetPosition    INTEGER (0 .. maxInt),
       contentCount     INTEGER (0 .. maxInt),
       virtualListViewResult ENUMERATED {
            success (0),
            operationsError (1),
            protocolError (3),
            unwillingToPerform (53),
            insufficientAccessRights (50),
            timeLimitExceeded (3),
            adminLimitExceeded (11),
            innapropriateMatching (18),
            sortControlMissing (60),
            offsetRangeError (61),
            other(80),
            ... },
       contextID     OCTET STRING OPTIONAL }
 


Constructor Summary
VLVResponseControl(int targetPosition, int contentCount, int vlvResultCode)
          Creates a new VLV response control with the provided information.
VLVResponseControl(int targetPosition, int contentCount, int vlvResultCode, ByteString contextID)
          Creates a new VLV response control with the provided information.
 
Method Summary
static VLVResponseControl decodeControl(Control control)
          Creates a new VLV response control from the contents of the provided control.
 int getContentCount()
          Retrieves the estimated total number of entries in the result set.
 ByteString getContextID()
          Retrieves a context ID value that should be included in the next request to retrieve a page of the same result set.
 int getTargetPosition()
          Retrieves the position of the target entry in the result set.
 int getVLVResultCode()
          Retrieves the result code for the VLV operation.
 java.lang.String toString()
          Retrieves a string representation of this VLV request control.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this VLV request control to the provided buffer.
 
Methods inherited from class org.opends.server.types.Control
getOID, getValue, hasValue, isCritical, setCritical, setOID, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

VLVResponseControl

public VLVResponseControl(int targetPosition,
                          int contentCount,
                          int vlvResultCode)
Creates a new VLV response control with the provided information.

Parameters:
targetPosition - The position of the target entry in the result set.
contentCount - The content count estimating the total number of entries in the result set.
vlvResultCode - The result code for the VLV operation.

VLVResponseControl

public VLVResponseControl(int targetPosition,
                          int contentCount,
                          int vlvResultCode,
                          ByteString contextID)
Creates a new VLV response control with the provided information.

Parameters:
targetPosition - The position of the target entry in the result set.
contentCount - The content count estimating the total number of entries in the result set.
vlvResultCode - The result code for the VLV operation.
contextID - The context ID for this VLV response control.
Method Detail

getTargetPosition

public int getTargetPosition()
Retrieves the position of the target entry in the result set.

Returns:
The position of the target entry in the result set.

getContentCount

public int getContentCount()
Retrieves the estimated total number of entries in the result set.

Returns:
The estimated total number of entries in the result set.

getVLVResultCode

public int getVLVResultCode()
Retrieves the result code for the VLV operation.

Returns:
The result code for the VLV operation.

getContextID

public ByteString getContextID()
Retrieves a context ID value that should be included in the next request to retrieve a page of the same result set.

Returns:
A context ID value that should be included in the next request to retrieve a page of the same result set, or null if there is no context ID.

decodeControl

public static VLVResponseControl decodeControl(Control control)
                                        throws LDAPException
Creates a new VLV response control from the contents of the provided control.

Parameters:
control - The generic control containing the information to use to create this VLV response control. It must not be null.
Returns:
The VLV response control decoded from the provided control.
Throws:
LDAPException - If this control cannot be decoded as a valid VLV response control.

toString

public java.lang.String toString()
Retrieves a string representation of this VLV request control.

Overrides:
toString in class Control
Returns:
A string representation of this VLV request control.

toString

public void toString(java.lang.StringBuilder buffer)
Appends a string representation of this VLV request control to the provided buffer.

Overrides:
toString in class Control
Parameters:
buffer - The buffer to which the information should be appended.