001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2006-2008 Sun Microsystems, Inc.
025 *      Portions Copyright 2014 ForgeRock AS
026 */
027package org.opends.server.protocols.ldap;
028import org.forgerock.i18n.LocalizableMessage;
029
030
031
032import static org.opends.messages.CoreMessages.*;
033/**
034 * This class defines a set of constants that correspond to the result codes
035 * defined in the LDAP protocol.  Note that many (but not all) of the result
036 * codes numbered 81 and higher come from the LDAP C API specification and are
037 * only intended for client-side use and should not be returned from the
038 * Directory Server.  These are denoted with a "CLIENT_SIDE_" prefix.
039 */
040public class LDAPResultCode
041{
042  /**
043   * The LDAP result code for successful operations.
044   */
045  public static final int SUCCESS = 0;
046
047
048
049  /**
050   * The LDAP result code for operations that fail due to an operations error.
051   */
052  public static final int OPERATIONS_ERROR = 1;
053
054
055
056  /**
057   * The LDAP result code for operations that fail due to a protocol error.
058   */
059  public static final int PROTOCOL_ERROR = 2;
060
061
062
063  /**
064   * The LDAP result code for operations that fail as a result of exceeding a
065   * time limit.
066   */
067  public static final int TIME_LIMIT_EXCEEDED = 3;
068
069
070
071  /**
072   * The LDAP result code for operations that fail as a result of exceeding a
073   * size limit.
074   */
075  public static final int SIZE_LIMIT_EXCEEDED = 4;
076
077
078
079  /**
080   * The LDAP result code for compare operations in which the assertion is
081   * false.
082   */
083  public static final int COMPARE_FALSE = 5;
084
085
086
087  /**
088   * The LDAP result code for compare operations in which the assertion is true.
089   */
090  public static final int COMPARE_TRUE = 6;
091
092
093
094  /**
095   * The LDAP result code for operations that fail because the requested
096   * authentication method is not supported.
097   */
098  public static final int AUTH_METHOD_NOT_SUPPORTED = 7;
099
100
101
102  /**
103   * The LDAP result code for operations that fail because strong authentication
104   * is required.
105   */
106  public static final int STRONG_AUTH_REQUIRED = 8;
107
108
109
110  /**
111   * The LDAP result code for operations that encountered a referral.
112   */
113  public static final int REFERRAL = 10;
114
115
116
117  /**
118   * The LDAP result code for operations that fail as a result of exceeding an
119   * administrative limit.
120   */
121  public static final int ADMIN_LIMIT_EXCEEDED = 11;
122
123
124
125  /**
126   * The LDAP result code for operations that fail because they contain an
127   * unavailable critical extension.
128   */
129  public static final int UNAVAILABLE_CRITICAL_EXTENSION = 12;
130
131
132
133  /**
134   * The LDAP result code for operations that fail because confidentiality is
135   * required.
136   */
137  public static final int CONFIDENTIALITY_REQUIRED = 13;
138
139
140
141  /**
142   * The LDAP result code used for multi-stage SASL bind operations that are not
143   * yet complete.
144   */
145  public static final int SASL_BIND_IN_PROGRESS = 14;
146
147
148
149  /**
150   * The LDAP result code for operations that fail because a specified attribute
151   * does not exist.
152   */
153  public static final int NO_SUCH_ATTRIBUTE = 16;
154
155
156
157  /**
158   * The LDAP result code for operations that fail because a specified attribute
159   * type is not defined in the server schema.
160   */
161  public static final int UNDEFINED_ATTRIBUTE_TYPE = 17;
162
163
164
165  /**
166   * The LDAP result code for operations that fail as a result of attempting an
167   * inappropriate form of matching on an attribute.
168   */
169  public static final int INAPPROPRIATE_MATCHING = 18;
170
171
172
173  /**
174   * The LDAP result code for operations that fail because a defined constraint
175   * has been violated.
176   */
177  public static final int CONSTRAINT_VIOLATION = 19;
178
179
180
181  /**
182   * The LDAP result code for operations that fail because of a conflict with an
183   * existing attribute or value.
184   */
185  public static final int ATTRIBUTE_OR_VALUE_EXISTS = 20;
186
187
188
189  /**
190   * The LDAP result code for operations that fail because of an invalid
191   * attribute syntax.
192   */
193  public static final int INVALID_ATTRIBUTE_SYNTAX = 21;
194
195
196
197  /**
198   * The LDAP result code for operations that fail because a targeted entry does
199   * not exist.
200   */
201  public static final int NO_SUCH_OBJECT = 32;
202
203
204
205  /**
206   * The LDAP result code for operations that fail because the an alias was
207   * encountered in an illegal context.
208   */
209  public static final int ALIAS_PROBLEM = 33;
210
211
212
213  /**
214   * The LDAP result code for operations that fail because the request included
215   * a malformed DN.
216   */
217  public static final int INVALID_DN_SYNTAX = 34;
218
219
220
221  /**
222   * The LDAP result code for operations that fail because a problem occurred
223   * while attempting to dereference an alias.
224   */
225  public static final int ALIAS_DEREFERENCING_PROBLEM = 36;
226
227
228
229  /**
230   * The LDAP result code for operations that fail because the user attempted to
231   * perform a type of authentication that was inappropriate for the targeted
232   * entry.
233   */
234  public static final int INAPPROPRIATE_AUTHENTICATION = 48;
235
236
237
238  /**
239   * The LDAP result code for operations that fail because the user supplied
240   * invalid credentials for an authentication attempt.
241   */
242  public static final int INVALID_CREDENTIALS = 49;
243
244
245
246  /**
247   * The LDAP result code for operations that fail because the client does not
248   * have permission to perform the requested operation.
249   */
250  public static final int INSUFFICIENT_ACCESS_RIGHTS = 50;
251
252
253
254  /**
255   * The LDAP result code for operations that fail because the server was too
256   * busy to process it.
257   */
258  public static final int BUSY = 51;
259
260
261
262  /**
263   * The LDAP result code for operations that fail because the server or a
264   * required resource was unavailable.
265   */
266  public static final int UNAVAILABLE = 52;
267
268
269
270  /**
271   * The LDAP result code for operations that fail because the server was
272   * unwilling to perform the requested operation.
273   */
274  public static final int UNWILLING_TO_PERFORM = 53;
275
276
277
278  /**
279   * The LDAP result code for operations that fail because a referral or
280   * chaining loop was detected.
281   */
282  public static final int LOOP_DETECT = 54;
283
284
285
286  /**
287   * The LDAP result code for operations that fail because the request included
288   * a VLV request control without a server-side sort control.
289   */
290  public static final int SORT_CONTROL_MISSING = 60;
291
292
293
294  /**
295   * The LDAP result code for operations that fail because the request included
296   * a VLV request control with an invalid offset.
297   */
298  public static final int OFFSET_RANGE_ERROR = 61;
299
300
301
302  /**
303   * The LDAP result code for operations that fail due to a naming violation.
304   */
305  public static final int NAMING_VIOLATION = 64;
306
307
308
309  /**
310   * The LDAP result code for operations that fail because the requested
311   * operation would have resulted in an entry that violates the server schema.
312   */
313  public static final int OBJECTCLASS_VIOLATION = 65;
314
315
316
317  /**
318   * The LDAP result code for operations that fail because the requested
319   * operation is not allowed on non-leaf entries.
320   */
321  public static final int NOT_ALLOWED_ON_NONLEAF = 66;
322
323
324
325  /**
326   * The LDAP result code for operations that fail because the requested
327   * operation is not allowed on an RDN attribute.
328   */
329  public static final int NOT_ALLOWED_ON_RDN = 67;
330
331
332
333  /**
334   * The LDAP result code for operations that fail because the requested
335   * operation would have resulted in an entry that conflicts with one that
336   * already exists.
337   */
338  public static final int ENTRY_ALREADY_EXISTS = 68;
339
340
341
342  /**
343   * The LDAP result code for operations that fail because the requested
344   * operation attempted to modify objectclass values in an illegal manner.
345   */
346  public static final int OBJECTCLASS_MODS_PROHIBITED = 69;
347
348
349
350  /**
351   * The LDAP result code for operations that fail because the requested
352   * operation would have required interaction with multiple DSAs.
353   */
354  public static final int AFFECTS_MULTIPLE_DSAS = 71;
355
356
357
358  /**
359   * The LDAP result code for operations that fail due to an error in
360   * virtual list view processing.
361   */
362  public static final int VIRTUAL_LIST_VIEW_ERROR = 76;
363
364
365
366  /**
367   * The LDAP result code for use in cases in which none of the other defined
368   * result codes are appropriate.
369   */
370  public static final int OTHER = 80;
371
372
373
374  /**
375   * The client-side result code that indicates that a previously-established
376   * connection to the server was lost.  This is for client-side use only and
377   * should never be transferred over protocol.
378   */
379  public static final int CLIENT_SIDE_SERVER_DOWN = 81;
380
381
382
383  /**
384   * The client-side result code that indicates that a local error occurred that
385   * had nothing to do with interaction with the server.  This is for
386   * client-side use only and should never be transferred over protocol.
387   */
388  public static final int CLIENT_SIDE_LOCAL_ERROR = 82;
389
390
391
392  /**
393   * The client-side result code that indicates that an error occurred while
394   * encoding a request to send to the server.  This is for client-side use only
395   * and should never be transferred over protocol.
396   */
397  public static final int CLIENT_SIDE_ENCODING_ERROR = 83;
398
399
400
401  /**
402   * The client-side result code that indicates that an error occurred while
403   * decoding a response from the server.  This is for client-side use only and
404   * should never be transferred over protocol.
405   */
406  public static final int CLIENT_SIDE_DECODING_ERROR = 84;
407
408
409
410  /**
411   * The client-side result code that indicates that the client did not receive
412   * an expected response in a timely manner.  This is for client-side use only
413   * and should never be transferred over protocol.
414   */
415  public static final int CLIENT_SIDE_TIMEOUT = 85;
416
417
418
419  /**
420   * The client-side result code that indicates that the user requested an
421   * unknown or unsupported authentication mechanism.  This is for client-side
422   * use only and should never be transferred over protocol.
423   */
424  public static final int CLIENT_SIDE_AUTH_UNKNOWN = 86;
425
426
427
428  /**
429   * The client-side result code that indicates that the filter provided by the
430   * user was malformed and could not be parsed.  This is for client-side use
431   * only and should never be transferred over protocol.
432   */
433  public static final int CLIENT_SIDE_FILTER_ERROR = 87;
434
435
436
437  /**
438   * The client-side result code that indicates that the user cancelled an
439   * operation.  This is for client-side use only and should never be
440   * transferred over protocol.
441   */
442  public static final int CLIENT_SIDE_USER_CANCELLED = 88;
443
444
445
446  /**
447   * The client-side result code that indicates that there was a problem with
448   * one or more of the parameters provided by the user.  This is for
449   * client-side use only and should never be transferred over protocol.
450   */
451  public static final int CLIENT_SIDE_PARAM_ERROR = 89;
452
453
454
455  /**
456   * The client-side result code that indicates that the client application was
457   * not able to allocate enough memory for the requested operation.  This is
458   * for client-side use only and should never be transferred over protocol.
459   */
460  public static final int CLIENT_SIDE_NO_MEMORY = 90;
461
462
463
464  /**
465   * The client-side result code that indicates that the client was not able to
466   * establish a connection to the server.  This is for client-side use only and
467   * should never be transferred over protocol.
468   */
469  public static final int CLIENT_SIDE_CONNECT_ERROR = 91;
470
471
472
473  /**
474   * The client-side result code that indicates that the user requested an
475   * operation that is not supported.  This is for client-side use only and
476   * should never be transferred over protocol.
477   */
478  public static final int CLIENT_SIDE_NOT_SUPPORTED = 92;
479
480
481
482  /**
483   * The client-side result code that indicates that the client expected a
484   * control to be present in the response from the server but it was not
485   * included.  This is for client-side use only and should never be transferred
486   * over protocol.
487   */
488  public static final int CLIENT_SIDE_CONTROL_NOT_FOUND = 93;
489
490
491
492  /**
493   * The client-side result code that indicates that the server did not return
494   * any results for a search operation that was expected to match at least one
495   * entry.  This is for client-side use only and should never be transferred
496   * over protocol.
497   */
498  public static final int CLIENT_SIDE_NO_RESULTS_RETURNED = 94;
499
500
501
502  /**
503   * The client-side result code that indicates that the server has returned
504   * more matching entries for a search operation than have been processed so
505   * far.  This is for client-side use only and should never be transferred over
506   * protocol.
507   */
508  public static final int CLIENT_SIDE_MORE_RESULTS_TO_RETURN = 95;
509
510
511
512  /**
513   * The client-side result code that indicates that the client detected a
514   * referral loop caused by servers referencing each other in a circular
515   * manner.  This is for client-side use only and should never be transferred
516   * over protocol.
517   */
518  public static final int CLIENT_SIDE_CLIENT_LOOP = 96;
519
520
521
522  /**
523   * The client-side result code that indicates that the client reached the
524   * maximum number of hops allowed when attempting to follow a referral (i.e.,
525   * following one referral resulted in another referral which resulted in
526   * another referral and so on).  This is for client-side use only and should
527   * never be transferred over protocol.
528   */
529  public static final int CLIENT_SIDE_REFERRAL_LIMIT_EXCEEDED = 97;
530
531
532
533  /**
534   * The LDAP result code for cancel operations that are successful, or for
535   * operations that are canceled.
536   */
537  public static final int CANCELED = 118;
538
539
540
541  /**
542   * The LDAP result code for cancel operations that fail because the specified
543   * operation could not be found.
544   */
545  public static final int NO_SUCH_OPERATION = 119;
546
547
548
549  /**
550   * The LDAP result code for cancel operations that fail because the specified
551   * operation has already progressed too far to be canceled.
552   */
553  public static final int TOO_LATE = 120;
554
555
556
557  /**
558   * The LDAP result code for cancel operations that fail because the specified
559   * operation cannot be canceled.
560   */
561  public static final int CANNOT_CANCEL = 121;
562
563
564
565  /**
566   * The LDAP result code for operations that are rejected because the
567   * filter in the LDAP assertion control did not match the target entry.
568   */
569  public static final int ASSERTION_FAILED = 122;
570
571
572
573  /**
574   * The LDAP result code for operations that fail because the server refused
575   * the client's requested authorization.
576   */
577  public static final int AUTHORIZATION_DENIED = 123;
578
579
580
581  /**
582   * The LDAP result code for operations in which no action is taken because the
583   * request include the LDAP no-op control.
584   *
585   * FIXME -- This is a temporary result code for use until
586   *          draft-zeilenga-ldap-noop is updated and an official result code is
587   *          allocated for it.  In the meantime, this result appears to be the
588   *          one used by OpenLDAP as per the message at
589   *          http://www.openldap.org/lists/openldap-devel/200601/msg00143.html
590   *          (0x410e = 16654).
591   */
592  public static final int NO_OPERATION = 16654;
593
594
595
596  /**
597   * Retrieves a string representation of the provided LDAP result code.
598   *
599   * @param  resultCode  The LDAP result code value for which to obtain the
600   *                     string representation.
601   *
602   * @return  The string representation of the provided LDAP result code.
603   */
604  public static String toString(int resultCode)
605  {
606    LocalizableMessage message;
607
608    switch (resultCode)
609    {
610      case SUCCESS:
611        message = INFO_RESULT_SUCCESS.get();
612        break;
613      case OPERATIONS_ERROR:
614        message = INFO_RESULT_OPERATIONS_ERROR.get();
615        break;
616      case PROTOCOL_ERROR:
617        message = INFO_RESULT_PROTOCOL_ERROR.get();
618        break;
619      case TIME_LIMIT_EXCEEDED:
620        message = INFO_RESULT_TIME_LIMIT_EXCEEDED.get();
621        break;
622      case SIZE_LIMIT_EXCEEDED:
623        message = INFO_RESULT_SIZE_LIMIT_EXCEEDED.get();
624        break;
625      case COMPARE_FALSE:
626        message = INFO_RESULT_COMPARE_FALSE.get();
627        break;
628      case COMPARE_TRUE:
629        message = INFO_RESULT_COMPARE_TRUE.get();
630        break;
631      case AUTH_METHOD_NOT_SUPPORTED:
632        message = INFO_RESULT_AUTH_METHOD_NOT_SUPPORTED.get();
633        break;
634      case STRONG_AUTH_REQUIRED:
635        message = INFO_RESULT_STRONG_AUTH_REQUIRED.get();
636        break;
637      case REFERRAL:
638        message = INFO_RESULT_REFERRAL.get();
639        break;
640      case ADMIN_LIMIT_EXCEEDED:
641        message = INFO_RESULT_ADMIN_LIMIT_EXCEEDED.get();
642        break;
643      case UNAVAILABLE_CRITICAL_EXTENSION:
644        message = INFO_RESULT_UNAVAILABLE_CRITICAL_EXTENSION.get();
645        break;
646      case CONFIDENTIALITY_REQUIRED:
647        message = INFO_RESULT_CONFIDENTIALITY_REQUIRED.get();
648        break;
649      case SASL_BIND_IN_PROGRESS:
650        message = INFO_RESULT_SASL_BIND_IN_PROGRESS.get();
651        break;
652      case NO_SUCH_ATTRIBUTE:
653        message = INFO_RESULT_NO_SUCH_ATTRIBUTE.get();
654        break;
655      case UNDEFINED_ATTRIBUTE_TYPE:
656        message = INFO_RESULT_UNDEFINED_ATTRIBUTE_TYPE.get();
657        break;
658      case INAPPROPRIATE_MATCHING:
659        message = INFO_RESULT_INAPPROPRIATE_MATCHING.get();
660        break;
661      case CONSTRAINT_VIOLATION:
662        message = INFO_RESULT_CONSTRAINT_VIOLATION.get();
663        break;
664      case ATTRIBUTE_OR_VALUE_EXISTS:
665        message = INFO_RESULT_ATTRIBUTE_OR_VALUE_EXISTS.get();
666        break;
667      case INVALID_ATTRIBUTE_SYNTAX:
668        message = INFO_RESULT_INVALID_ATTRIBUTE_SYNTAX.get();
669        break;
670      case NO_SUCH_OBJECT:
671        message = INFO_RESULT_NO_SUCH_OBJECT.get();
672        break;
673      case ALIAS_PROBLEM:
674        message = INFO_RESULT_ALIAS_PROBLEM.get();
675        break;
676      case INVALID_DN_SYNTAX:
677        message = INFO_RESULT_INVALID_DN_SYNTAX.get();
678        break;
679      case ALIAS_DEREFERENCING_PROBLEM:
680        message = INFO_RESULT_ALIAS_DEREFERENCING_PROBLEM.get();
681        break;
682      case INAPPROPRIATE_AUTHENTICATION:
683        message = INFO_RESULT_INAPPROPRIATE_AUTHENTICATION.get();
684        break;
685      case INVALID_CREDENTIALS:
686        message = INFO_RESULT_INVALID_CREDENTIALS.get();
687        break;
688      case INSUFFICIENT_ACCESS_RIGHTS:
689        message = INFO_RESULT_INSUFFICIENT_ACCESS_RIGHTS.get();
690        break;
691      case BUSY:
692        message = INFO_RESULT_BUSY.get();
693        break;
694      case UNAVAILABLE:
695        message = INFO_RESULT_UNAVAILABLE.get();
696        break;
697      case UNWILLING_TO_PERFORM:
698        message = INFO_RESULT_UNWILLING_TO_PERFORM.get();
699        break;
700      case LOOP_DETECT:
701        message = INFO_RESULT_LOOP_DETECT.get();
702        break;
703      case SORT_CONTROL_MISSING:
704        message = INFO_RESULT_SORT_CONTROL_MISSING.get();
705        break;
706      case OFFSET_RANGE_ERROR:
707        message = INFO_RESULT_OFFSET_RANGE_ERROR.get();
708        break;
709      case NAMING_VIOLATION:
710        message = INFO_RESULT_NAMING_VIOLATION.get();
711        break;
712      case OBJECTCLASS_VIOLATION:
713        message = INFO_RESULT_OBJECTCLASS_VIOLATION.get();
714        break;
715      case NOT_ALLOWED_ON_NONLEAF:
716        message = INFO_RESULT_NOT_ALLOWED_ON_NONLEAF.get();
717        break;
718      case NOT_ALLOWED_ON_RDN:
719        message = INFO_RESULT_NOT_ALLOWED_ON_RDN.get();
720        break;
721      case ENTRY_ALREADY_EXISTS:
722        message = INFO_RESULT_ENTRY_ALREADY_EXISTS.get();
723        break;
724      case OBJECTCLASS_MODS_PROHIBITED:
725        message = INFO_RESULT_OBJECTCLASS_MODS_PROHIBITED.get();
726        break;
727      case AFFECTS_MULTIPLE_DSAS:
728        message = INFO_RESULT_AFFECTS_MULTIPLE_DSAS.get();
729        break;
730      case VIRTUAL_LIST_VIEW_ERROR:
731        message = INFO_RESULT_VIRTUAL_LIST_VIEW_ERROR.get();
732        break;
733      case CLIENT_SIDE_SERVER_DOWN:
734        message = INFO_RESULT_CLIENT_SIDE_SERVER_DOWN.get();
735        break;
736      case CLIENT_SIDE_LOCAL_ERROR:
737        message = INFO_RESULT_CLIENT_SIDE_LOCAL_ERROR.get();
738        break;
739      case CLIENT_SIDE_ENCODING_ERROR:
740        message = INFO_RESULT_CLIENT_SIDE_ENCODING_ERROR.get();
741        break;
742      case CLIENT_SIDE_DECODING_ERROR:
743        message = INFO_RESULT_CLIENT_SIDE_DECODING_ERROR.get();
744        break;
745      case CLIENT_SIDE_TIMEOUT:
746        message = INFO_RESULT_CLIENT_SIDE_TIMEOUT.get();
747        break;
748      case CLIENT_SIDE_AUTH_UNKNOWN:
749        message = INFO_RESULT_CLIENT_SIDE_AUTH_UNKNOWN.get();
750        break;
751      case CLIENT_SIDE_FILTER_ERROR:
752        message = INFO_RESULT_CLIENT_SIDE_FILTER_ERROR.get();
753        break;
754      case CLIENT_SIDE_USER_CANCELLED:
755        message = INFO_RESULT_CLIENT_SIDE_USER_CANCELLED.get();
756        break;
757      case CLIENT_SIDE_PARAM_ERROR:
758        message = INFO_RESULT_CLIENT_SIDE_PARAM_ERROR.get();
759        break;
760      case CLIENT_SIDE_NO_MEMORY:
761        message = INFO_RESULT_CLIENT_SIDE_NO_MEMORY.get();
762        break;
763      case CLIENT_SIDE_CONNECT_ERROR:
764        message = INFO_RESULT_CLIENT_SIDE_CONNECT_ERROR.get();
765        break;
766      case CLIENT_SIDE_NOT_SUPPORTED:
767        message = INFO_RESULT_CLIENT_SIDE_NOT_SUPPORTED.get();
768        break;
769      case CLIENT_SIDE_CONTROL_NOT_FOUND:
770        message = INFO_RESULT_CLIENT_SIDE_CONTROL_NOT_FOUND.get();
771        break;
772      case CLIENT_SIDE_NO_RESULTS_RETURNED:
773        message = INFO_RESULT_CLIENT_SIDE_NO_RESULTS_RETURNED.get();
774        break;
775      case CLIENT_SIDE_MORE_RESULTS_TO_RETURN:
776        message = INFO_RESULT_CLIENT_SIDE_MORE_RESULTS_TO_RETURN.get();
777        break;
778      case CLIENT_SIDE_CLIENT_LOOP:
779        message = INFO_RESULT_CLIENT_SIDE_CLIENT_LOOP.get();
780        break;
781      case CLIENT_SIDE_REFERRAL_LIMIT_EXCEEDED:
782        message = INFO_RESULT_CLIENT_SIDE_REFERRAL_LIMIT_EXCEEDED.get();
783        break;
784      case CANCELED:
785        message = INFO_RESULT_CANCELED.get();
786        break;
787      case NO_SUCH_OPERATION:
788        message = INFO_RESULT_NO_SUCH_OPERATION.get();
789        break;
790      case TOO_LATE:
791        message = INFO_RESULT_TOO_LATE.get();
792        break;
793      case CANNOT_CANCEL:
794        message = INFO_RESULT_CANNOT_CANCEL.get();
795        break;
796      case ASSERTION_FAILED:
797        message = INFO_RESULT_ASSERTION_FAILED.get();
798        break;
799      case AUTHORIZATION_DENIED:
800        message = INFO_RESULT_AUTHORIZATION_DENIED.get();
801        break;
802      case NO_OPERATION:
803        message = INFO_RESULT_NO_OPERATION.get();
804        break;
805      default:
806        message = INFO_RESULT_OTHER.get();
807        break;
808    }
809
810    return message.toString();
811  }
812}
813