directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r291350 - /directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/LdapResult.java
Date Sat, 24 Sep 2005 23:29:11 GMT
Author: elecharny
Date: Sat Sep 24 16:29:06 2005
New Revision: 291350

URL: http://svn.apache.org/viewcvs?rev=291350&view=rev
Log:
Changed the numeric values by constant values.

Modified:
    directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/LdapResult.java

Modified: directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/LdapResult.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/LdapResult.java?rev=291350&r1=291349&r2=291350&view=diff
==============================================================================
--- directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/LdapResult.java
(original)
+++ directory/shared/ldap/trunk/apache2-provider/src/java/main/org/apache/asn1new/ldap/pojo/LdapResult.java
Sat Sep 24 16:29:06 2005
@@ -25,6 +25,7 @@
 import org.apache.asn1new.ldap.codec.primitives.LdapDN;
 import org.apache.asn1new.ldap.codec.primitives.LdapString;
 import org.apache.asn1new.ldap.codec.primitives.LdapURL;
+import org.apache.asn1new.ldap.codec.utils.LdapResultEnum;
 
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
@@ -326,240 +327,239 @@
         switch ( resultCode )
         {
 
-            case 0 :
+            case LdapResultEnum.SUCCESS :
                 sb.append( " success\n" );
                 break;
 
-            case 1 :
+            case LdapResultEnum.OPERATIONS_ERROR :
                 sb.append( " operationsError\n" );
                 break;
 
-            case 2 :
+            case LdapResultEnum.PROTOCOL_ERROR :
                 sb.append( " protocolError\n" );
                 break;
 
-            case 3 :
+            case LdapResultEnum.TIME_LIMIT_EXCEEDED :
                 sb.append( " timeLimitExceeded\n" );
                 break;
 
-            case 4 :
+            case LdapResultEnum.SIZE_LIMIT_EXCEEDED :
                 sb.append( " sizeLimitExceeded\n" );
                 break;
 
-            case 5 :
+            case LdapResultEnum.COMPARE_FALSE :
                 sb.append( " compareFalse\n" );
                 break;
 
-            case 6 :
+            case LdapResultEnum.COMPARE_TRUE :
                 sb.append( " compareTrue\n" );
                 break;
 
-            case 7 :
+            case LdapResultEnum.AUTH_METHOD_NOT_SUPPORTED :
                 sb.append( " authMethodNotSupported\n" );
                 break;
 
-            case 8 :
+            case LdapResultEnum.STRONG_AUTH_REQUIRED :
                 sb.append( " strongAuthRequired\n" );
                 break;
 
-            case 9 :
+            case LdapResultEnum.RESERVED_9 :
                 sb.append( " -- 9 reserved --\n" );
                 break;
 
-            case 10 :
+            case LdapResultEnum.REFERRAL :
                 sb.append( " referral -- new\n" );
                 break;
 
-            case 11 :
+            case LdapResultEnum.ADMIN_LIMIT_EXCEEDED :
                 sb.append( " adminLimitExceeded -- new\n" );
                 break;
 
-            case 12 :
+            case LdapResultEnum.UNAVAILABLE_CRITICAL_EXTENSION :
                 sb.append( " unavailableCriticalExtension -- new\n" );
                 break;
 
-            case 13 :
+            case LdapResultEnum.CONFIDENTIALITY_REQUIRED :
                 sb.append( " confidentialityRequired -- new\n" );
                 break;
 
-            case 14 :
+            case LdapResultEnum.SASL_BIND_IN_PROGRESS :
                 sb.append( " saslBindInProgress -- new\n" );
                 break;
 
-            case 15 :
-                sb.append( " !! Unknow error code\n" );
-                break;
-
-            case 16 :
+            case LdapResultEnum.NO_SUCH_ATTRIBUTE :
                 sb.append( " noSuchAttribute\n" );
                 break;
 
-            case 17 :
+            case LdapResultEnum.UNDEFINED_ATTRIBUTE_TYPE :
                 sb.append( " undefinedAttributeType\n" );
                 break;
 
-            case 18 :
+            case LdapResultEnum.INAPPROPRIATE_MATCHING :
                 sb.append( " inappropriateMatching\n" );
                 break;
 
-            case 19 :
+            case LdapResultEnum.CONSTRAINT_VIOLATION :
                 sb.append( " constraintViolation\n" );
                 break;
 
-            case 20 :
+            case LdapResultEnum.ATTRIBUTE_OR_VALUE_EXISTS :
                 sb.append( " attributeOrValueExists\n" );
                 break;
 
-            case 21 :
+            case LdapResultEnum.INVALID_ATTRIBUTE_SYNTAX :
                 sb.append( " invalidAttributeSyntax\n" );
                 break;
 
-            case 22 :
-            case 23 :
-            case 24 :
-            case 25 :
-            case 26 :
-            case 27 :
-            case 28 :
-            case 29 :
-            case 30 :
-            case 31 :
+            case LdapResultEnum.UNUSED_22 :
+            case LdapResultEnum.UNUSED_23 :
+            case LdapResultEnum.UNUSED_24 :
+            case LdapResultEnum.UNUSED_25 :
+            case LdapResultEnum.UNUSED_26 :
+            case LdapResultEnum.UNUSED_27 :
+            case LdapResultEnum.UNUSED_28 :
+            case LdapResultEnum.UNUSED_29 :
+            case LdapResultEnum.UNUSED_30 :
+            case LdapResultEnum.UNUSED_31 :
                 sb.append( " -- 22-31 unused --\n" );
                 break;
 
-            case 32 :
+            case LdapResultEnum.NO_SUCH_OBJECT :
                 sb.append( " noSuchObject\n" );
                 break;
 
-            case 33 :
+            case LdapResultEnum.ALIAS_PROBLEM :
                 sb.append( " aliasProblem\n" );
                 break;
 
-            case 34 :
+            case LdapResultEnum.INVALID_DN_SYNTAX :
                 sb.append( " invalidDNSyntax\n" );
                 break;
 
-            case 35 :
+            case LdapResultEnum.RESERVED_FOR_UNDEFINED_IS_LEAF :
                 sb.append( " -- 35 reserved for undefined isLeaf --\n" );
                 break;
 
-            case 36 :
+            case LdapResultEnum.ALIAS_DEREFERENCING_PROBLEM :
                 sb.append( " aliasDereferencingProblem\n" );
                 break;
 
-            case 37 :
-            case 38 :
-            case 39 :
-            case 40 :
-            case 41 :
-            case 42 :
-            case 43 :
-            case 44 :
-            case 45 :
-            case 46 :
-            case 47 :
+            case LdapResultEnum.UNUSED_37 :
+            case LdapResultEnum.UNUSED_38 :
+            case LdapResultEnum.UNUSED_39 :
+            case LdapResultEnum.UNUSED_40 :
+            case LdapResultEnum.UNUSED_41 :
+            case LdapResultEnum.UNUSED_42 :
+            case LdapResultEnum.UNUSED_43 :
+            case LdapResultEnum.UNUSED_44 :
+            case LdapResultEnum.UNUSED_45 :
+            case LdapResultEnum.UNUSED_46 :
+            case LdapResultEnum.UNUSED_47 :
                 sb.append( " -- 37-47 unused --\n" );
                 break;
 
-            case 48 :
+            case LdapResultEnum.INAPPROPRIATE_AUTHENTICATION :
                 sb.append( " inappropriateAuthentication\n" );
                 break;
 
-            case 49 :
+            case LdapResultEnum.INVALID_CREDENTIALS :
                 sb.append( " invalidCredentials\n" );
                 break;
 
-            case 50 :
+            case LdapResultEnum.INSUFFICIENT_ACCESS_RIGHTS :
                 sb.append( " insufficientAccessRights\n" );
                 break;
 
-            case 51 :
+            case LdapResultEnum.BUSY :
                 sb.append( " busy\n" );
                 break;
 
-            case 52 :
+            case LdapResultEnum.UNAVAILABLE :
                 sb.append( " unavailable\n" );
                 break;
 
-            case 53 :
+            case LdapResultEnum.UNWILLING_TO_PERFORM :
                 sb.append( " unwillingToPerform\n" );
                 break;
 
-            case 54 :
+            case LdapResultEnum.LOOP_DETECT :
                 sb.append( " loopDetect\n" );
                 break;
 
-            case 55 :
-            case 56 :
-            case 57 :
-            case 58 :
-            case 59 :
-            case 60 :
-            case 61 :
-            case 62 :
-            case 63 :
+            case LdapResultEnum.UNUSED_55 :
+            case LdapResultEnum.UNUSED_56 :
+            case LdapResultEnum.UNUSED_57 :
+            case LdapResultEnum.UNUSED_58 :
+            case LdapResultEnum.UNUSED_59 :
+            case LdapResultEnum.UNUSED_60 :
+            case LdapResultEnum.UNUSED_61 :
+            case LdapResultEnum.UNUSED_62 :
+            case LdapResultEnum.UNUSED_63 :
                 sb.append( " -- 55-63 unused --\n" );
                 break;
 
-            case 64 :
+            case LdapResultEnum.NAMING_VIOLATION :
                 sb.append( " namingViolation\n" );
                 break;
 
-            case 65 :
+            case LdapResultEnum.OBJECT_CLASS_VIOLATION :
                 sb.append( " objectClassViolation\n" );
                 break;
 
-            case 66 :
+            case LdapResultEnum.NOT_ALLOWED_ON_NON_LEAF :
                 sb.append( " notAllowedOnNonLeaf\n" );
                 break;
 
-            case 67 :
+            case LdapResultEnum.NOT_ALLOWED_ON_RDN :
                 sb.append( " notAllowedOnRDN\n" );
                 break;
 
-            case 68 :
+            case LdapResultEnum.ENTRY_ALREADY_EXISTS :
                 sb.append( " entryAlreadyExists\n" );
                 break;
 
-            case 69 :
+            case LdapResultEnum.OBJECT_CLASS_MODS_PROHIBITED :
                 sb.append( " objectClassModsProhibited\n" );
                 break;
 
-            case 70 :
+            case LdapResultEnum.RESERVED_FOR_CLDAP :
                 sb.append( " -- 70 reserved for CLDAP --\n" );
                 break;
 
-            case 71 :
+            case LdapResultEnum.AFFECTS_MULTIPLE_DSAS :
                 sb.append( " affectsMultipleDSAs -- new\n" );
                 break;
 
-            case 72 :
-            case 73 :
-            case 74 :
-            case 75 :
-            case 76 :
-            case 77 :
-            case 78 :
-            case 79 :
+            case LdapResultEnum.UNUSED_72 :
+            case LdapResultEnum.UNUSED_73 :
+            case LdapResultEnum.UNUSED_74 :
+            case LdapResultEnum.UNUSED_75 :
+            case LdapResultEnum.UNUSED_76 :
+            case LdapResultEnum.UNUSED_77 :
+            case LdapResultEnum.UNUSED_78 :
+            case LdapResultEnum.UNUSED_79 :
                 sb.append( " -- 72-79 unused --\n" );
                 break;
 
-            case 80 :
+            case LdapResultEnum.OTHER :
                 sb.append( " other\n" );
                 break;
 
-            case 81 :
-            case 82 :
-            case 83 :
-            case 84 :
-            case 85 :
-            case 86 :
-            case 87 :
-            case 88 :
-            case 89 :
-            case 90 :
+            case LdapResultEnum.RESERVED_FOR_APIS_81 :
+            case LdapResultEnum.RESERVED_FOR_APIS_82 :
+            case LdapResultEnum.RESERVED_FOR_APIS_83 :
+            case LdapResultEnum.RESERVED_FOR_APIS_84 :
+            case LdapResultEnum.RESERVED_FOR_APIS_85 :
+            case LdapResultEnum.RESERVED_FOR_APIS_86 :
+            case LdapResultEnum.RESERVED_FOR_APIS_87 :
+            case LdapResultEnum.RESERVED_FOR_APIS_88 :
+            case LdapResultEnum.RESERVED_FOR_APIS_89 :
+            case LdapResultEnum.RESERVED_FOR_APIS_90 :
                 sb.append( " -- 81-90 reserved for APIs --" );
                 break;
+                
+            default :
+                sb.append( "Unknown error code : " ).append( resultCode );
         }
 
         sb.append( "            Matched DN : '" ).append( matchedDN.toString() ).append(
"'\n" );



Mime
View raw message