Class SortResponseControl

java.lang.Object
org.ldaptive.control.AbstractControl
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 }
 
  • Field Details

    • OID

      public static final String OID
      OID of this control.
      See Also:
    • HASH_CODE_SEED

      private static final int HASH_CODE_SEED
      hash code seed.
      See Also:
    • sortResult

      private ResultCode sortResult
      Result of the server side sorting.
    • attributeName

      private String attributeName
      Failed attribute name.
  • Constructor Details

    • 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 Details

    • 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 AbstractControl
    • decode

      public void decode(DERBuffer encoded)
      Description copied from interface: ResponseControl
      Initializes this response control with the supplied BER encoded data.
      Specified by:
      decode in interface ResponseControl
      Parameters:
      encoded - BER encoded response control