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>SortResult ::= SEQUENCE {<br>
27 * sortResult ENUMERATED {<br>
28 * success (0), -- results are sorted<br>
29 * operationsError (1), -- server internal failure<br>
30 * timeLimitExceeded (3), -- timelimit reached before sorting was completed<br>
31 * strongAuthRequired (8), -- refused to return sorted results via insecure protocol<br>
32 * adminLimitExceeded (11), -- too many matching entries for the server to sort<br>
33 * noSuchAttribute (16), -- unrecognized attribute type in sort key<br>
34 * inappropriateMatching (18), -- unrecognized or inappropriate matching rule in sort key<br>
35 * insufficientAccessRights (50), -- refused to return sorted results to this client<br>
36 * busy (51), -- too busy to process<br>
37 * unwillingToPerform (53), -- unable to sort<br>
38 * other (80)<br>
39 * },<br>
40 * attributeType [0] AttributeDescription OPTIONAL }<br><pre>
41 *
42 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
43 */
44 public interface SortResponse extends Control
45 {
46 /** the OID of the response control */
47 String OID = "1.2.840.113556.1.4.474";
48
49 /**
50 * sets the sort result
51 *
52 * @param result
53 */
54 void setSortResult( SortResultCode result );
55
56
57 /**
58 * @return the sort result
59 */
60 SortResultCode getSortResult();
61
62
63 /**
64 * sets the name of the first offending attribute
65 *
66 * @param attributeName
67 */
68 // didn't name the method setAttribute*Type*
69 // cause in our internal terminology AttributeType is a java type
70 void setAttributeName( String attributeName );
71
72
73 /**
74 * @return the name of the first offending attribute
75 */
76 String getAttributeName();
77 }