001/*
002 *   Licensed to the Apache Software Foundation (ASF) under one
003 *   or more contributor license agreements.  See the NOTICE file
004 *   distributed with this work for additional information
005 *   regarding copyright ownership.  The ASF licenses this file
006 *   to you under the Apache License, Version 2.0 (the
007 *   "License"); you may not use this file except in compliance
008 *   with the License.  You may obtain a copy of the License at
009 *
010 *     https://www.apache.org/licenses/LICENSE-2.0
011 *
012 *   Unless required by applicable law or agreed to in writing,
013 *   software distributed under the License is distributed on an
014 *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 *   KIND, either express or implied.  See the License for the
016 *   specific language governing permissions and limitations
017 *   under the License.
018 *
019 */
020package org.apache.directory.api.ldap.model.message.controls;
021
022
023import java.util.List;
024
025import org.apache.directory.api.ldap.model.message.Control;
026
027
028/**
029 * Implementation of Server Side Sort request control based on
030 * the <a href="http://tools.ietf.org/html/rfc2891">RFC 2891</a><br><br>
031 *
032 * <pre>
033 *       SortKeyList ::= SEQUENCE OF SEQUENCE {
034 *               attributeType   AttributeDescription,
035 *               orderingRule    [0] MatchingRuleId OPTIONAL,
036 *               reverseOrder    [1] BOOLEAN DEFAULT FALSE }
037 * </pre>
038 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
039 */
040public interface SortRequest extends Control
041{
042    /** the sort request control's OID */
043    String OID = "1.2.840.113556.1.4.473";
044
045
046    /**
047     * sets the sort keys
048     *
049     * @param sortKeys The list of keys to be sorted
050     */
051    void setSortKeys( List<SortKey> sortKeys );
052
053
054    /**
055     * @return the list of sort keys
056     */
057    List<SortKey> getSortKeys();
058
059
060    /**
061     * adds a sort key
062     *
063     * @param sortKey The list of keys to be sorted
064     */
065    void addSortKey( SortKey sortKey );
066}