org.opends.server.controls
Class ServerSideSortRequestControl

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

public class ServerSideSortRequestControl
extends Control

This class implements the server-side sort request control as defined in RFC 2891 section 1.1. The ASN.1 description for the control value is:

 SortKeyList ::= SEQUENCE OF SEQUENCE {
            attributeType   AttributeDescription,
            orderingRule    [0] MatchingRuleId OPTIONAL,
            reverseOrder    [1] BOOLEAN DEFAULT FALSE }
 


Constructor Summary
ServerSideSortRequestControl(SortOrder sortOrder)
          Creates a new server-side sort request control based on the provided sort order.
ServerSideSortRequestControl(java.lang.String sortOrderString)
          Creates a new server-side sort request control based on the definition in the provided sort order string.
 
Method Summary
static ServerSideSortRequestControl decodeControl(Control control)
          Creates a new server-side sort request control from the contents of the provided control.
 SortOrder getSortOrder()
          Retrieves the sort order for this server-side sort request control.
 java.lang.String toString()
          Retrieves a string representation of this server-side sort request control.
 void toString(java.lang.StringBuilder buffer)
          Appends a string representation of this server-side sort 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

ServerSideSortRequestControl

public ServerSideSortRequestControl(SortOrder sortOrder)
Creates a new server-side sort request control based on the provided sort order.

Parameters:
sortOrder - The sort order to use for this control.

ServerSideSortRequestControl

public ServerSideSortRequestControl(java.lang.String sortOrderString)
                             throws LDAPException
Creates a new server-side sort request control based on the definition in the provided sort order string. This is only intended for client-side use, and controls created with this constructor should not attempt to use the generated sort order for any purpose.

Parameters:
sortOrderString - The string representation of the sort order to use for the control.
Throws:
LDAPException - If the provided sort order string could not be decoded.
Method Detail

getSortOrder

public SortOrder getSortOrder()
Retrieves the sort order for this server-side sort request control.

Returns:
The sort order for this server-side sort request control.

decodeControl

public static ServerSideSortRequestControl decodeControl(Control control)
                                                  throws LDAPException
Creates a new server-side sort request control from the contents of the provided control.

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

toString

public java.lang.String toString()
Retrieves a string representation of this server-side sort request control.

Overrides:
toString in class Control
Returns:
A string representation of this server-side sort request control.

toString

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

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