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