2362N/A * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * Indicates whether the requested sort of search results was successful or not. 0N/A * When the result code indicates success then the results have been sorted as 0N/A * requested. Otherwise the sort was unsuccessful and additional details 0N/A * regarding the cause of the error may have been provided by the server. 0N/A * The code sample in {@link SortControl} shows how this class may be used. 0N/A * This class implements the LDAPv3 Response Control for server-side sorting 0N/A * The control's value has the following ASN.1 definition: 0N/A * SortResult ::= SEQUENCE { 0N/A * sortResult ENUMERATED { 0N/A * success (0), -- results are sorted 0N/A * operationsError (1), -- server internal failure 0N/A * timeLimitExceeded (3), -- timelimit reached before 0N/A * -- sorting was completed 0N/A * strongAuthRequired (8), -- refused to return sorted 0N/A * -- results via insecure 0N/A * adminLimitExceeded (11), -- too many matching entries 0N/A * -- for the server to sort 0N/A * noSuchAttribute (16), -- unrecognized attribute 0N/A * -- type in sort key 0N/A * inappropriateMatching (18), -- unrecognized or inappro- 0N/A * -- priate matching rule in 0N/A * insufficientAccessRights (50), -- refused to return sorted 0N/A * -- results to this client 0N/A * busy (51), -- too busy to process 0N/A * unwillingToPerform (53), -- unable to sort 0N/A * attributeType [0] AttributeType OPTIONAL } 0N/A * @author Vincent Ryan 0N/A * The server-side sort response control's assigned object identifier 0N/A * is 1.2.840.113556.1.4.474. 0N/A * The sort result code. 0N/A * The ID of the attribute that caused the sort to fail. 0N/A * Constructs a control to indicate the outcome of a sort request. 0N/A * @param id The control's object identifier string. 0N/A * @param criticality The control's criticality. 0N/A * @param value The control's ASN.1 BER encoded value. 0N/A * It is not cloned - any changes to value 0N/A * will affect the contents of the control. 0N/A * @exception IOException if an error is encountered 0N/A * while decoding the control's value. 0N/A * Determines if the search results have been successfully sorted. 0N/A * If an error occurred during sorting a NamingException is thrown. 0N/A * @return true if the search results have been sorted. 0N/A return (
resultCode ==
0);
// a result code of zero indicates success 0N/A * Retrieves the LDAP result code of the sort operation. 0N/A * @return The result code. A zero value indicates success. 0N/A * Retrieves the ID of the attribute that caused the sort to fail. 0N/A * Returns null if no ID was returned by the server. 0N/A * @return The possibly null ID of the bad attribute. 0N/A * Retrieves the NamingException appropriate for the result code. 0N/A * @return A NamingException or null if the result code indicates