View Javadoc
1   /*
2    *   Licensed to the Apache Software Foundation (ASF) under one
3    *   or more contributor license agreements.  See the NOTICE file
4    *   distributed with this work for additional information
5    *   regarding copyright ownership.  The ASF licenses this file
6    *   to you under the Apache License, Version 2.0 (the
7    *   "License"); you may not use this file except in compliance
8    *   with the License.  You may obtain a copy of the License at
9    *
10   *     http://www.apache.org/licenses/LICENSE-2.0
11   *
12   *   Unless required by applicable law or agreed to in writing,
13   *   software distributed under the License is distributed on an
14   *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   *   KIND, either express or implied.  See the License for the
16   *   specific language governing permissions and limitations
17   *   under the License.
18   *
19   */
20  package org.apache.directory.api.ldap.model.message.controls;
21  
22  import org.apache.directory.api.ldap.model.message.Control;
23  
24  /**
25   * 
26   * <pre>
27   * SortResult ::= SEQUENCE {
28   *           sortResult  ENUMERATED {
29   *           success                   (0), -- results are sorted
30   *           operationsError           (1), -- server internal failure
31   *           timeLimitExceeded         (3), -- timelimit reached before sorting was completed
32   *           strongAuthRequired        (8), -- refused to return sorted results via insecure protocol
33   *           adminLimitExceeded       (11), -- too many matching entries for the server to sort
34   *           noSuchAttribute          (16), -- unrecognized attribute type in sort key
35   *           inappropriateMatching    (18), -- unrecognized or inappropriate matching rule in sort key
36   *           insufficientAccessRights (50), -- refused to return sorted results to this client
37   *           busy                     (51), -- too busy to process
38   *           unwillingToPerform       (53), -- unable to sort
39   *           other                    (80)
40   *           },
41   *       attributeType [0] AttributeDescription OPTIONAL }
42   * </pre>
43   *
44   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
45   */
46  public interface SortResponse extends Control
47  {
48      /** the OID of the response control */
49      String OID = "1.2.840.113556.1.4.474";
50      
51      /**
52       * sets the sort result
53       * 
54       * @param result The sort result code
55       */
56      void setSortResult( SortResultCode result );
57      
58      
59      /**
60       * @return the sort result
61       */
62      SortResultCode getSortResult();
63  
64      
65      /**
66       * Sets the name of the first offending attribute
67       *  
68       * @param attributeName The attribute's name 
69       */
70      // didn't name the method setAttribute*Type*
71      // cause in our internal terminology AttributeType is a java type
72      void setAttributeName( String attributeName );
73      
74      
75      /**
76       * @return the name of the first offending attribute
77       */
78      String getAttributeName();
79  }