org.ldaptive.control
Class SortResponseControl

java.lang.Object
  extended by org.ldaptive.control.AbstractControl
      extended by org.ldaptive.control.SortResponseControl
All Implemented Interfaces:
Control, ResponseControl

public class SortResponseControl
extends AbstractControl
implements ResponseControl

Response control for server side sorting. See RFC 2891. Control is defined as:

       SortResult ::= SEQUENCE {
          sortResult  ENUMERATED {
              success                   (0), -- results are sorted
              operationsError           (1), -- server internal failure
              timeLimitExceeded         (3), -- timelimit reached before
                                             -- sorting was completed
              strongAuthRequired        (8), -- refused to return sorted
                                             -- results via insecure
                                             -- protocol
              adminLimitExceeded       (11), -- too many matching entries
                                             -- for the server to sort
              noSuchAttribute          (16), -- unrecognized attribute
                                             -- type in sort key
              inappropriateMatching    (18), -- unrecognized or
                                             -- inappropriate matching
                                             -- rule in sort key
              insufficientAccessRights (50), -- refused to return sorted
                                             -- results to this client
              busy                     (51), -- too busy to process
              unwillingToPerform       (53), -- unable to sort
              other                    (80)
              },
        attributeType [0] AttributeDescription OPTIONAL }
 

Version:
$Revision: 3189 $ $Date: 2016-11-01 17:21:43 -0400 (Tue, 01 Nov 2016) $
Author:
Middleware Services

Field Summary
static String OID
          OID of this control.
 
Fields inherited from class org.ldaptive.control.AbstractControl
logger
 
Constructor Summary
SortResponseControl()
          Default constructor.
SortResponseControl(boolean critical)
          Creates a new sort response control.
SortResponseControl(ResultCode code, boolean critical)
          Creates a new sort response control.
SortResponseControl(ResultCode code, String attrName, boolean critical)
          Creates a new sort response control.
 
Method Summary
 void decode(byte[] berValue)
          Initializes this response control with the supplied BER encoded data.
 boolean equals(Object o)
          
 String getAttributeName()
          Returns the attribute name that caused the sort to fail.
 ResultCode getSortResult()
          Returns the result code of the server side sort.
 int hashCode()
          Returns the hash code for this object.
 void setAttributeName(String name)
          Sets the attribute name that caused the sort to fail.
 void setSortResult(ResultCode code)
          Sets the result code of the server side sort.
 String toString()
          
 
Methods inherited from class org.ldaptive.control.AbstractControl
getCriticality, getOID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ldaptive.control.Control
getCriticality, getOID
 

Field Detail

OID

public static final String OID
OID of this control.

See Also:
Constant Field Values
Constructor Detail

SortResponseControl

public SortResponseControl()
Default constructor.


SortResponseControl

public SortResponseControl(boolean critical)
Creates a new sort response control.

Parameters:
critical - whether this control is critical

SortResponseControl

public SortResponseControl(ResultCode code,
                           boolean critical)
Creates a new sort response control.

Parameters:
code - result of the sort
critical - whether this control is critical

SortResponseControl

public SortResponseControl(ResultCode code,
                           String attrName,
                           boolean critical)
Creates a new sort response control.

Parameters:
code - result of the sort
attrName - name of the failed attribute
critical - whether this control is critical
Method Detail

getSortResult

public ResultCode getSortResult()
Returns the result code of the server side sort.

Returns:
result code

setSortResult

public void setSortResult(ResultCode code)
Sets the result code of the server side sort.

Parameters:
code - result code

getAttributeName

public String getAttributeName()
Returns the attribute name that caused the sort to fail.

Returns:
attribute name

setAttributeName

public void setAttributeName(String name)
Sets the attribute name that caused the sort to fail.

Parameters:
name - of an attribute

equals

public boolean equals(Object o)

Overrides:
equals in class AbstractControl

hashCode

public int hashCode()
Description copied from class: AbstractControl
Returns the hash code for this object.

Specified by:
hashCode in class AbstractControl
Returns:
hash code

toString

public String toString()

Overrides:
toString in class Object

decode

public void decode(byte[] berValue)
Initializes this response control with the supplied BER encoded data.

Specified by:
decode in interface ResponseControl
Parameters:
berValue - BER encoded response control


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.