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