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