001 /*
002 * Copyright 2007-2013 UnboundID Corp.
003 * All Rights Reserved.
004 */
005 /*
006 * Copyright (C) 2008-2013 UnboundID Corp.
007 *
008 * This program is free software; you can redistribute it and/or modify
009 * it under the terms of the GNU General Public License (GPLv2 only)
010 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
011 * as published by the Free Software Foundation.
012 *
013 * This program is distributed in the hope that it will be useful,
014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
016 * GNU General Public License for more details.
017 *
018 * You should have received a copy of the GNU General Public License
019 * along with this program; if not, see <http://www.gnu.org/licenses>.
020 */
021 package com.unboundid.ldap.sdk;
022
023
024
025 import java.io.Serializable;
026 import java.util.HashMap;
027
028 import com.unboundid.util.NotMutable;
029 import com.unboundid.util.ThreadSafety;
030 import com.unboundid.util.ThreadSafetyLevel;
031
032 import static com.unboundid.ldap.sdk.LDAPMessages.*;
033
034
035
036 /**
037 * This class defines a number of constants associated with LDAP result codes.
038 * The {@code ResultCode} constant values defined in this class are immutable,
039 * and at most one result code object will ever be created for a given int
040 * value, so it is acceptable to compare result codes with either the
041 * {@link ResultCode#equals} method or the "{@code ==}" operator.
042 *<BR><BR>
043 * The result codes that are currently defined include:
044 * <BR>
045 * <CENTER>
046 * <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="50%">
047 * <TR>
048 * <TH ALIGN="LEFT">Name</TH>
049 * <TH ALIGN="RIGHT">Integer Value</TH>
050 * </TR>
051 * <TR>
052 * <TD ALIGN="LEFT">SUCCESS</TD>
053 * <TD ALIGN="RIGHT">0</TD>
054 * </TR>
055 * <TR>
056 * <TD ALIGN="LEFT">OPERATIONS_ERROR</TD>
057 * <TD ALIGN="RIGHT">1</TD>
058 * </TR>
059 * <TR>
060 * <TD ALIGN="LEFT">PROTOCOL_ERROR</TD>
061 * <TD ALIGN="RIGHT">2</TD>
062 * </TR>
063 * <TR>
064 * <TD ALIGN="LEFT">TIME_LIMIT_EXCEEDED</TD>
065 * <TD ALIGN="RIGHT">3</TD>
066 * </TR>
067 * <TR>
068 * <TD ALIGN="LEFT">SIZE_LIMIT_EXCEEDED</TD>
069 * <TD ALIGN="RIGHT">4</TD>
070 * </TR>
071 * <TR>
072 * <TD ALIGN="LEFT">COMPARE_FALSE</TD>
073 * <TD ALIGN="RIGHT">5</TD>
074 * </TR>
075 * <TR>
076 * <TD ALIGN="LEFT">COMPARE_TRUE</TD>
077 * <TD ALIGN="RIGHT">6</TD>
078 * </TR>
079 * <TR>
080 * <TD ALIGN="LEFT">AUTH_METHOD_NOT_SUPPORTED</TD>
081 * <TD ALIGN="RIGHT">7</TD>
082 * </TR>
083 * <TR>
084 * <TD ALIGN="LEFT">STRONG_AUTH_REQUIRED</TD>
085 * <TD ALIGN="RIGHT">8</TD>
086 * </TR>
087 * <TR>
088 * <TD ALIGN="LEFT">REFERRAL</TD>
089 * <TD ALIGN="RIGHT">10</TD>
090 * </TR>
091 * <TR>
092 * <TD ALIGN="LEFT">ADMIN_LIMIT_EXCEEDED</TD>
093 * <TD ALIGN="RIGHT">11</TD>
094 * </TR>
095 * <TR>
096 * <TD ALIGN="LEFT">UNAVAILABLE_CRITICAL_EXTENSION</TD>
097 * <TD ALIGN="RIGHT">12</TD>
098 * </TR>
099 * <TR>
100 * <TD ALIGN="LEFT">CONFIDENTIALITY_REQUIRED</TD>
101 * <TD ALIGN="RIGHT">13</TD>
102 * </TR>
103 * <TR>
104 * <TD ALIGN="LEFT">SASL_BIND_IN_PROGRESS</TD>
105 * <TD ALIGN="RIGHT">14</TD>
106 * </TR>
107 * <TR>
108 * <TD ALIGN="LEFT">NO_SUCH_ATTRIBUTE</TD>
109 * <TD ALIGN="RIGHT">16</TD>
110 * </TR>
111 * <TR>
112 * <TD ALIGN="LEFT">UNDEFINED_ATTRIBUTE_TYPE</TD>
113 * <TD ALIGN="RIGHT">17</TD>
114 * </TR>
115 * <TR>
116 * <TD ALIGN="LEFT">INAPPROPRIATE_MATCHING</TD>
117 * <TD ALIGN="RIGHT">18</TD>
118 * </TR>
119 * <TR>
120 * <TD ALIGN="LEFT">CONSTRAINT_VIOLATION</TD>
121 * <TD ALIGN="RIGHT">19</TD>
122 * </TR>
123 * <TR>
124 * <TD ALIGN="LEFT">ATTRIBUTE_OR_VALUE_EXISTS</TD>
125 * <TD ALIGN="RIGHT">20</TD>
126 * </TR>
127 * <TR>
128 * <TD ALIGN="LEFT">INVALID_ATTRIBUTE_SYNTAX</TD>
129 * <TD ALIGN="RIGHT">21</TD>
130 * </TR>
131 * <TR>
132 * <TD ALIGN="LEFT">NO_SUCH_OBJECT</TD>
133 * <TD ALIGN="RIGHT">32</TD>
134 * </TR>
135 * <TR>
136 * <TD ALIGN="LEFT">ALIAS_PROBLEM</TD>
137 * <TD ALIGN="RIGHT">33</TD>
138 * </TR>
139 * <TR>
140 * <TD ALIGN="LEFT">INVALID_DN_SYNTAX</TD>
141 * <TD ALIGN="RIGHT">34</TD>
142 * </TR>
143 * <TR>
144 * <TD ALIGN="LEFT">ALIAS_DEREFERENCING_PROBLEM</TD>
145 * <TD ALIGN="RIGHT">36</TD>
146 * </TR>
147 * <TR>
148 * <TD ALIGN="LEFT">INAPPROPRIATE_AUTHENTICATION</TD>
149 * <TD ALIGN="RIGHT">48</TD>
150 * </TR>
151 * <TR>
152 * <TD ALIGN="LEFT">INVALID_CREDENTIALS</TD>
153 * <TD ALIGN="RIGHT">49</TD>
154 * </TR>
155 * <TR>
156 * <TD ALIGN="LEFT">INSUFFICIENT_ACCESS_RIGHTS</TD>
157 * <TD ALIGN="RIGHT">50</TD>
158 * </TR>
159 * <TR>
160 * <TD ALIGN="LEFT">BUSY</TD>
161 * <TD ALIGN="RIGHT">51</TD>
162 * </TR>
163 * <TR>
164 * <TD ALIGN="LEFT">UNAVAILABLE</TD>
165 * <TD ALIGN="RIGHT">52</TD>
166 * </TR>
167 * <TR>
168 * <TD ALIGN="LEFT">UNWILLING_TO_PERFORM</TD>
169 * <TD ALIGN="RIGHT">53</TD>
170 * </TR>
171 * <TR>
172 * <TD ALIGN="LEFT">LOOP-DETECT</TD>
173 * <TD ALIGN="RIGHT">54</TD>
174 * </TR>
175 * <TR>
176 * <TD ALIGN="LEFT">SORT_CONTROL_MISSING</TD>
177 * <TD ALIGN="RIGHT">60</TD>
178 * </TR>
179 * <TR>
180 * <TD ALIGN="LEFT">OFFSET_RANGE_ERROR</TD>
181 * <TD ALIGN="RIGHT">61</TD>
182 * </TR>
183 * <TR>
184 * <TD ALIGN="LEFT">NAMING_VIOLATION</TD>
185 * <TD ALIGN="RIGHT">64</TD>
186 * </TR>
187 * <TR>
188 * <TD ALIGN="LEFT">OBJECT_CLASS_VIOLATION</TD>
189 * <TD ALIGN="RIGHT">65</TD>
190 * </TR>
191 * <TR>
192 * <TD ALIGN="LEFT">NOT_ALLOWED_ON_NONLEAF</TD>
193 * <TD ALIGN="RIGHT">66</TD>
194 * </TR>
195 * <TR>
196 * <TD ALIGN="LEFT">NOT_ALLOWED_ON_NONLEAF</TD>
197 * <TD ALIGN="RIGHT">66</TD>
198 * </TR>
199 * <TR>
200 * <TD ALIGN="LEFT">NOT_ALLOWED_ON_RDN</TD>
201 * <TD ALIGN="RIGHT">67</TD>
202 * </TR>
203 * <TR>
204 * <TD ALIGN="LEFT">ENTRY_ALREADY_EXISTS</TD>
205 * <TD ALIGN="RIGHT">68</TD>
206 * </TR>
207 * <TR>
208 * <TD ALIGN="LEFT">OBJECT_CLASS_MODS_PROHIBITED</TD>
209 * <TD ALIGN="RIGHT">69</TD>
210 * </TR>
211 * <TR>
212 * <TD ALIGN="LEFT">AFFECTS_MULTIPLE_DSAS</TD>
213 * <TD ALIGN="RIGHT">71</TD>
214 * </TR>
215 * <TR>
216 * <TD ALIGN="LEFT">VIRTUAL_LIST_VIEW_ERROR</TD>
217 * <TD ALIGN="RIGHT">76</TD>
218 * </TR>
219 * <TR>
220 * <TD ALIGN="LEFT">OTHER</TD>
221 * <TD ALIGN="RIGHT">80</TD>
222 * </TR>
223 * <TR>
224 * <TD ALIGN="LEFT">SERVER_DOWN</TD>
225 * <TD ALIGN="RIGHT">81</TD>
226 * </TR>
227 * <TR>
228 * <TD ALIGN="LEFT">LOCAL_ERR0R</TD>
229 * <TD ALIGN="RIGHT">82</TD>
230 * </TR>
231 * <TR>
232 * <TD ALIGN="LEFT">ENCODING_ERR0R</TD>
233 * <TD ALIGN="RIGHT">83</TD>
234 * </TR>
235 * <TR>
236 * <TD ALIGN="LEFT">DECODING_ERR0R</TD>
237 * <TD ALIGN="RIGHT">84</TD>
238 * </TR>
239 * <TR>
240 * <TD ALIGN="LEFT">TIMEOUT</TD>
241 * <TD ALIGN="RIGHT">85</TD>
242 * </TR>
243 * <TR>
244 * <TD ALIGN="LEFT">AUTH_UNKNOWN</TD>
245 * <TD ALIGN="RIGHT">86</TD>
246 * </TR>
247 * <TR>
248 * <TD ALIGN="LEFT">FILTER_ERROR</TD>
249 * <TD ALIGN="RIGHT">87</TD>
250 * </TR>
251 * <TR>
252 * <TD ALIGN="LEFT">USER_CANCELED</TD>
253 * <TD ALIGN="RIGHT">88</TD>
254 * </TR>
255 * <TR>
256 * <TD ALIGN="LEFT">PARAM_ERROR</TD>
257 * <TD ALIGN="RIGHT">89</TD>
258 * </TR>
259 * <TR>
260 * <TD ALIGN="LEFT">NO_MEMORY</TD>
261 * <TD ALIGN="RIGHT">90</TD>
262 * </TR>
263 * <TR>
264 * <TD ALIGN="LEFT">CONNECT_ERROR</TD>
265 * <TD ALIGN="RIGHT">91</TD>
266 * </TR>
267 * <TR>
268 * <TD ALIGN="LEFT">NOT_SUPPORTED</TD>
269 * <TD ALIGN="RIGHT">92</TD>
270 * </TR>
271 * <TR>
272 * <TD ALIGN="LEFT">CONTROL_NOT_FOUND</TD>
273 * <TD ALIGN="RIGHT">93</TD>
274 * </TR>
275 * <TR>
276 * <TD ALIGN="LEFT">NO_RESULTS_RETURNED</TD>
277 * <TD ALIGN="RIGHT">94</TD>
278 * </TR>
279 * <TR>
280 * <TD ALIGN="LEFT">MORE_RESULTS_TO_RETURN</TD>
281 * <TD ALIGN="RIGHT">95</TD>
282 * </TR>
283 * <TR>
284 * <TD ALIGN="LEFT">CLIENT_LOOP</TD>
285 * <TD ALIGN="RIGHT">96</TD>
286 * </TR>
287 * <TR>
288 * <TD ALIGN="LEFT">REFERRAL_LIMIT_EXCEEDED</TD>
289 * <TD ALIGN="RIGHT">97</TD>
290 * </TR>
291 * <TR>
292 * <TD ALIGN="LEFT">CANCELED</TD>
293 * <TD ALIGN="RIGHT">118</TD>
294 * </TR>
295 * <TR>
296 * <TD ALIGN="LEFT">NO_SUCH_OPERATION</TD>
297 * <TD ALIGN="RIGHT">119</TD>
298 * </TR>
299 * <TR>
300 * <TD ALIGN="LEFT">TOO_LATE</TD>
301 * <TD ALIGN="RIGHT">120</TD>
302 * </TR>
303 * <TR>
304 * <TD ALIGN="LEFT">CANNOT_CANCEL</TD>
305 * <TD ALIGN="RIGHT">121</TD>
306 * </TR>
307 * <TR>
308 * <TD ALIGN="LEFT">ASSERTION_FAILED</TD>
309 * <TD ALIGN="RIGHT">122</TD>
310 * </TR>
311 * <TR>
312 * <TD ALIGN="LEFT">AUTHORIZATION_DENIED</TD>
313 * <TD ALIGN="RIGHT">123</TD>
314 * </TR>
315 * <TR>
316 * <TD ALIGN="LEFT">E_SYNC_REFRESH_REQUIRED</TD>
317 * <TD ALIGN="RIGHT">4096</TD>
318 * </TR>
319 * <TR>
320 * <TD ALIGN="LEFT">NO_OPERATION</TD>
321 * <TD ALIGN="RIGHT">16654</TD>
322 * </TR>
323 * <TR>
324 * <TD ALIGN="LEFT">INTERACTIVE_TRANSACTION_ABORTED</TD>
325 * <TD ALIGN="RIGHT">30221001</TD>
326 * </TR>
327 * </TABLE>
328 * </CENTER>
329 */
330 @NotMutable()
331 @ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE)
332 public final class ResultCode
333 implements Serializable
334 {
335 /**
336 * The integer value (0) for the "SUCCESS" result code.
337 */
338 public static final int SUCCESS_INT_VALUE = 0;
339
340
341
342 /**
343 * The result code (0) that will be used to indicate a successful operation.
344 */
345 public static final ResultCode SUCCESS =
346 new ResultCode(INFO_RC_SUCCESS.get(), SUCCESS_INT_VALUE);
347
348
349
350 /**
351 * The integer value (1) for the "OPERATIONS_ERROR" result code.
352 */
353 public static final int OPERATIONS_ERROR_INT_VALUE = 1;
354
355
356
357 /**
358 * The result code (1) that will be used to indicate that an operation was
359 * requested out of sequence.
360 */
361 public static final ResultCode OPERATIONS_ERROR =
362 new ResultCode(INFO_RC_OPERATIONS_ERROR.get(),
363 OPERATIONS_ERROR_INT_VALUE);
364
365
366
367 /**
368 * The integer value (2) for the "PROTOCOL_ERROR" result code.
369 */
370 public static final int PROTOCOL_ERROR_INT_VALUE = 2;
371
372
373
374 /**
375 * The result code (2) that will be used to indicate that the client sent a
376 * malformed request.
377 */
378 public static final ResultCode PROTOCOL_ERROR =
379 new ResultCode(INFO_RC_PROTOCOL_ERROR.get(), PROTOCOL_ERROR_INT_VALUE);
380
381
382
383 /**
384 * The integer value (3) for the "TIME_LIMIT_EXCEEDED" result code.
385 */
386 public static final int TIME_LIMIT_EXCEEDED_INT_VALUE = 3;
387
388
389
390 /**
391 * The result code (3) that will be used to indicate that the server was
392 * unable to complete processing on the request in the allotted time limit.
393 */
394 public static final ResultCode TIME_LIMIT_EXCEEDED =
395 new ResultCode(INFO_RC_TIME_LIMIT_EXCEEDED.get(),
396 TIME_LIMIT_EXCEEDED_INT_VALUE);
397
398
399
400 /**
401 * The integer value (4) for the "SIZE_LIMIT_EXCEEDED" result code.
402 */
403 public static final int SIZE_LIMIT_EXCEEDED_INT_VALUE = 4;
404
405
406
407 /**
408 * The result code (4) that will be used to indicate that the server found
409 * more matching entries than the configured request size limit.
410 */
411 public static final ResultCode SIZE_LIMIT_EXCEEDED =
412 new ResultCode(INFO_RC_SIZE_LIMIT_EXCEEDED.get(),
413 SIZE_LIMIT_EXCEEDED_INT_VALUE);
414
415
416
417 /**
418 * The integer value (5) for the "COMPARE_FALSE" result code.
419 */
420 public static final int COMPARE_FALSE_INT_VALUE = 5;
421
422
423
424 /**
425 * The result code (5) that will be used if a requested compare assertion does
426 * not match the target entry.
427 */
428 public static final ResultCode COMPARE_FALSE =
429 new ResultCode(INFO_RC_COMPARE_FALSE.get(), COMPARE_FALSE_INT_VALUE);
430
431
432
433 /**
434 * The integer value (6) for the "COMPARE_TRUE" result code.
435 */
436 public static final int COMPARE_TRUE_INT_VALUE = 6;
437
438
439
440 /**
441 * The result code (6) that will be used if a requested compare assertion
442 * matched the target entry.
443 */
444 public static final ResultCode COMPARE_TRUE =
445 new ResultCode(INFO_RC_COMPARE_TRUE.get(), COMPARE_TRUE_INT_VALUE);
446
447
448
449 /**
450 * The integer value (7) for the "AUTH_METHOD_NOT_SUPPORTED" result code.
451 */
452 public static final int AUTH_METHOD_NOT_SUPPORTED_INT_VALUE = 7;
453
454
455
456 /**
457 * The result code (7) that will be used if the client requested a form of
458 * authentication that is not supported by the server.
459 */
460 public static final ResultCode AUTH_METHOD_NOT_SUPPORTED =
461 new ResultCode(INFO_RC_AUTH_METHOD_NOT_SUPPORTED.get(),
462 AUTH_METHOD_NOT_SUPPORTED_INT_VALUE);
463
464
465
466 /**
467 * The integer value (8) for the "STRONG_AUTH_REQUIRED" result code.
468 */
469 public static final int STRONG_AUTH_REQUIRED_INT_VALUE = 8;
470
471
472
473 /**
474 * The result code (8) that will be used if the client requested an operation
475 * that requires a strong authentication mechanism.
476 */
477 public static final ResultCode STRONG_AUTH_REQUIRED =
478 new ResultCode(INFO_RC_STRONG_AUTH_REQUIRED.get(),
479 STRONG_AUTH_REQUIRED_INT_VALUE);
480
481
482
483 /**
484 * The integer value (10) for the "REFERRAL" result code.
485 */
486 public static final int REFERRAL_INT_VALUE = 10;
487
488
489
490 /**
491 * The result code (10) that will be used if the server sends a referral to
492 * the client to refer to data in another location.
493 */
494 public static final ResultCode REFERRAL =
495 new ResultCode(INFO_RC_REFERRAL.get(), REFERRAL_INT_VALUE);
496
497
498
499 /**
500 * The integer value (11) for the "ADMIN_LIMIT_EXCEEDED" result code.
501 */
502 public static final int ADMIN_LIMIT_EXCEEDED_INT_VALUE = 11;
503
504
505
506 /**
507 * The result code (11) that will be used if a server administrative limit has
508 * been exceeded.
509 */
510 public static final ResultCode ADMIN_LIMIT_EXCEEDED =
511 new ResultCode(INFO_RC_ADMIN_LIMIT_EXCEEDED.get(),
512 ADMIN_LIMIT_EXCEEDED_INT_VALUE);
513
514
515
516 /**
517 * The integer value (12) for the "UNAVAILABLE_CRITICAL_EXTENSION" result
518 * code.
519 */
520 public static final int UNAVAILABLE_CRITICAL_EXTENSION_INT_VALUE = 12;
521
522
523
524 /**
525 * The result code (12) that will be used if the client requests a critical
526 * control that is not supported by the server.
527 */
528 public static final ResultCode UNAVAILABLE_CRITICAL_EXTENSION =
529 new ResultCode(INFO_RC_UNAVAILABLE_CRITICAL_EXTENSION.get(),
530 UNAVAILABLE_CRITICAL_EXTENSION_INT_VALUE);
531
532
533
534 /**
535 * The integer value (13) for the "CONFIDENTIALITY_REQUIRED" result code.
536 */
537 public static final int CONFIDENTIALITY_REQUIRED_INT_VALUE = 13;
538
539
540
541 /**
542 * The result code (13) that will be used if the server requires a secure
543 * communication mechanism for the requested operation.
544 */
545 public static final ResultCode CONFIDENTIALITY_REQUIRED =
546 new ResultCode(INFO_RC_CONFIDENTIALITY_REQUIRED.get(),
547 CONFIDENTIALITY_REQUIRED_INT_VALUE);
548
549
550
551 /**
552 * The integer value (14) for the "SASL_BIND_IN_PROGRESS" result code.
553 */
554 public static final int SASL_BIND_IN_PROGRESS_INT_VALUE = 14;
555
556
557
558 /**
559 * The result code (14) that will be returned from the server after SASL bind
560 * stages in which more processing is required.
561 */
562 public static final ResultCode SASL_BIND_IN_PROGRESS =
563 new ResultCode(INFO_RC_SASL_BIND_IN_PROGRESS.get(),
564 SASL_BIND_IN_PROGRESS_INT_VALUE);
565
566
567
568 /**
569 * The integer value (16) for the "NO_SUCH_ATTRIBUTE" result code.
570 */
571 public static final int NO_SUCH_ATTRIBUTE_INT_VALUE = 16;
572
573
574
575 /**
576 * The result code (16) that will be used if the client referenced an
577 * attribute that does not exist in the target entry.
578 */
579 public static final ResultCode NO_SUCH_ATTRIBUTE =
580 new ResultCode(INFO_RC_NO_SUCH_ATTRIBUTE.get(),
581 NO_SUCH_ATTRIBUTE_INT_VALUE);
582
583
584
585 /**
586 * The integer value (17) for the "UNDEFINED_ATTRIBUTE_TYPE" result code.
587 */
588 public static final int UNDEFINED_ATTRIBUTE_TYPE_INT_VALUE = 17;
589
590
591
592 /**
593 * The result code (17) that will be used if the client referenced an
594 * attribute that is not defined in the server schema.
595 */
596 public static final ResultCode UNDEFINED_ATTRIBUTE_TYPE =
597 new ResultCode(INFO_RC_UNDEFINED_ATTRIBUTE_TYPE.get(),
598 UNDEFINED_ATTRIBUTE_TYPE_INT_VALUE);
599
600
601
602 /**
603 * The integer value (18) for the "INAPPROPRIATE_MATCHING" result code.
604 */
605 public static final int INAPPROPRIATE_MATCHING_INT_VALUE = 18;
606
607
608
609 /**
610 * The result code (18) that will be used if the client attempted to use an
611 * attribute in a search filter in a manner not supported by the matching
612 * rules associated with that attribute.
613 */
614 public static final ResultCode INAPPROPRIATE_MATCHING =
615 new ResultCode(INFO_RC_INAPPROPRIATE_MATCHING.get(),
616 INAPPROPRIATE_MATCHING_INT_VALUE);
617
618
619
620 /**
621 * The integer value (19) for the "CONSTRAINT_VIOLATION" result code.
622 */
623 public static final int CONSTRAINT_VIOLATION_INT_VALUE = 19;
624
625
626
627 /**
628 * The result code (19) that will be used if the requested operation would
629 * violate some constraint defined in the server.
630 */
631 public static final ResultCode CONSTRAINT_VIOLATION =
632 new ResultCode(INFO_RC_CONSTRAINT_VIOLATION.get(),
633 CONSTRAINT_VIOLATION_INT_VALUE);
634
635
636
637 /**
638 * The integer value (20) for the "ATTRIBUTE_OR_VALUE_EXISTS" result code.
639 */
640 public static final int ATTRIBUTE_OR_VALUE_EXISTS_INT_VALUE = 20;
641
642
643
644 /**
645 * The result code (20) that will be used if the client attempts to modify an
646 * entry in a way that would create a duplicate value, or create multiple
647 * values for a single-valued attribute.
648 */
649 public static final ResultCode ATTRIBUTE_OR_VALUE_EXISTS =
650 new ResultCode(INFO_RC_ATTRIBUTE_OR_VALUE_EXISTS.get(),
651 ATTRIBUTE_OR_VALUE_EXISTS_INT_VALUE);
652
653
654
655 /**
656 * The integer value (21) for the "INVALID_ATTRIBUTE_SYNTAX" result code.
657 */
658 public static final int INVALID_ATTRIBUTE_SYNTAX_INT_VALUE = 21;
659
660
661
662 /**
663 * The result code (21) that will be used if the client attempts to perform an
664 * operation that would create an attribute value that violates the syntax
665 * for that attribute.
666 */
667 public static final ResultCode INVALID_ATTRIBUTE_SYNTAX =
668 new ResultCode(INFO_RC_INVALID_ATTRIBUTE_SYNTAX.get(),
669 INVALID_ATTRIBUTE_SYNTAX_INT_VALUE);
670
671
672
673 /**
674 * The integer value (32) for the "NO_SUCH_OBJECT" result code.
675 */
676 public static final int NO_SUCH_OBJECT_INT_VALUE = 32;
677
678
679
680 /**
681 * The result code (32) that will be used if the client targeted an entry that
682 * does not exist.
683 */
684 public static final ResultCode NO_SUCH_OBJECT =
685 new ResultCode(INFO_RC_NO_SUCH_OBJECT.get(), NO_SUCH_OBJECT_INT_VALUE);
686
687
688
689 /**
690 * The integer value (33) for the "ALIAS_PROBLEM" result code.
691 */
692 public static final int ALIAS_PROBLEM_INT_VALUE = 33;
693
694
695
696 /**
697 * The result code (33) that will be used if the client targeted an entry that
698 * as an alias.
699 */
700 public static final ResultCode ALIAS_PROBLEM =
701 new ResultCode(INFO_RC_ALIAS_PROBLEM.get(), ALIAS_PROBLEM_INT_VALUE);
702
703
704
705 /**
706 * The integer value (34) for the "INVALID_DN_SYNTAX" result code.
707 */
708 public static final int INVALID_DN_SYNTAX_INT_VALUE = 34;
709
710
711
712 /**
713 * The result code (34) that will be used if the client provided an invalid
714 * DN.
715 */
716 public static final ResultCode INVALID_DN_SYNTAX =
717 new ResultCode(INFO_RC_INVALID_DN_SYNTAX.get(),
718 INVALID_DN_SYNTAX_INT_VALUE);
719
720
721
722 /**
723 * The integer value (36) for the "ALIAS_DEREFERENCING_PROBLEM" result code.
724 */
725 public static final int ALIAS_DEREFERENCING_PROBLEM_INT_VALUE = 36;
726
727
728
729 /**
730 * The result code (36) that will be used if a problem is encountered while
731 * the server is attempting to dereference an alias.
732 */
733 public static final ResultCode ALIAS_DEREFERENCING_PROBLEM =
734 new ResultCode(INFO_RC_ALIAS_DEREFERENCING_PROBLEM.get(),
735 ALIAS_DEREFERENCING_PROBLEM_INT_VALUE);
736
737
738
739 /**
740 * The integer value (48) for the "INAPPROPRIATE_AUTHENTICATION" result code.
741 */
742 public static final int INAPPROPRIATE_AUTHENTICATION_INT_VALUE = 48;
743
744
745
746 /**
747 * The result code (48) that will be used if the client attempts to perform a
748 * type of authentication that is not supported for the target user.
749 */
750 public static final ResultCode INAPPROPRIATE_AUTHENTICATION =
751 new ResultCode(INFO_RC_INAPPROPRIATE_AUTHENTICATION.get(),
752 INAPPROPRIATE_AUTHENTICATION_INT_VALUE);
753
754
755
756 /**
757 * The integer value (49) for the "INVALID_CREDENTIALS" result code.
758 */
759 public static final int INVALID_CREDENTIALS_INT_VALUE = 49;
760
761
762
763 /**
764 * The result code (49) that will be used if the client provided invalid
765 * credentials while trying to authenticate.
766 */
767 public static final ResultCode INVALID_CREDENTIALS =
768 new ResultCode(INFO_RC_INVALID_CREDENTIALS.get(),
769 INVALID_CREDENTIALS_INT_VALUE);
770
771
772
773 /**
774 * The integer value (50) for the "INSUFFICIENT_ACCESS_RIGHTS" result code.
775 */
776 public static final int INSUFFICIENT_ACCESS_RIGHTS_INT_VALUE = 50;
777
778
779
780 /**
781 * The result code (50) that will be used if the client does not have
782 * permission to perform the requested operation.
783 */
784 public static final ResultCode INSUFFICIENT_ACCESS_RIGHTS =
785 new ResultCode(INFO_RC_INSUFFICIENT_ACCESS_RIGHTS.get(),
786 INSUFFICIENT_ACCESS_RIGHTS_INT_VALUE);
787
788
789
790 /**
791 * The integer value (51) for the "BUSY" result code.
792 */
793 public static final int BUSY_INT_VALUE = 51;
794
795
796
797 /**
798 * The result code (51) that will be used if the server is too busy to process
799 * the requested operation.
800 */
801 public static final ResultCode BUSY = new ResultCode(INFO_RC_BUSY.get(),
802 BUSY_INT_VALUE);
803
804
805
806 /**
807 * The integer value (52) for the "UNAVAILABLE" result code.
808 */
809 public static final int UNAVAILABLE_INT_VALUE = 52;
810
811
812
813 /**
814 * The result code (52) that will be used if the server is unavailable.
815 */
816 public static final ResultCode UNAVAILABLE =
817 new ResultCode(INFO_RC_UNAVAILABLE.get(), UNAVAILABLE_INT_VALUE);
818
819
820
821 /**
822 * The integer value (53) for the "UNWILLING_TO_PERFORM" result code.
823 */
824 public static final int UNWILLING_TO_PERFORM_INT_VALUE = 53;
825
826
827
828 /**
829 * The result code (53) that will be used if the server is not willing to
830 * perform the requested operation.
831 */
832 public static final ResultCode UNWILLING_TO_PERFORM =
833 new ResultCode(INFO_RC_UNWILLING_TO_PERFORM.get(),
834 UNWILLING_TO_PERFORM_INT_VALUE);
835
836
837
838 /**
839 * The integer value (54) for the "LOOP_DETECT" result code.
840 */
841 public static final int LOOP_DETECT_INT_VALUE = 54;
842
843
844
845 /**
846 * The result code (54) that will be used if the server detects a chaining or
847 * alias loop.
848 */
849 public static final ResultCode LOOP_DETECT =
850 new ResultCode(INFO_RC_LOOP_DETECT.get(), LOOP_DETECT_INT_VALUE);
851
852
853
854 /**
855 * The integer value (60) for the "SORT_CONTROL_MISSING" result code.
856 */
857 public static final int SORT_CONTROL_MISSING_INT_VALUE = 60;
858
859
860
861 /**
862 * The result code (60) that will be used if the client sends a virtual list
863 * view control without a server-side sort control.
864 */
865 public static final ResultCode SORT_CONTROL_MISSING =
866 new ResultCode(INFO_RC_SORT_CONTROL_MISSING.get(),
867 SORT_CONTROL_MISSING_INT_VALUE);
868
869
870
871 /**
872 * The integer value (61) for the "OFFSET_RANGE_ERROR" result code.
873 */
874 public static final int OFFSET_RANGE_ERROR_INT_VALUE = 61;
875
876
877
878 /**
879 * The result code (61) that will be used if the client provides a virtual
880 * list view control with a target offset that is out of range for the
881 * available data set.
882 */
883 public static final ResultCode OFFSET_RANGE_ERROR =
884 new ResultCode(INFO_RC_OFFSET_RANGE_ERROR.get(),
885 OFFSET_RANGE_ERROR_INT_VALUE);
886
887
888
889 /**
890 * The integer value (64) for the "NAMING_VIOLATION" result code.
891 */
892 public static final int NAMING_VIOLATION_INT_VALUE = 64;
893
894
895
896 /**
897 * The result code (64) that will be used if the client request violates a
898 * naming constraint (e.g., a name form or DIT structure rule) defined in the
899 * server.
900 */
901 public static final ResultCode NAMING_VIOLATION =
902 new ResultCode(INFO_RC_NAMING_VIOLATION.get(),
903 NAMING_VIOLATION_INT_VALUE);
904
905
906
907 /**
908 * The integer value (65) for the "OBJECT_CLASS_VIOLATION" result code.
909 */
910 public static final int OBJECT_CLASS_VIOLATION_INT_VALUE = 65;
911
912
913
914 /**
915 * The result code (65) that will be used if the client request violates an
916 * object class constraint (e.g., an undefined object class, a
917 * disallowed attribute, or a missing required attribute) defined in the
918 * server.
919 */
920 public static final ResultCode OBJECT_CLASS_VIOLATION =
921 new ResultCode(INFO_RC_OBJECT_CLASS_VIOLATION.get(),
922 OBJECT_CLASS_VIOLATION_INT_VALUE);
923
924
925
926 /**
927 * The integer value (66) for the "NOT_ALLOWED_ON_NONLEAF" result code.
928 */
929 public static final int NOT_ALLOWED_ON_NONLEAF_INT_VALUE = 66;
930
931
932
933 /**
934 * The result code (66) that will be used if the requested operation is not
935 * allowed to be performed on non-leaf entries.
936 */
937 public static final ResultCode NOT_ALLOWED_ON_NONLEAF =
938 new ResultCode(INFO_RC_NOT_ALLOWED_ON_NONLEAF.get(),
939 NOT_ALLOWED_ON_NONLEAF_INT_VALUE);
940
941
942
943 /**
944 * The integer value (67) for the "NOT_ALLOWED_ON_RDN" result code.
945 */
946 public static final int NOT_ALLOWED_ON_RDN_INT_VALUE = 67;
947
948
949
950 /**
951 * The result code (67) that will be used if the requested operation would
952 * alter the RDN of the entry but the operation was not a modify DN request.
953 */
954 public static final ResultCode NOT_ALLOWED_ON_RDN =
955 new ResultCode(INFO_RC_NOT_ALLOWED_ON_RDN.get(),
956 NOT_ALLOWED_ON_RDN_INT_VALUE);
957
958
959
960 /**
961 * The integer value (68) for the "ENTRY_ALREADY_EXISTS" result code.
962 */
963 public static final int ENTRY_ALREADY_EXISTS_INT_VALUE = 68;
964
965
966
967 /**
968 * The result code (68) that will be used if the requested operation would
969 * create a conflict with an entry that already exists in the server.
970 */
971 public static final ResultCode ENTRY_ALREADY_EXISTS =
972 new ResultCode(INFO_RC_ENTRY_ALREADY_EXISTS.get(),
973 ENTRY_ALREADY_EXISTS_INT_VALUE);
974
975
976
977 /**
978 * The integer value (69) for the "OBJECT_CLASS_MODS_PROHIBITED" result code.
979 */
980 public static final int OBJECT_CLASS_MODS_PROHIBITED_INT_VALUE = 69;
981
982
983
984 /**
985 * The result code (69) that will be used if the requested operation would
986 * alter the set of object classes defined in the entry in a disallowed
987 * manner.
988 */
989 public static final ResultCode OBJECT_CLASS_MODS_PROHIBITED =
990 new ResultCode(INFO_RC_OBJECT_CLASS_MODS_PROHIBITED.get(),
991 OBJECT_CLASS_MODS_PROHIBITED_INT_VALUE);
992
993
994
995 /**
996 * The integer value (71) for the "AFFECTS_MULTIPLE_DSAS" result code.
997 */
998 public static final int AFFECTS_MULTIPLE_DSAS_INT_VALUE = 71;
999
1000
1001
1002 /**
1003 * The result code (71) that will be used if the requested operation would
1004 * impact entries in multiple data sources.
1005 */
1006 public static final ResultCode AFFECTS_MULTIPLE_DSAS =
1007 new ResultCode(INFO_RC_AFFECTS_MULTIPLE_DSAS.get(),
1008 AFFECTS_MULTIPLE_DSAS_INT_VALUE);
1009
1010
1011
1012 /**
1013 * The integer value (76) for the "VIRTUAL_LIST_VIEW_ERROR" result code.
1014 */
1015 public static final int VIRTUAL_LIST_VIEW_ERROR_INT_VALUE = 76;
1016
1017
1018
1019 /**
1020 * The result code (76) that will be used if an error occurred while
1021 * performing processing associated with the virtual list view control.
1022 */
1023 public static final ResultCode VIRTUAL_LIST_VIEW_ERROR =
1024 new ResultCode(INFO_RC_VIRTUAL_LIST_VIEW_ERR0R.get(),
1025 VIRTUAL_LIST_VIEW_ERROR_INT_VALUE);
1026
1027
1028
1029 /**
1030 * The integer value (80) for the "OTHER" result code.
1031 */
1032 public static final int OTHER_INT_VALUE = 80;
1033
1034
1035
1036 /**
1037 * The result code (80) that will be used if none of the other result codes
1038 * are appropriate.
1039 */
1040 public static final ResultCode OTHER =
1041 new ResultCode(INFO_RC_OTHER.get(), OTHER_INT_VALUE);
1042
1043
1044
1045 /**
1046 * The integer value (81) for the "SERVER_DOWN" result code.
1047 */
1048 public static final int SERVER_DOWN_INT_VALUE = 81;
1049
1050
1051
1052 /**
1053 * The client-side result code (81) that will be used if an established
1054 * connection to the server is lost.
1055 */
1056 public static final ResultCode SERVER_DOWN =
1057 new ResultCode(INFO_RC_SERVER_DOWN.get(), SERVER_DOWN_INT_VALUE);
1058
1059
1060
1061 /**
1062 * The integer value (82) for the "LOCAL_ERROR" result code.
1063 */
1064 public static final int LOCAL_ERROR_INT_VALUE = 82;
1065
1066
1067
1068 /**
1069 * The client-side result code (82) that will be used if a generic client-side
1070 * error occurs during processing.
1071 */
1072 public static final ResultCode LOCAL_ERROR =
1073 new ResultCode(INFO_RC_LOCAL_ERROR.get(), LOCAL_ERROR_INT_VALUE);
1074
1075
1076
1077 /**
1078 * The integer value (83) for the "ENCODING_ERROR" result code.
1079 */
1080 public static final int ENCODING_ERROR_INT_VALUE = 83;
1081
1082
1083
1084 /**
1085 * The client-side result code (83) that will be used if an error occurs while
1086 * encoding a request.
1087 */
1088 public static final ResultCode ENCODING_ERROR =
1089 new ResultCode(INFO_RC_ENCODING_ERROR.get(), ENCODING_ERROR_INT_VALUE);
1090
1091
1092
1093 /**
1094 * The integer value (84) for the "DECODING_ERROR" result code.
1095 */
1096 public static final int DECODING_ERROR_INT_VALUE = 84;
1097
1098
1099
1100 /**
1101 * The client-side result code (84) that will be used if an error occurs while
1102 * decoding a response.
1103 */
1104 public static final ResultCode DECODING_ERROR =
1105 new ResultCode(INFO_RC_DECODING_ERROR.get(), DECODING_ERROR_INT_VALUE);
1106
1107
1108
1109 /**
1110 * The integer value (85) for the "TIMEOUT" result code.
1111 */
1112 public static final int TIMEOUT_INT_VALUE = 85;
1113
1114
1115
1116 /**
1117 * The client-side result code (85) that will be used if a client timeout
1118 * occurs while waiting for a response from the server.
1119 */
1120 public static final ResultCode TIMEOUT =
1121 new ResultCode(INFO_RC_TIMEOUT.get(), TIMEOUT_INT_VALUE);
1122
1123
1124
1125 /**
1126 * The integer value (86) for the "AUTH_UNKNOWN" result code.
1127 */
1128 public static final int AUTH_UNKNOWN_INT_VALUE = 86;
1129
1130
1131
1132 /**
1133 * The client-side result code (86) that will be used if the client attempts
1134 * to use an unknown authentication type.
1135 */
1136 public static final ResultCode AUTH_UNKNOWN =
1137 new ResultCode(INFO_RC_AUTH_UNKNOWN.get(), AUTH_UNKNOWN_INT_VALUE);
1138
1139
1140
1141 /**
1142 * The integer value (87) for the "FILTER_ERROR" result code.
1143 */
1144 public static final int FILTER_ERROR_INT_VALUE = 87;
1145
1146
1147
1148 /**
1149 * The client-side result code (87) that will be used if an error occurs while
1150 * attempting to encode a search filter.
1151 */
1152 public static final ResultCode FILTER_ERROR =
1153 new ResultCode(INFO_RC_FILTER_ERROR.get(), FILTER_ERROR_INT_VALUE);
1154
1155
1156
1157 /**
1158 * The integer value (88) for the "USER_CANCELED" result code.
1159 */
1160 public static final int USER_CANCELED_INT_VALUE = 88;
1161
1162
1163
1164 /**
1165 * The client-side result code (88) that will be used if the end user canceled
1166 * the operation in progress.
1167 */
1168 public static final ResultCode USER_CANCELED =
1169 new ResultCode(INFO_RC_USER_CANCELED.get(), USER_CANCELED_INT_VALUE);
1170
1171
1172
1173 /**
1174 * The integer value (89) for the "PARAM_ERROR" result code.
1175 */
1176 public static final int PARAM_ERROR_INT_VALUE = 89;
1177
1178
1179
1180 /**
1181 * The client-side result code (89) that will be used if there is a problem
1182 * with the parameters provided for a request.
1183 */
1184 public static final ResultCode PARAM_ERROR =
1185 new ResultCode(INFO_RC_PARAM_ERROR.get(), PARAM_ERROR_INT_VALUE);
1186
1187
1188
1189 /**
1190 * The integer value (90) for the "NO_MEMORY" result code.
1191 */
1192 public static final int NO_MEMORY_INT_VALUE = 90;
1193
1194
1195
1196 /**
1197 * The client-side result code (90) that will be used if the client does not
1198 * have sufficient memory to perform the requested operation.
1199 */
1200 public static final ResultCode NO_MEMORY =
1201 new ResultCode(INFO_RC_NO_MEMORY.get(), NO_MEMORY_INT_VALUE);
1202
1203
1204
1205 /**
1206 * The integer value (91) for the "CONNECT_ERROR" result code.
1207 */
1208 public static final int CONNECT_ERROR_INT_VALUE = 91;
1209
1210
1211
1212 /**
1213 * The client-side result code (91) that will be used if an error occurs while
1214 * attempting to connect to a target server.
1215 */
1216 public static final ResultCode CONNECT_ERROR =
1217 new ResultCode(INFO_RC_CONNECT_ERROR.get(), CONNECT_ERROR_INT_VALUE);
1218
1219
1220
1221 /**
1222 * The integer value (92) for the "NOT_SUPPORTED" result code.
1223 */
1224 public static final int NOT_SUPPORTED_INT_VALUE = 92;
1225
1226
1227
1228 /**
1229 * The client-side result code (92) that will be used if the requested
1230 * operation is not supported.
1231 */
1232 public static final ResultCode NOT_SUPPORTED =
1233 new ResultCode(INFO_RC_NOT_SUPPORTED.get(), NOT_SUPPORTED_INT_VALUE);
1234
1235
1236
1237 /**
1238 * The integer value (93) for the "CONTROL_NOT_FOUND" result code.
1239 */
1240 public static final int CONTROL_NOT_FOUND_INT_VALUE = 93;
1241
1242
1243
1244 /**
1245 * The client-side result code (93) that will be used if the response from the
1246 * server did not include an expected control.
1247 */
1248 public static final ResultCode CONTROL_NOT_FOUND =
1249 new ResultCode(INFO_RC_CONTROL_NOT_FOUND.get(),
1250 CONTROL_NOT_FOUND_INT_VALUE);
1251
1252
1253
1254 /**
1255 * The integer value (94) for the "NO_RESULTS_RETURNED" result code.
1256 */
1257 public static final int NO_RESULTS_RETURNED_INT_VALUE = 94;
1258
1259
1260
1261 /**
1262 * The client-side result code (94) that will be used if the server did not
1263 * send any results.
1264 */
1265 public static final ResultCode NO_RESULTS_RETURNED =
1266 new ResultCode(INFO_RC_NO_RESULTS_RETURNED.get(),
1267 NO_RESULTS_RETURNED_INT_VALUE);
1268
1269
1270
1271 /**
1272 * The integer value (95) for the "MORE_RESULTS_TO_RETURN" result code.
1273 */
1274 public static final int MORE_RESULTS_TO_RETURN_INT_VALUE = 95;
1275
1276
1277
1278 /**
1279 * The client-side result code (95) that will be used if there are still more
1280 * results to return.
1281 */
1282 public static final ResultCode MORE_RESULTS_TO_RETURN =
1283 new ResultCode(INFO_RC_MORE_RESULTS_TO_RETURN.get(),
1284 MORE_RESULTS_TO_RETURN_INT_VALUE);
1285
1286
1287
1288 /**
1289 * The integer value (96) for the "CLIENT_LOOP" result code.
1290 */
1291 public static final int CLIENT_LOOP_INT_VALUE = 96;
1292
1293
1294
1295 /**
1296 * The client-side result code (96) that will be used if the client detects a
1297 * loop while attempting to follow referrals.
1298 */
1299 public static final ResultCode CLIENT_LOOP =
1300 new ResultCode(INFO_RC_CLIENT_LOOP.get(), CLIENT_LOOP_INT_VALUE);
1301
1302
1303
1304 /**
1305 * The integer value (97) for the "REFERRAL_LIMIT_EXCEEDED" result code.
1306 */
1307 public static final int REFERRAL_LIMIT_EXCEEDED_INT_VALUE = 97;
1308
1309
1310
1311 /**
1312 * The client-side result code (97) that will be used if the client
1313 * encountered too many referrals in the course of processing an operation.
1314 */
1315 public static final ResultCode REFERRAL_LIMIT_EXCEEDED =
1316 new ResultCode(INFO_RC_REFERRAL_LIMIT_EXCEEDED.get(),
1317 REFERRAL_LIMIT_EXCEEDED_INT_VALUE);
1318
1319
1320
1321 /**
1322 * The integer value (118) for the "CANCELED" result code.
1323 */
1324 public static final int CANCELED_INT_VALUE = 118;
1325
1326
1327
1328 /**
1329 * The result code (118) that will be used if the operation was canceled.
1330 */
1331 public static final ResultCode CANCELED =
1332 new ResultCode(INFO_RC_CANCELED.get(), CANCELED_INT_VALUE);
1333
1334
1335
1336 /**
1337 * The integer value (119) for the "NO_SUCH_OPERATION" result code.
1338 */
1339 public static final int NO_SUCH_OPERATION_INT_VALUE = 119;
1340
1341
1342
1343 /**
1344 * The result code (119) that will be used if the client attempts to cancel an
1345 * operation that the client doesn't exist in the server.
1346 */
1347 public static final ResultCode NO_SUCH_OPERATION =
1348 new ResultCode(INFO_RC_NO_SUCH_OPERATION.get(),
1349 NO_SUCH_OPERATION_INT_VALUE);
1350
1351
1352
1353 /**
1354 * The integer value (120) for the "TOO_LATE" result code.
1355 */
1356 public static final int TOO_LATE_INT_VALUE = 120;
1357
1358
1359
1360 /**
1361 * The result code (120) that will be used if the client attempts to cancel an
1362 * operation too late in the processing for that operation.
1363 */
1364 public static final ResultCode TOO_LATE =
1365 new ResultCode(INFO_RC_TOO_LATE.get(), TOO_LATE_INT_VALUE);
1366
1367
1368
1369 /**
1370 * The integer value (121) for the "CANNOT_CANCEL" result code.
1371 */
1372 public static final int CANNOT_CANCEL_INT_VALUE = 121;
1373
1374
1375
1376 /**
1377 * The result code (121) that will be used if the client attempts to cancel an
1378 * operation that cannot be canceled.
1379 */
1380 public static final ResultCode CANNOT_CANCEL =
1381 new ResultCode(INFO_RC_CANNOT_CANCEL.get(), CANNOT_CANCEL_INT_VALUE);
1382
1383
1384
1385 /**
1386 * The integer value (122) for the "ASSERTION_FAILED" result code.
1387 */
1388 public static final int ASSERTION_FAILED_INT_VALUE = 122;
1389
1390
1391
1392 /**
1393 * The result code (122) that will be used if the requested operation included
1394 * the LDAP assertion control but the assertion did not match the target
1395 * entry.
1396 */
1397 public static final ResultCode ASSERTION_FAILED =
1398 new ResultCode(INFO_RC_ASSERTION_FAILED.get(),
1399 ASSERTION_FAILED_INT_VALUE);
1400
1401
1402
1403 /**
1404 * The integer value (123) for the "AUTHORIZATION_DENIED" result code.
1405 */
1406 public static final int AUTHORIZATION_DENIED_INT_VALUE = 123;
1407
1408
1409
1410 /**
1411 * The result code (123) that will be used if the client is denied the ability
1412 * to use the proxied authorization control.
1413 */
1414 public static final ResultCode AUTHORIZATION_DENIED =
1415 new ResultCode(INFO_RC_AUTHORIZATION_DENIED.get(),
1416 AUTHORIZATION_DENIED_INT_VALUE);
1417
1418
1419
1420 /**
1421 * The integer value (4096) for the "E_SYNC_REFRESH_REQUIRED" result code.
1422 */
1423 public static final int E_SYNC_REFRESH_REQUIRED_INT_VALUE = 4096;
1424
1425
1426
1427 /**
1428 * The result code (4096) that will be used if a client using the content
1429 * synchronization request control requests an incremental update but the
1430 * server is unable to honor that request and requires the client to request
1431 * an initial content.
1432 */
1433 public static final ResultCode E_SYNC_REFRESH_REQUIRED =
1434 new ResultCode(INFO_RC_E_SYNC_REFRESH_REQUIRED.get(),
1435 E_SYNC_REFRESH_REQUIRED_INT_VALUE);
1436
1437
1438
1439 /**
1440 * The integer value (16654) for the "NO_OPERATION" result code.
1441 */
1442 public static final int NO_OPERATION_INT_VALUE = 16654;
1443
1444
1445
1446 /**
1447 * The result code (16654) for operations that completed successfully but no
1448 * changes were made to the server because the LDAP no-op control was included
1449 * in the request.
1450 */
1451 public static final ResultCode NO_OPERATION =
1452 new ResultCode(INFO_RC_NO_OPERATION.get(), NO_OPERATION_INT_VALUE);
1453
1454
1455
1456 /**
1457 * The integer value (30221001) for the "INTERACTIVE_TRANSACTION_ABORTED"
1458 * result code.
1459 */
1460 public static final int INTERACTIVE_TRANSACTION_ABORTED_INT_VALUE = 30221001;
1461
1462
1463
1464 /**
1465 * The result code (30221001) for use if an interactive transaction has been
1466 * aborted, either due to an explicit request from a client or by the server
1467 * without a client request.
1468 */
1469 public static final ResultCode INTERACTIVE_TRANSACTION_ABORTED =
1470 new ResultCode(INFO_RC_INTERACTIVE_TRANSACTION_ABORTED.get(),
1471 INTERACTIVE_TRANSACTION_ABORTED_INT_VALUE);
1472
1473
1474
1475 /**
1476 * The set of result code objects created with undefined int result code
1477 * values.
1478 */
1479 private static final HashMap<Integer,ResultCode> UNDEFINED_RESULT_CODES =
1480 new HashMap<Integer,ResultCode>();
1481
1482
1483
1484 /**
1485 * The serial version UID for this serializable class.
1486 */
1487 private static final long serialVersionUID = 7609311304252378100L;
1488
1489
1490
1491 // The integer value for this result code.
1492 private final int intValue;
1493
1494 // The name for this result code.
1495 private final String name;
1496
1497 // The string representation for this result code.
1498 private final String stringRepresentation;
1499
1500
1501
1502 /**
1503 * Creates a new result code with the specified integer value.
1504 *
1505 * @param intValue The integer value for this result code.
1506 */
1507 private ResultCode(final int intValue)
1508 {
1509 this.intValue = intValue;
1510
1511 name = String.valueOf(intValue);
1512 stringRepresentation = name;
1513 }
1514
1515
1516
1517 /**
1518 * Creates a new result code with the specified name and integer value.
1519 *
1520 * @param name The name for this result code.
1521 * @param intValue The integer value for this result code.
1522 */
1523 private ResultCode(final String name, final int intValue)
1524 {
1525 this.name = name;
1526 this.intValue = intValue;
1527
1528 stringRepresentation = intValue + " (" + name + ')';
1529 }
1530
1531
1532
1533 /**
1534 * Retrieves the name for this result code.
1535 *
1536 * @return The name for this result code.
1537 */
1538 public String getName()
1539 {
1540 return name;
1541 }
1542
1543
1544
1545 /**
1546 * Retrieves the integer value for this result code.
1547 *
1548 * @return The integer value for this result code.
1549 */
1550 public int intValue()
1551 {
1552 return intValue;
1553 }
1554
1555
1556
1557 /**
1558 * Retrieves the result code with the specified integer value. If the
1559 * provided integer value does not correspond to a predefined
1560 * {@code ResultCode} object, then a new {@code ResultCode} object will be
1561 * created and returned. Any new result codes created will also be cached
1562 * and returned for any subsequent requests with that integer value so the
1563 * same object will always be returned for a given integer value.
1564 *
1565 * @param intValue The integer value for which to retrieve the corresponding
1566 * result code.
1567 *
1568 * @return The result code with the specified integer value, or a new result
1569 * code
1570 */
1571 public static ResultCode valueOf(final int intValue)
1572 {
1573 return valueOf(intValue, null);
1574 }
1575
1576
1577
1578 /**
1579 * Retrieves the result code with the specified integer value. If the
1580 * provided integer value does not correspond to a predefined
1581 * {@code ResultCode} object, then a new {@code ResultCode} object will be
1582 * created and returned. Any new result codes created will also be cached
1583 * and returned for any subsequent requests with that integer value so the
1584 * same object will always be returned for a given integer value.
1585 *
1586 * @param intValue The integer value for which to retrieve the corresponding
1587 * result code.
1588 * @param name The user-friendly name to use for the result code if no
1589 * result code has been previously accessed with the same
1590 * integer value. It may be {@code null} if this is not
1591 * known or a string representation of the integer value
1592 * should be used.
1593 *
1594 * @return The result code with the specified integer value, or a new result
1595 * code
1596 */
1597 public static ResultCode valueOf(final int intValue, final String name)
1598 {
1599 switch (intValue)
1600 {
1601 case SUCCESS_INT_VALUE:
1602 return SUCCESS;
1603 case OPERATIONS_ERROR_INT_VALUE:
1604 return OPERATIONS_ERROR;
1605 case PROTOCOL_ERROR_INT_VALUE:
1606 return PROTOCOL_ERROR;
1607 case TIME_LIMIT_EXCEEDED_INT_VALUE:
1608 return TIME_LIMIT_EXCEEDED;
1609 case SIZE_LIMIT_EXCEEDED_INT_VALUE:
1610 return SIZE_LIMIT_EXCEEDED;
1611 case COMPARE_FALSE_INT_VALUE:
1612 return COMPARE_FALSE;
1613 case COMPARE_TRUE_INT_VALUE:
1614 return COMPARE_TRUE;
1615 case AUTH_METHOD_NOT_SUPPORTED_INT_VALUE:
1616 return AUTH_METHOD_NOT_SUPPORTED;
1617 case STRONG_AUTH_REQUIRED_INT_VALUE:
1618 return STRONG_AUTH_REQUIRED;
1619 case REFERRAL_INT_VALUE:
1620 return REFERRAL;
1621 case ADMIN_LIMIT_EXCEEDED_INT_VALUE:
1622 return ADMIN_LIMIT_EXCEEDED;
1623 case UNAVAILABLE_CRITICAL_EXTENSION_INT_VALUE:
1624 return UNAVAILABLE_CRITICAL_EXTENSION;
1625 case CONFIDENTIALITY_REQUIRED_INT_VALUE:
1626 return CONFIDENTIALITY_REQUIRED;
1627 case SASL_BIND_IN_PROGRESS_INT_VALUE:
1628 return SASL_BIND_IN_PROGRESS;
1629 case NO_SUCH_ATTRIBUTE_INT_VALUE:
1630 return NO_SUCH_ATTRIBUTE;
1631 case UNDEFINED_ATTRIBUTE_TYPE_INT_VALUE:
1632 return UNDEFINED_ATTRIBUTE_TYPE;
1633 case INAPPROPRIATE_MATCHING_INT_VALUE:
1634 return INAPPROPRIATE_MATCHING;
1635 case CONSTRAINT_VIOLATION_INT_VALUE:
1636 return CONSTRAINT_VIOLATION;
1637 case ATTRIBUTE_OR_VALUE_EXISTS_INT_VALUE:
1638 return ATTRIBUTE_OR_VALUE_EXISTS;
1639 case INVALID_ATTRIBUTE_SYNTAX_INT_VALUE:
1640 return INVALID_ATTRIBUTE_SYNTAX;
1641 case NO_SUCH_OBJECT_INT_VALUE:
1642 return NO_SUCH_OBJECT;
1643 case ALIAS_PROBLEM_INT_VALUE:
1644 return ALIAS_PROBLEM;
1645 case INVALID_DN_SYNTAX_INT_VALUE:
1646 return INVALID_DN_SYNTAX;
1647 case ALIAS_DEREFERENCING_PROBLEM_INT_VALUE:
1648 return ALIAS_DEREFERENCING_PROBLEM;
1649 case INAPPROPRIATE_AUTHENTICATION_INT_VALUE:
1650 return INAPPROPRIATE_AUTHENTICATION;
1651 case INVALID_CREDENTIALS_INT_VALUE:
1652 return INVALID_CREDENTIALS;
1653 case INSUFFICIENT_ACCESS_RIGHTS_INT_VALUE:
1654 return INSUFFICIENT_ACCESS_RIGHTS;
1655 case BUSY_INT_VALUE:
1656 return BUSY;
1657 case UNAVAILABLE_INT_VALUE:
1658 return UNAVAILABLE;
1659 case UNWILLING_TO_PERFORM_INT_VALUE:
1660 return UNWILLING_TO_PERFORM;
1661 case LOOP_DETECT_INT_VALUE:
1662 return LOOP_DETECT;
1663 case SORT_CONTROL_MISSING_INT_VALUE:
1664 return SORT_CONTROL_MISSING;
1665 case OFFSET_RANGE_ERROR_INT_VALUE:
1666 return OFFSET_RANGE_ERROR;
1667 case NAMING_VIOLATION_INT_VALUE:
1668 return NAMING_VIOLATION;
1669 case OBJECT_CLASS_VIOLATION_INT_VALUE:
1670 return OBJECT_CLASS_VIOLATION;
1671 case NOT_ALLOWED_ON_NONLEAF_INT_VALUE:
1672 return NOT_ALLOWED_ON_NONLEAF;
1673 case NOT_ALLOWED_ON_RDN_INT_VALUE:
1674 return NOT_ALLOWED_ON_RDN;
1675 case ENTRY_ALREADY_EXISTS_INT_VALUE:
1676 return ENTRY_ALREADY_EXISTS;
1677 case OBJECT_CLASS_MODS_PROHIBITED_INT_VALUE:
1678 return OBJECT_CLASS_MODS_PROHIBITED;
1679 case AFFECTS_MULTIPLE_DSAS_INT_VALUE:
1680 return AFFECTS_MULTIPLE_DSAS;
1681 case VIRTUAL_LIST_VIEW_ERROR_INT_VALUE:
1682 return VIRTUAL_LIST_VIEW_ERROR;
1683 case OTHER_INT_VALUE:
1684 return OTHER;
1685 case SERVER_DOWN_INT_VALUE:
1686 return SERVER_DOWN;
1687 case LOCAL_ERROR_INT_VALUE:
1688 return LOCAL_ERROR;
1689 case ENCODING_ERROR_INT_VALUE:
1690 return ENCODING_ERROR;
1691 case DECODING_ERROR_INT_VALUE:
1692 return DECODING_ERROR;
1693 case TIMEOUT_INT_VALUE:
1694 return TIMEOUT;
1695 case AUTH_UNKNOWN_INT_VALUE:
1696 return AUTH_UNKNOWN;
1697 case FILTER_ERROR_INT_VALUE:
1698 return FILTER_ERROR;
1699 case USER_CANCELED_INT_VALUE:
1700 return USER_CANCELED;
1701 case PARAM_ERROR_INT_VALUE:
1702 return PARAM_ERROR;
1703 case NO_MEMORY_INT_VALUE:
1704 return NO_MEMORY;
1705 case CONNECT_ERROR_INT_VALUE:
1706 return CONNECT_ERROR;
1707 case NOT_SUPPORTED_INT_VALUE:
1708 return NOT_SUPPORTED;
1709 case CONTROL_NOT_FOUND_INT_VALUE:
1710 return CONTROL_NOT_FOUND;
1711 case NO_RESULTS_RETURNED_INT_VALUE:
1712 return NO_RESULTS_RETURNED;
1713 case MORE_RESULTS_TO_RETURN_INT_VALUE:
1714 return MORE_RESULTS_TO_RETURN;
1715 case CLIENT_LOOP_INT_VALUE:
1716 return CLIENT_LOOP;
1717 case REFERRAL_LIMIT_EXCEEDED_INT_VALUE:
1718 return REFERRAL_LIMIT_EXCEEDED;
1719 case CANCELED_INT_VALUE:
1720 return CANCELED;
1721 case NO_SUCH_OPERATION_INT_VALUE:
1722 return NO_SUCH_OPERATION;
1723 case TOO_LATE_INT_VALUE:
1724 return TOO_LATE;
1725 case CANNOT_CANCEL_INT_VALUE:
1726 return CANNOT_CANCEL;
1727 case ASSERTION_FAILED_INT_VALUE:
1728 return ASSERTION_FAILED;
1729 case AUTHORIZATION_DENIED_INT_VALUE:
1730 return AUTHORIZATION_DENIED;
1731 case E_SYNC_REFRESH_REQUIRED_INT_VALUE:
1732 return E_SYNC_REFRESH_REQUIRED;
1733 case NO_OPERATION_INT_VALUE:
1734 return NO_OPERATION;
1735 case INTERACTIVE_TRANSACTION_ABORTED_INT_VALUE:
1736 return INTERACTIVE_TRANSACTION_ABORTED;
1737 }
1738
1739 synchronized (UNDEFINED_RESULT_CODES)
1740 {
1741 ResultCode rc = UNDEFINED_RESULT_CODES.get(intValue);
1742 if (rc == null)
1743 {
1744 if (name == null)
1745 {
1746 rc = new ResultCode(intValue);
1747 }
1748 else
1749 {
1750 rc = new ResultCode(name, intValue);
1751 }
1752
1753 UNDEFINED_RESULT_CODES.put(intValue, rc);
1754 }
1755
1756 return rc;
1757 }
1758 }
1759
1760
1761
1762 /**
1763 * Retrieves an array of all result codes defined in the LDAP SDK. This will
1764 * not include dynamically-generated values.
1765 *
1766 * @return An array of all result codes defined in the LDAP SDK.
1767 */
1768 public static ResultCode[] values()
1769 {
1770 return new ResultCode[]
1771 {
1772 SUCCESS,
1773 OPERATIONS_ERROR,
1774 PROTOCOL_ERROR,
1775 TIME_LIMIT_EXCEEDED,
1776 SIZE_LIMIT_EXCEEDED,
1777 COMPARE_FALSE,
1778 COMPARE_TRUE,
1779 AUTH_METHOD_NOT_SUPPORTED,
1780 STRONG_AUTH_REQUIRED,
1781 REFERRAL,
1782 ADMIN_LIMIT_EXCEEDED,
1783 UNAVAILABLE_CRITICAL_EXTENSION,
1784 CONFIDENTIALITY_REQUIRED,
1785 SASL_BIND_IN_PROGRESS,
1786 NO_SUCH_ATTRIBUTE,
1787 UNDEFINED_ATTRIBUTE_TYPE,
1788 INAPPROPRIATE_MATCHING,
1789 CONSTRAINT_VIOLATION,
1790 ATTRIBUTE_OR_VALUE_EXISTS,
1791 INVALID_ATTRIBUTE_SYNTAX,
1792 NO_SUCH_OBJECT,
1793 ALIAS_PROBLEM,
1794 INVALID_DN_SYNTAX,
1795 ALIAS_DEREFERENCING_PROBLEM,
1796 INAPPROPRIATE_AUTHENTICATION,
1797 INVALID_CREDENTIALS,
1798 INSUFFICIENT_ACCESS_RIGHTS,
1799 BUSY,
1800 UNAVAILABLE,
1801 UNWILLING_TO_PERFORM,
1802 LOOP_DETECT,
1803 SORT_CONTROL_MISSING,
1804 OFFSET_RANGE_ERROR,
1805 NAMING_VIOLATION,
1806 OBJECT_CLASS_VIOLATION,
1807 NOT_ALLOWED_ON_NONLEAF,
1808 NOT_ALLOWED_ON_RDN,
1809 ENTRY_ALREADY_EXISTS,
1810 OBJECT_CLASS_MODS_PROHIBITED,
1811 AFFECTS_MULTIPLE_DSAS,
1812 VIRTUAL_LIST_VIEW_ERROR,
1813 OTHER,
1814 SERVER_DOWN,
1815 LOCAL_ERROR,
1816 ENCODING_ERROR,
1817 DECODING_ERROR,
1818 TIMEOUT,
1819 AUTH_UNKNOWN,
1820 FILTER_ERROR,
1821 USER_CANCELED,
1822 PARAM_ERROR,
1823 NO_MEMORY,
1824 CONNECT_ERROR,
1825 NOT_SUPPORTED,
1826 CONTROL_NOT_FOUND,
1827 NO_RESULTS_RETURNED,
1828 MORE_RESULTS_TO_RETURN,
1829 CLIENT_LOOP,
1830 REFERRAL_LIMIT_EXCEEDED,
1831 CANCELED,
1832 NO_SUCH_OPERATION,
1833 TOO_LATE,
1834 CANNOT_CANCEL,
1835 ASSERTION_FAILED,
1836 AUTHORIZATION_DENIED,
1837 E_SYNC_REFRESH_REQUIRED,
1838 NO_OPERATION,
1839 INTERACTIVE_TRANSACTION_ABORTED
1840 };
1841 }
1842
1843
1844
1845 /**
1846 * Indicates whether this result code is one that should be used for
1847 * client-side errors rather than returned by the server.
1848 *
1849 * @return {@code true} if this result code is a client-side result code, or
1850 * {@code false} if it is one that may be returned by the server.
1851 */
1852 public boolean isClientSideResultCode()
1853 {
1854 return isClientSideResultCode(this);
1855 }
1856
1857
1858
1859 /**
1860 * Indicates whether the provided result code is one that should be used for
1861 * client-side errors rather than returned by the server.
1862 *
1863 * @param resultCode The result code for which to make the determination.
1864 *
1865 * @return {@code true} if the provided result code is a client-side result
1866 * code, or {@code false} if it is one that may be returned by the
1867 * server.
1868 */
1869 public static boolean isClientSideResultCode(final ResultCode resultCode)
1870 {
1871 switch (resultCode.intValue())
1872 {
1873 case SERVER_DOWN_INT_VALUE:
1874 case LOCAL_ERROR_INT_VALUE:
1875 case ENCODING_ERROR_INT_VALUE:
1876 case DECODING_ERROR_INT_VALUE:
1877 case TIMEOUT_INT_VALUE:
1878 case AUTH_UNKNOWN_INT_VALUE:
1879 case FILTER_ERROR_INT_VALUE:
1880 case USER_CANCELED_INT_VALUE:
1881 case PARAM_ERROR_INT_VALUE:
1882 case NO_MEMORY_INT_VALUE:
1883 case CONNECT_ERROR_INT_VALUE:
1884 case NOT_SUPPORTED_INT_VALUE:
1885 case CONTROL_NOT_FOUND_INT_VALUE:
1886 case NO_RESULTS_RETURNED_INT_VALUE:
1887 case MORE_RESULTS_TO_RETURN_INT_VALUE:
1888 case CLIENT_LOOP_INT_VALUE:
1889 case REFERRAL_LIMIT_EXCEEDED_INT_VALUE:
1890 return true;
1891 default:
1892 return false;
1893 }
1894 }
1895
1896
1897
1898 /**
1899 * Indicates whether the connection on which this result code was received is
1900 * likely still usable. Note that this is a best guess, and it may or may not
1901 * be correct. It will attempt to be conservative so that a connection is
1902 * more likely to be classified as unusable when it may still be valid than to
1903 * be classified as usable when that is no longer the case.
1904 *
1905 * @return {@code true} if it is likely that the connection on which this
1906 * result code was received is still usable, or {@code false} if it
1907 * may no longer be valid.
1908 */
1909 public boolean isConnectionUsable()
1910 {
1911 return isConnectionUsable(this);
1912 }
1913
1914
1915
1916 /**
1917 * Indicates whether the connection on which the provided result code was
1918 * received is likely still usable. Note that this is a best guess based on
1919 * the provided result code, and it may or may not be correct. It will
1920 * attempt to be conservative so that a connection is more likely to be
1921 * classified as unusable when it may still be valid than to be classified
1922 * as usable when that is no longer the case.
1923 *
1924 * @param resultCode The result code for which to make the determination.
1925 *
1926 * @return {@code true} if it is likely that the connection on which the
1927 * provided result code was received is still usable, or
1928 * {@code false} if it may no longer be valid.
1929 */
1930 public static boolean isConnectionUsable(final ResultCode resultCode)
1931 {
1932 switch (resultCode.intValue())
1933 {
1934 case OPERATIONS_ERROR_INT_VALUE:
1935 case PROTOCOL_ERROR_INT_VALUE:
1936 case BUSY_INT_VALUE:
1937 case UNAVAILABLE_INT_VALUE:
1938 case UNWILLING_TO_PERFORM_INT_VALUE:
1939 case OTHER_INT_VALUE:
1940 case SERVER_DOWN_INT_VALUE:
1941 case LOCAL_ERROR_INT_VALUE:
1942 case ENCODING_ERROR_INT_VALUE:
1943 case DECODING_ERROR_INT_VALUE:
1944 case TIMEOUT_INT_VALUE:
1945 case NO_MEMORY_INT_VALUE:
1946 case CONNECT_ERROR_INT_VALUE:
1947 return false;
1948 default:
1949 return true;
1950 }
1951 }
1952
1953
1954
1955 /**
1956 * The hash code for this result code.
1957 *
1958 * @return The hash code for this result code.
1959 */
1960 @Override()
1961 public int hashCode()
1962 {
1963 return intValue;
1964 }
1965
1966
1967
1968 /**
1969 * Indicates whether the provided object is equal to this result code.
1970 *
1971 * @param o The object for which to make the determination.
1972 *
1973 * @return {@code true} if the provided object is a result code that is equal
1974 * to this result code, or {@code false} if not.
1975 */
1976 @Override()
1977 public boolean equals(final Object o)
1978 {
1979 if (o == null)
1980 {
1981 return false;
1982 }
1983 else if (o == this)
1984 {
1985 return true;
1986 }
1987 else if (o instanceof ResultCode)
1988 {
1989 return (intValue == ((ResultCode) o).intValue);
1990 }
1991 else
1992 {
1993 return false;
1994 }
1995 }
1996
1997
1998
1999 /**
2000 * Retrieves a string representation of this result code.
2001 *
2002 * @return A string representation of this result code.
2003 */
2004 @Override()
2005 public String toString()
2006 {
2007 return stringRepresentation;
2008 }
2009 }