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