/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* or http://forgerock.org/license/CDDLv1.0.html.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008-2009 Sun Microsystems, Inc.
* Portions Copyright 2014 ForgeRock AS
*/
package org.opends.server.controls;
import org.forgerock.i18n.LocalizableMessage;
import java.io.IOException;
import org.opends.server.protocols.asn1.*;
import static org.opends.server.protocols.asn1.ASN1Constants.
UNIVERSAL_OCTET_STRING_TYPE;
import org.opends.server.types.Control;
import org.opends.server.types.DirectoryException;
import org.forgerock.opendj.ldap.ByteString;
import org.opends.server.types.ResultCode;
import static org.opends.messages.ProtocolMessages.*;
import static org.opends.server.util.ServerConstants.*;
import static org.opends.server.util.StaticUtils.*;
/**
* This class implements the server-side sort response control as defined in RFC
* 2891 section 1.2. The ASN.1 description for the control value is:
*
*
* 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 }
*
*/
public class ServerSideSortResponseControl
extends Control
{
/**
* ControlDecoder implentation to decode this control from a ByteString.
*/
private final static class Decoder
implements ControlDecoder