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