directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r474487 [1/4] - in /directory/branches/apacheds-schema/shared/ldap/src: main/antlr/ main/java/org/apache/directory/shared/ldap/codec/ main/java/org/apache/directory/shared/ldap/codec/actions/ main/java/org/apache/directory/shared/ldap/codec...
Date Mon, 13 Nov 2006 20:16:19 GMT
Author: elecharny
Date: Mon Nov 13 12:16:16 2006
New Revision: 474487

URL: http://svn.apache.org/viewvc?view=rev&rev=474487
Log:
Switched partially the Enum classes to enum. 
WARNING : it's not over, 66 errors remain ...

Removed:
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/util/LdapResultEnum.java
Modified:
    directory/branches/apacheds-schema/shared/ldap/src/main/antlr/subtree-specification.g
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAttributeInUseException.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationException.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationNotSupportedException.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapContextNotEmptyException.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeIdentifierException.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeValueException.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNameAlreadyBoundException.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNameNotFoundException.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNoPermissionException.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNoSuchAttributeException.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSchemaViolationException.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSizeLimitExceededException.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapTimeLimitExceededException.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequest.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequest.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddResponse.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequest.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindResponse.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequest.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareResponse.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequest.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteResponse.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DerefAliasesEnum.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequest.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponse.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/LdapResultImpl.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/MessageTypeEnum.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequest.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnResponse.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequest.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyResponse.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResultCodeEnum.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequest.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseDone.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseEntry.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchResponseReference.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/UnbindRequest.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownResponse.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/LaunchDiagnosticUiResponse.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/NoticeOfDisconnect.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/schema/MatchingRuleEnum.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/Enum.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/EnumUtils.java
    directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/util/ValuedEnum.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapResultTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/add/AddRequestTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/compare/CompareRequestTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/del/DelRequestTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/codec/search/SearchRequestTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractMessageTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/AbstractResultResponseTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/AddRequestImplTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindRequestImplTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/BindResponseImplTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/CompareRequestImplTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/DeleteRequestImplTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedRequestImplTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/ExtendedResponseImplTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/LdapResultImplTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImplTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/ModifyRequestImplTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseDoneImplTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseEntryImplTest.java
    directory/branches/apacheds-schema/shared/ldap/src/test/java/org/apache/directory/shared/ldap/message/SearchResponseReferenceImplTest.java

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/antlr/subtree-specification.g
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/antlr/subtree-specification.g?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/antlr/subtree-specification.g (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/antlr/subtree-specification.g Mon Nov 13 12:16:16 2006
@@ -37,8 +37,6 @@
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecificationModifier;
 import org.apache.directory.shared.ldap.schema.NormalizerMappingResolver;
-import org.apache.directory.shared.ldap.util.ComponentsMonitor;
-import org.apache.directory.shared.ldap.util.OptionalComponentsMonitor;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java Mon Nov 13 12:16:16 2006
@@ -379,7 +379,7 @@
                             log.error( "{} : {}", msg, ine.getMessage() );
                             
                             DeleteResponseImpl response = new DeleteResponseImpl( ldapMessage.getMessageId() );
-                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALIDDNSYNTAX, LdapDN.EMPTY_LDAPDN, ine );
+                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX, LdapDN.EMPTY_LDAPDN, ine );
                         }
 
                         delRequest.setEntry( entry );
@@ -608,7 +608,7 @@
                         
                             BindResponseImpl response = new BindResponseImpl( ldapMessage.getMessageId() );
                         
-                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALIDDNSYNTAX, LdapDN.EMPTY_LDAPDN, ine );
+                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX, LdapDN.EMPTY_LDAPDN, ine );
                         }
 
                         bindRequestMessage.setName( name );
@@ -718,7 +718,7 @@
                         
                         BindResponseImpl response = new BindResponseImpl( ldapMessage.getMessageId() );
                     
-                        throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALIDCREDENTIALS, 
+                        throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_CREDENTIALS, 
                             bindRequestMessage.getName(), null );
                     }
 
@@ -1491,7 +1491,7 @@
                             log.error( "{} : {}", msg, ine.getMessage() );
                     
                             ModifyResponseImpl response = new ModifyResponseImpl( ldapMessage.getMessageId() );
-                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALIDDNSYNTAX, LdapDN.EMPTY_LDAPDN, ine );
+                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX, LdapDN.EMPTY_LDAPDN, ine );
                         }
 
                         modifyRequest.setObject( object );
@@ -1656,7 +1656,7 @@
                         log.error( msg );
                         
                         ModifyResponseImpl response = new ModifyResponseImpl( ldapMessage.getMessageId() );
-                        throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALIDATTRIBUTESYNTAX, modifyRequest.getObject(), null );
+                        throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, modifyRequest.getObject(), null );
                     }
                     else
                     {
@@ -1915,7 +1915,7 @@
                 
                         // I guess that trying to add an entry which DN is empty is a naming violation...
                         // Not 100% sure though ...
-                        throw new ResponseCarryingException( msg, response, ResultCodeEnum.NAMINGVIOLATION, LdapDN.EMPTY_LDAPDN, null );
+                        throw new ResponseCarryingException( msg, response, ResultCodeEnum.NAMING_VIOLATION, LdapDN.EMPTY_LDAPDN, null );
                     }
                     else
                     {
@@ -1934,7 +1934,7 @@
                             log.error( "{} : {}", msg, ine.getMessage() );
                 
                             AddResponseImpl response = new AddResponseImpl( ldapMessage.getMessageId() );
-                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALIDDNSYNTAX, LdapDN.EMPTY_LDAPDN, ine );
+                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX, LdapDN.EMPTY_LDAPDN, ine );
                         }
 
                         addRequest.setEntry( entry );
@@ -2010,7 +2010,7 @@
 
                         AddResponseImpl response = new AddResponseImpl( ldapMessage.getMessageId() );
                         
-                        throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALIDATTRIBUTESYNTAX, addRequest.getEntry(), null );
+                        throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, addRequest.getEntry(), null );
                     }
 
                     String type = new String( tlv.getValue().getData() );
@@ -2254,7 +2254,7 @@
                             log.error( "{} : {}", msg, ine.getMessage() );
         
                             ModifyDnResponseImpl response = new ModifyDnResponseImpl( ldapMessage.getMessageId() );
-                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALIDDNSYNTAX, LdapDN.EMPTY_LDAPDN, ine );
+                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX, LdapDN.EMPTY_LDAPDN, ine );
                         }
 
                         modifyDNRequest.setEntry( entry );
@@ -2305,7 +2305,7 @@
                         log.error(  msg  );
                         
                         ModifyDnResponseImpl response = new ModifyDnResponseImpl( ldapMessage.getMessageId() );
-                        throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALIDDNSYNTAX, modifyDNRequest.getEntry(), null );
+                        throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX, modifyDNRequest.getEntry(), null );
                     }
                     else
                     {
@@ -2324,7 +2324,7 @@
                             log.error( "{} : {}", msg, ine.getMessage() );
     
                             ModifyDnResponseImpl response = new ModifyDnResponseImpl( ldapMessage.getMessageId() );
-                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALIDDNSYNTAX, modifyDNRequest.getEntry(), ine );
+                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX, modifyDNRequest.getEntry(), ine );
                         }
 
                         modifyDNRequest.setNewRDN( newRdn );
@@ -2458,7 +2458,7 @@
                             log.error( "{} : {}", msg, ine.getMessage() );
     
                             ModifyDnResponseImpl response = new ModifyDnResponseImpl( ldapMessage.getMessageId() );
-                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALIDDNSYNTAX, modifyDNRequest.getEntry(), ine );
+                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX, modifyDNRequest.getEntry(), ine );
                         }
 
                         modifyDNRequest.setNewSuperior( newSuperior );
@@ -2613,7 +2613,7 @@
                             log.error( "{} : {}", msg, ine.getMessage() );
             
                             CompareResponseImpl response = new CompareResponseImpl( ldapMessage.getMessageId() );
-                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALIDDNSYNTAX, LdapDN.EMPTY_LDAPDN, ine );
+                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX, LdapDN.EMPTY_LDAPDN, ine );
                         }
 
                         compareRequest.setEntry( entry );
@@ -2673,7 +2673,7 @@
                         log.error( msg );
                         CompareResponseImpl response = new CompareResponseImpl( ldapMessage.getMessageId() );
                         
-                        throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALIDATTRIBUTESYNTAX, compareRequest.getEntry(), null );
+                        throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, compareRequest.getEntry(), null );
                     }
 
                     String type = new String( tlv.getValue().getData() );
@@ -3522,7 +3522,7 @@
                             log.error( "{} : {}", msg, ine.getMessage() );
                     
                             SearchResponseDoneImpl response = new SearchResponseDoneImpl( ldapMessage.getMessageId() );
-                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALIDDNSYNTAX, LdapDN.EMPTY_LDAPDN, ine );
+                            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX, LdapDN.EMPTY_LDAPDN, ine );
                         }
                     }
 

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapResult.java Mon Nov 13 12:16:16 2006
@@ -25,8 +25,8 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.ldap.codec.util.LdapResultEnum;
 import org.apache.directory.shared.ldap.codec.util.LdapURL;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -96,7 +96,7 @@
      * other                                    (80) 
      * }                                        -- 81-90 reserved for APIs --
      */
-    private int resultCode;
+    private ResultCodeEnum resultCode;
 
     /** The DN that is matched by the Bind */
     private LdapDN matchedDN;
@@ -210,7 +210,7 @@
      * 
      * @return Returns the resultCode.
      */
-    public int getResultCode()
+    public ResultCodeEnum getResultCode()
     {
         return resultCode;
     }
@@ -221,7 +221,7 @@
      * 
      * @param resultCode The resultCode to set.
      */
-    public void setResultCode( int resultCode )
+    public void setResultCode( ResultCodeEnum resultCode )
     {
         this.resultCode = resultCode;
     }
@@ -309,7 +309,7 @@
             // The result code
             buffer.put( UniversalTag.ENUMERATED_TAG );
             buffer.put( ( byte ) 1 );
-            buffer.put( ( byte ) resultCode );
+            buffer.put( ( byte ) resultCode.getResultCode() );
         }
         catch ( BufferOverflowException boe )
         {
@@ -358,239 +358,244 @@
         switch ( resultCode )
         {
 
-            case LdapResultEnum.SUCCESS:
+            case SUCCESS:
                 sb.append( " success\n" );
                 break;
 
-            case LdapResultEnum.OPERATIONS_ERROR:
+            case OPERATIONS_ERROR:
                 sb.append( " operationsError\n" );
                 break;
 
-            case LdapResultEnum.PROTOCOL_ERROR:
+            case PROTOCOL_ERROR:
                 sb.append( " protocolError\n" );
                 break;
 
-            case LdapResultEnum.TIME_LIMIT_EXCEEDED:
+            case TIME_LIMIT_EXCEEDED:
                 sb.append( " timeLimitExceeded\n" );
                 break;
 
-            case LdapResultEnum.SIZE_LIMIT_EXCEEDED:
+            case SIZE_LIMIT_EXCEEDED:
                 sb.append( " sizeLimitExceeded\n" );
                 break;
 
-            case LdapResultEnum.COMPARE_FALSE:
+            case COMPARE_FALSE:
                 sb.append( " compareFalse\n" );
                 break;
 
-            case LdapResultEnum.COMPARE_TRUE:
+            case COMPARE_TRUE:
                 sb.append( " compareTrue\n" );
                 break;
 
-            case LdapResultEnum.AUTH_METHOD_NOT_SUPPORTED:
+            case AUTH_METHOD_NOT_SUPPORTED:
                 sb.append( " authMethodNotSupported\n" );
                 break;
 
-            case LdapResultEnum.STRONG_AUTH_REQUIRED:
+            case STRONG_AUTH_REQUIRED:
                 sb.append( " strongAuthRequired\n" );
                 break;
 
-            case LdapResultEnum.RESERVED_9:
-                sb.append( " -- 9 reserved --\n" );
-                break;
-
-            case LdapResultEnum.REFERRAL:
+            case REFERRAL:
                 sb.append( " referral -- new\n" );
                 break;
 
-            case LdapResultEnum.ADMIN_LIMIT_EXCEEDED:
+            case ADMIN_LIMIT_EXCEEDED:
                 sb.append( " adminLimitExceeded -- new\n" );
                 break;
 
-            case LdapResultEnum.UNAVAILABLE_CRITICAL_EXTENSION:
+            case UNAVAILABLE_CRITICAL_EXTENSION:
                 sb.append( " unavailableCriticalExtension -- new\n" );
                 break;
 
-            case LdapResultEnum.CONFIDENTIALITY_REQUIRED:
+            case CONFIDENTIALITY_REQUIRED:
                 sb.append( " confidentialityRequired -- new\n" );
                 break;
 
-            case LdapResultEnum.SASL_BIND_IN_PROGRESS:
+            case SASL_BIND_IN_PROGRESS:
                 sb.append( " saslBindInProgress -- new\n" );
                 break;
 
-            case LdapResultEnum.NO_SUCH_ATTRIBUTE:
+            case NO_SUCH_ATTRIBUTE:
                 sb.append( " noSuchAttribute\n" );
                 break;
 
-            case LdapResultEnum.UNDEFINED_ATTRIBUTE_TYPE:
+            case UNDEFINED_ATTRIBUTE_TYPE:
                 sb.append( " undefinedAttributeType\n" );
                 break;
 
-            case LdapResultEnum.INAPPROPRIATE_MATCHING:
+            case INAPPROPRIATE_MATCHING:
                 sb.append( " inappropriateMatching\n" );
                 break;
 
-            case LdapResultEnum.CONSTRAINT_VIOLATION:
+            case CONSTRAINT_VIOLATION:
                 sb.append( " constraintViolation\n" );
                 break;
 
-            case LdapResultEnum.ATTRIBUTE_OR_VALUE_EXISTS:
+            case ATTRIBUTE_OR_VALUE_EXISTS:
                 sb.append( " attributeOrValueExists\n" );
                 break;
 
-            case LdapResultEnum.INVALID_ATTRIBUTE_SYNTAX:
+            case INVALID_ATTRIBUTE_SYNTAX:
                 sb.append( " invalidAttributeSyntax\n" );
                 break;
 
-            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 LdapResultEnum.NO_SUCH_OBJECT:
+            case NO_SUCH_OBJECT:
                 sb.append( " noSuchObject\n" );
                 break;
 
-            case LdapResultEnum.ALIAS_PROBLEM:
+            case ALIAS_PROBLEM:
                 sb.append( " aliasProblem\n" );
                 break;
 
-            case LdapResultEnum.INVALID_DN_SYNTAX:
+            case INVALID_DN_SYNTAX:
                 sb.append( " invalidDNSyntax\n" );
                 break;
 
-            case LdapResultEnum.RESERVED_FOR_UNDEFINED_IS_LEAF:
-                sb.append( " -- 35 reserved for undefined isLeaf --\n" );
-                break;
-
-            case LdapResultEnum.ALIAS_DEREFERENCING_PROBLEM:
+            case ALIAS_DEREFERENCING_PROBLEM:
                 sb.append( " aliasDereferencingProblem\n" );
                 break;
 
-            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 LdapResultEnum.INAPPROPRIATE_AUTHENTICATION:
+            case INAPPROPRIATE_AUTHENTICATION:
                 sb.append( " inappropriateAuthentication\n" );
                 break;
 
-            case LdapResultEnum.INVALID_CREDENTIALS:
+            case INVALID_CREDENTIALS:
                 sb.append( " invalidCredentials\n" );
                 break;
 
-            case LdapResultEnum.INSUFFICIENT_ACCESS_RIGHTS:
+            case INSUFFICIENT_ACCESS_RIGHTS:
                 sb.append( " insufficientAccessRights\n" );
                 break;
 
-            case LdapResultEnum.BUSY:
+            case BUSY:
                 sb.append( " busy\n" );
                 break;
 
-            case LdapResultEnum.UNAVAILABLE:
+            case UNAVAILABLE:
                 sb.append( " unavailable\n" );
                 break;
 
-            case LdapResultEnum.UNWILLING_TO_PERFORM:
+            case UNWILLING_TO_PERFORM:
                 sb.append( " unwillingToPerform\n" );
                 break;
 
-            case LdapResultEnum.LOOP_DETECT:
+            case LOOP_DETECT:
                 sb.append( " loopDetect\n" );
                 break;
 
-            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 LdapResultEnum.NAMING_VIOLATION:
+            case NAMING_VIOLATION:
                 sb.append( " namingViolation\n" );
                 break;
 
-            case LdapResultEnum.OBJECT_CLASS_VIOLATION:
+            case OBJECT_CLASS_VIOLATION:
                 sb.append( " objectClassViolation\n" );
                 break;
 
-            case LdapResultEnum.NOT_ALLOWED_ON_NON_LEAF:
+            case NOT_ALLOWED_ON_NON_LEAF:
                 sb.append( " notAllowedOnNonLeaf\n" );
                 break;
 
-            case LdapResultEnum.NOT_ALLOWED_ON_RDN:
+            case NOT_ALLOWED_ON_RDN:
                 sb.append( " notAllowedOnRDN\n" );
                 break;
 
-            case LdapResultEnum.ENTRY_ALREADY_EXISTS:
+            case ENTRY_ALREADY_EXISTS:
                 sb.append( " entryAlreadyExists\n" );
                 break;
 
-            case LdapResultEnum.OBJECT_CLASS_MODS_PROHIBITED:
+            case OBJECT_CLASS_MODS_PROHIBITED:
                 sb.append( " objectClassModsProhibited\n" );
                 break;
 
-            case LdapResultEnum.RESERVED_FOR_CLDAP:
-                sb.append( " -- 70 reserved for CLDAP --\n" );
-                break;
-
-            case LdapResultEnum.AFFECTS_MULTIPLE_DSAS:
+            case AFFECTS_MULTIPLE_DSAS:
                 sb.append( " affectsMultipleDSAs -- new\n" );
                 break;
 
-            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 LdapResultEnum.OTHER:
+            case OTHER:
                 sb.append( " other\n" );
                 break;
 
-            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 );
+            	switch ( resultCode.getResultCode() )
+            	{
+	                case 9:
+	                    sb.append( " -- 9 reserved --\n" );
+	                    break;
+	
+	                case 22:
+	                case 23:
+	                case 24:
+	                case 25:
+	                case 26:
+	                case 27:
+	                case 28:
+	                case 29:
+	                case 30:
+	                case 31:
+	                    sb.append( " -- 22-31 unused --\n" );
+	                    break;
+	                    
+	                case 35 :
+	                    sb.append( " -- 35 reserved for undefined isLeaf --\n" );
+	                    break;
+	                    
+	                case 37:
+	                case 38:
+	                case 39:
+	                case 40:
+	                case 41:
+	                case 42:
+	                case 43:
+	                case 44:
+	                case 45:
+	                case 46:
+	                case 47:
+	                    sb.append( " -- 37-47 unused --\n" );
+	                    break;
+	
+	                case 55:
+	                case 56:
+	                case 57:
+	                case 58:
+	                case 59:
+	                case 60:
+	                case 61:
+	                case 62:
+	                case 63:
+	                    sb.append( " -- 55-63 unused --\n" );
+	                    break;
+	
+	                case 70:
+	                    sb.append( " -- 70 reserved for CLDAP --\n" );
+	                    break;
+	                    
+	                case 72:
+	                case 73:
+	                case 74:
+	                case 75:
+	                case 76:
+	                case 77:
+	                case 78:
+	                case 79:
+	                    sb.append( " -- 72-79 unused --\n" );
+	                    break;
+	
+	                case 81:
+	                case 82:
+	                case 83:
+	                case 84:
+	                case 85:
+	                case 86:
+	                case 87:
+	                case 88:
+	                case 89:
+	                case 90:
+	                    sb.append( " -- 81-90 reserved for APIs --" );
+	                    break;
+	                    
+	                default :
+	                	sb.append( "Unknown error code : " ).append( resultCode );
+	                	break;
+            	}
         }
 
         sb.append( "            Matched DN : '" ).append( matchedDN == null ? "": matchedDN.toString() ).append( "'\n" );

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/TwixTransformer.java Mon Nov 13 12:16:16 2006
@@ -616,19 +616,19 @@
         switch ( searchRequest.getDerefAliases() )
         {
             case LdapConstants.DEREF_ALWAYS:
-                snickersMessage.setDerefAliases( DerefAliasesEnum.DEREFALWAYS );
+                snickersMessage.setDerefAliases( DerefAliasesEnum.DEREF_ALWAYS );
                 break;
 
             case LdapConstants.DEREF_FINDING_BASE_OBJ:
-                snickersMessage.setDerefAliases( DerefAliasesEnum.DEREFFINDINGBASEOBJ );
+                snickersMessage.setDerefAliases( DerefAliasesEnum.DEREF_FINDING_BASE_OBJ );
                 break;
 
             case LdapConstants.DEREF_IN_SEARCHING:
-                snickersMessage.setDerefAliases( DerefAliasesEnum.DEREFINSEARCHING );
+                snickersMessage.setDerefAliases( DerefAliasesEnum.DEREF_IN_SEARCHING );
                 break;
 
             case LdapConstants.NEVER_DEREF_ALIASES:
-                snickersMessage.setDerefAliases( DerefAliasesEnum.NEVERDEREFALIASES );
+                snickersMessage.setDerefAliases( DerefAliasesEnum.NEVER_DEREF_ALIASES );
                 break;
         }
 
@@ -867,7 +867,7 @@
         LdapResult twixLdapResult = new LdapResult();
 
         // Snickers : ResultCodeEnum resultCode -> Twix : int resultCode
-        twixLdapResult.setResultCode( snickersLdapResult.getResultCode().getValue() );
+        twixLdapResult.setResultCode( snickersLdapResult.getResultCode() );
 
         // Snickers : String errorMessage -> Twix : LdapString errorMessage
         String errorMessage = snickersLdapResult.getErrorMessage();
@@ -1184,43 +1184,43 @@
 
         twixMessage.setMessageId( msg.getMessageId() );
 
-        if ( msg.getType() == MessageTypeEnum.SEARCHRESENTRY )
+        if ( msg.getType() == MessageTypeEnum.SEARCH_RES_ENTRY )
         {
             transformSearchResultEntry( twixMessage, msg );
         }
-        else if ( msg.getType() == MessageTypeEnum.SEARCHRESDONE )
+        else if ( msg.getType() == MessageTypeEnum.SEARCH_RES_DONE )
         {
             transformSearchResultDone( twixMessage, msg );
         }
-        else if ( msg.getType() == MessageTypeEnum.SEARCHRESREF )
+        else if ( msg.getType() == MessageTypeEnum.SEARCH_RES_REF )
         {
             transformSearchResultReference( twixMessage, msg );
         }
-        else if ( msg.getType() == MessageTypeEnum.BINDRESPONSE )
+        else if ( msg.getType() == MessageTypeEnum.BIND_RESPONSE )
         {
             transformBindResponse( twixMessage, msg );
         }
-        else if ( msg.getType() == MessageTypeEnum.ADDRESPONSE )
+        else if ( msg.getType() == MessageTypeEnum.ADD_RESPONSE )
         {
             transformAddResponse( twixMessage, msg );
         }
-        else if ( msg.getType() == MessageTypeEnum.COMPARERESPONSE )
+        else if ( msg.getType() == MessageTypeEnum.COMPARE_RESPONSE )
         {
             transformCompareResponse( twixMessage, msg );
         }
-        else if ( msg.getType() == MessageTypeEnum.DELRESPONSE )
+        else if ( msg.getType() == MessageTypeEnum.DEL_RESPONSE )
         {
             transformDelResponse( twixMessage, msg );
         }
-        else if ( msg.getType() == MessageTypeEnum.MODIFYRESPONSE )
+        else if ( msg.getType() == MessageTypeEnum.MODIFY_RESPONSE )
         {
             transformModifyResponse( twixMessage, msg );
         }
-        else if ( msg.getType() == MessageTypeEnum.MODDNRESPONSE )
+        else if ( msg.getType() == MessageTypeEnum.MOD_DN_RESPONSE )
         {
             transformModifyDNResponse( twixMessage, msg );
         }
-        else if ( msg.getType() == MessageTypeEnum.EXTENDEDRESP )
+        else if ( msg.getType() == MessageTypeEnum.EXTENDED_RESP )
         {
             transformExtendedResponse( twixMessage, msg );
         }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/MatchedDNAction.java Mon Nov 13 12:16:16 2006
@@ -30,7 +30,7 @@
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.LdapResponse;
 import org.apache.directory.shared.ldap.codec.LdapResult;
-import org.apache.directory.shared.ldap.codec.util.LdapResultEnum;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -80,14 +80,14 @@
             // A not null matchedDN is valid for resultCodes
             // NoSuchObject, AliasProblem, InvalidDNSyntax and
             // AliasDreferencingProblem.
-            int resultCode = ldapResult.getResultCode();
+            ResultCodeEnum resultCode = ldapResult.getResultCode();
 
             switch ( resultCode )
             {
-                case LdapResultEnum.NO_SUCH_OBJECT :
-                case LdapResultEnum.ALIAS_PROBLEM :
-                case LdapResultEnum.INVALID_DN_SYNTAX :
-                case LdapResultEnum.ALIAS_DEREFERENCING_PROBLEM :
+                case NO_SUCH_OBJECT :
+                case ALIAS_PROBLEM :
+                case INVALID_DN_SYNTAX :
+                case ALIAS_DEREFERENCING_PROBLEM :
                     byte[] dnBytes = tlv.getValue().getData();
                     
                     try

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ReferralAction.java Mon Nov 13 12:16:16 2006
@@ -30,9 +30,9 @@
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.LdapResponse;
 import org.apache.directory.shared.ldap.codec.LdapResult;
-import org.apache.directory.shared.ldap.codec.util.LdapResultEnum;
 import org.apache.directory.shared.ldap.codec.util.LdapURL;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -74,7 +74,7 @@
         }
         else
         {
-            if ( ldapResult.getResultCode() == LdapResultEnum.REFERRAL )
+            if ( ldapResult.getResultCode() == ResultCodeEnum.REFERRAL )
             {
                 try
                 {

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/codec/actions/ResultCodeAction.java Mon Nov 13 12:16:16 2006
@@ -31,7 +31,7 @@
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
 import org.apache.directory.shared.ldap.codec.LdapResponse;
 import org.apache.directory.shared.ldap.codec.LdapResult;
-import org.apache.directory.shared.ldap.codec.util.LdapResultEnum;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 import org.slf4j.Logger;
@@ -74,11 +74,11 @@
         TLV tlv = ldapMessageContainer.getCurrentTLV();
 
         Value value = tlv.getValue();
-        int resultCode = 0;
+        ResultCodeEnum resultCode = ResultCodeEnum.SUCCESS;
 
         try
         {
-            resultCode = IntegerDecoder.parse( value, 0, 90 );
+            resultCode = ResultCodeEnum.getResultCode( IntegerDecoder.parse( value, 0, 90 ) );
         }
         catch ( IntegerDecoderException ide )
         {
@@ -91,54 +91,54 @@
         // Treat the 'normal' cases !
         switch ( resultCode )
         {
-            case LdapResultEnum.SUCCESS:
-            case LdapResultEnum.OPERATIONS_ERROR:
-            case LdapResultEnum.PROTOCOL_ERROR:
-            case LdapResultEnum.TIME_LIMIT_EXCEEDED:
-            case LdapResultEnum.SIZE_LIMIT_EXCEEDED:
-            case LdapResultEnum.COMPARE_FALSE:
-            case LdapResultEnum.COMPARE_TRUE:
-            case LdapResultEnum.AUTH_METHOD_NOT_SUPPORTED:
-            case LdapResultEnum.STRONG_AUTH_REQUIRED:
-            case LdapResultEnum.REFERRAL:
-            case LdapResultEnum.ADMIN_LIMIT_EXCEEDED:
-            case LdapResultEnum.UNAVAILABLE_CRITICAL_EXTENSION:
-            case LdapResultEnum.CONFIDENTIALITY_REQUIRED:
-            case LdapResultEnum.SASL_BIND_IN_PROGRESS:
-            case LdapResultEnum.NO_SUCH_ATTRIBUTE:
-            case LdapResultEnum.UNDEFINED_ATTRIBUTE_TYPE:
-            case LdapResultEnum.INAPPROPRIATE_MATCHING:
-            case LdapResultEnum.CONSTRAINT_VIOLATION:
-            case LdapResultEnum.ATTRIBUTE_OR_VALUE_EXISTS:
-            case LdapResultEnum.INVALID_ATTRIBUTE_SYNTAX:
-            case LdapResultEnum.NO_SUCH_OBJECT:
-            case LdapResultEnum.ALIAS_PROBLEM:
-            case LdapResultEnum.INVALID_DN_SYNTAX:
-            case LdapResultEnum.ALIAS_DEREFERENCING_PROBLEM:
-            case LdapResultEnum.INAPPROPRIATE_AUTHENTICATION:
-            case LdapResultEnum.INVALID_CREDENTIALS:
-            case LdapResultEnum.INSUFFICIENT_ACCESS_RIGHTS:
-            case LdapResultEnum.BUSY:
-            case LdapResultEnum.UNAVAILABLE:
-            case LdapResultEnum.UNWILLING_TO_PERFORM:
-            case LdapResultEnum.LOOP_DETECT:
-            case LdapResultEnum.NAMING_VIOLATION:
-            case LdapResultEnum.OBJECT_CLASS_VIOLATION:
-            case LdapResultEnum.NOT_ALLOWED_ON_NON_LEAF:
-            case LdapResultEnum.NOT_ALLOWED_ON_RDN:
-            case LdapResultEnum.ENTRY_ALREADY_EXISTS:
-            case LdapResultEnum.AFFECTS_MULTIPLE_DSAS:
+            case SUCCESS:
+            case OPERATIONS_ERROR:
+            case PROTOCOL_ERROR:
+            case TIME_LIMIT_EXCEEDED:
+            case SIZE_LIMIT_EXCEEDED:
+            case COMPARE_FALSE:
+            case COMPARE_TRUE:
+            case AUTH_METHOD_NOT_SUPPORTED:
+            case STRONG_AUTH_REQUIRED:
+            case REFERRAL:
+            case ADMIN_LIMIT_EXCEEDED:
+            case UNAVAILABLE_CRITICAL_EXTENSION:
+            case CONFIDENTIALITY_REQUIRED:
+            case SASL_BIND_IN_PROGRESS:
+            case NO_SUCH_ATTRIBUTE:
+            case UNDEFINED_ATTRIBUTE_TYPE:
+            case INAPPROPRIATE_MATCHING:
+            case CONSTRAINT_VIOLATION:
+            case ATTRIBUTE_OR_VALUE_EXISTS:
+            case INVALID_ATTRIBUTE_SYNTAX:
+            case NO_SUCH_OBJECT:
+            case ALIAS_PROBLEM:
+            case INVALID_DN_SYNTAX:
+            case ALIAS_DEREFERENCING_PROBLEM:
+            case INAPPROPRIATE_AUTHENTICATION:
+            case INVALID_CREDENTIALS:
+            case INSUFFICIENT_ACCESS_RIGHTS:
+            case BUSY:
+            case UNAVAILABLE:
+            case UNWILLING_TO_PERFORM:
+            case LOOP_DETECT:
+            case NAMING_VIOLATION:
+            case OBJECT_CLASS_VIOLATION:
+            case NOT_ALLOWED_ON_NON_LEAF:
+            case NOT_ALLOWED_ON_RDN:
+            case ENTRY_ALREADY_EXISTS:
+            case AFFECTS_MULTIPLE_DSAS:
                 ldapResult.setResultCode( resultCode );
                 break;
 
             default:
                 log.warn( "The resultCode " + resultCode + " is unknown." );
-                ldapResult.setResultCode( LdapResultEnum.OTHER );
+                ldapResult.setResultCode( ResultCodeEnum.OTHER );
         }
 
         if ( IS_DEBUG )
         {
-            log.debug( "The result code is set to " + LdapResultEnum.errorCode( resultCode ) );
+            log.debug( "The result code is set to " + resultCode );
         }
     }
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAttributeInUseException.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAttributeInUseException.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAttributeInUseException.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAttributeInUseException.java Mon Nov 13 12:16:16 2006
@@ -63,6 +63,6 @@
      */
     public ResultCodeEnum getResultCode()
     {
-        return ResultCodeEnum.ATTRIBUTEORVALUEEXISTS;
+        return ResultCodeEnum.ATTRIBUTE_OR_VALUE_EXISTS;
     }
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationException.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationException.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationException.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationException.java Mon Nov 13 12:16:16 2006
@@ -59,6 +59,6 @@
      */
     public ResultCodeEnum getResultCode()
     {
-        return ResultCodeEnum.INVALIDCREDENTIALS;
+        return ResultCodeEnum.INVALID_CREDENTIALS;
     }
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationNotSupportedException.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationNotSupportedException.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationNotSupportedException.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapAuthenticationNotSupportedException.java Mon Nov 13 12:16:16 2006
@@ -113,17 +113,20 @@
      */
     private void checkResultCode()
     {
-        switch ( resultCode.getValue() )
+        switch ( resultCode )
         {
-            case ( ResultCodeEnum.INAPPROPRIATEAUTHENTICATION_VAL  ):
+            case INAPPROPRIATE_AUTHENTICATION :
                 break;
-            case ( ResultCodeEnum.CONFIDENTIALITYREQUIRED_VAL  ):
+                
+            case CONFIDENTIALITY_REQUIRED :
                 break;
-            case ( ResultCodeEnum.AUTHMETHODNOTSUPPORTED_VAL  ):
+                
+            case AUTH_METHOD_NOT_SUPPORTED :
                 break;
+                
             default:
                 throw new IllegalArgumentException( "Unexceptable result code " + "for this exception type: "
-                    + resultCode.getName() );
+                    + resultCode );
         }
     }
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapContextNotEmptyException.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapContextNotEmptyException.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapContextNotEmptyException.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapContextNotEmptyException.java Mon Nov 13 12:16:16 2006
@@ -55,6 +55,6 @@
      */
     public ResultCodeEnum getResultCode()
     {
-        return ResultCodeEnum.NOTALLOWEDONNONLEAF;
+        return ResultCodeEnum.NOT_ALLOWED_ON_NON_LEAF;
     }
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeIdentifierException.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeIdentifierException.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeIdentifierException.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeIdentifierException.java Mon Nov 13 12:16:16 2006
@@ -64,6 +64,6 @@
      */
     public ResultCodeEnum getResultCode()
     {
-        return ResultCodeEnum.UNDEFINEDATTRIBUTETYPE;
+        return ResultCodeEnum.UNDEFINED_ATTRIBUTE_TYPE;
     }
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeValueException.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeValueException.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeValueException.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapInvalidAttributeValueException.java Mon Nov 13 12:16:16 2006
@@ -51,21 +51,23 @@
      * @throws IllegalArgumentException
      *             if the resultCode argument is not
      *             ResultCodeEnum.CONSTRAINTVIOLATION, or
-     *             ResultCodeEnum.INVALIDATTRIBUTESYNTAX
+     *             ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX
      */
     public LdapInvalidAttributeValueException(ResultCodeEnum resultCode)
     {
         super();
 
-        switch ( resultCode.getValue() )
+        switch ( resultCode )
         {
-            case ( ResultCodeEnum.CONSTRAINTVIOLATION_VAL  ):
+            case CONSTRAINT_VIOLATION :
                 break;
-            case ( ResultCodeEnum.INVALIDATTRIBUTESYNTAX_VAL  ):
+                
+            case INVALID_ATTRIBUTE_SYNTAX :
                 break;
+                
             default:
 
-                throw new IllegalArgumentException( resultCode.getName() + " is not an acceptable result code." );
+                throw new IllegalArgumentException( resultCode + " is not an acceptable result code." );
         }
 
         this.resultCode = resultCode;

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNameAlreadyBoundException.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNameAlreadyBoundException.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNameAlreadyBoundException.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNameAlreadyBoundException.java Mon Nov 13 12:16:16 2006
@@ -61,6 +61,6 @@
      */
     public ResultCodeEnum getResultCode()
     {
-        return ResultCodeEnum.ENTRYALREADYEXISTS;
+        return ResultCodeEnum.ENTRY_ALREADY_EXISTS;
     }
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNameNotFoundException.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNameNotFoundException.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNameNotFoundException.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNameNotFoundException.java Mon Nov 13 12:16:16 2006
@@ -60,6 +60,6 @@
      */
     public ResultCodeEnum getResultCode()
     {
-        return ResultCodeEnum.NOSUCHOBJECT;
+        return ResultCodeEnum.NO_SUCH_OBJECT;
     }
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNoPermissionException.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNoPermissionException.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNoPermissionException.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNoPermissionException.java Mon Nov 13 12:16:16 2006
@@ -62,12 +62,12 @@
 
 
     /**
-     * Always returns {@link ResultCodeEnum#INSUFFICIENTACCESSRIGHTS}
+     * Always returns {@link ResultCodeEnum#INSUFFICIENT_ACCESS_RIGHTS}
      * 
      * @see LdapException#getResultCode()
      */
     public ResultCodeEnum getResultCode()
     {
-        return ResultCodeEnum.INSUFFICIENTACCESSRIGHTS;
+        return ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS;
     }
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNoSuchAttributeException.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNoSuchAttributeException.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNoSuchAttributeException.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapNoSuchAttributeException.java Mon Nov 13 12:16:16 2006
@@ -63,6 +63,6 @@
      */
     public ResultCodeEnum getResultCode()
     {
-        return ResultCodeEnum.NOSUCHATTRIBUTE;
+        return ResultCodeEnum.NO_SUCH_ATTRIBUTE;
     }
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSchemaViolationException.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSchemaViolationException.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSchemaViolationException.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSchemaViolationException.java Mon Nov 13 12:16:16 2006
@@ -58,23 +58,23 @@
     {
         super();
 
-        switch ( resultCode.getValue() )
+        switch ( resultCode )
         {
-            case ( ResultCodeEnum.OBJECTCLASSVIOLATION_VAL  ):
+            case OBJECT_CLASS_VIOLATION :
 
                 break;
 
-            case ( ResultCodeEnum.NOTALLOWEDONRDN_VAL  ):
+            case NOT_ALLOWED_ON_RDN :
 
                 break;
 
-            case ( ResultCodeEnum.OBJECTCLASSMODSPROHIBITED_VAL  ):
+            case OBJECT_CLASS_MODS_PROHIBITED :
 
                 break;
 
             default:
 
-                throw new IllegalArgumentException( resultCode.getName() + " is not an acceptable result code." );
+                throw new IllegalArgumentException( resultCode + " is not an acceptable result code." );
         }
 
         this.resultCode = resultCode;

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSizeLimitExceededException.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSizeLimitExceededException.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSizeLimitExceededException.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapSizeLimitExceededException.java Mon Nov 13 12:16:16 2006
@@ -67,6 +67,6 @@
      */
     public ResultCodeEnum getResultCode()
     {
-        return ResultCodeEnum.SIZELIMITEXCEEDED;
+        return ResultCodeEnum.SIZE_LIMIT_EXCEEDED;
     }
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapTimeLimitExceededException.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapTimeLimitExceededException.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapTimeLimitExceededException.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/exception/LdapTimeLimitExceededException.java Mon Nov 13 12:16:16 2006
@@ -67,6 +67,6 @@
      */
     public ResultCodeEnum getResultCode()
     {
-        return ResultCodeEnum.TIMELIMITEXCEEDED;
+        return ResultCodeEnum.TIME_LIMIT_EXCEEDED;
     }
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequest.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequest.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbandonRequest.java Mon Nov 13 12:16:16 2006
@@ -30,7 +30,7 @@
 public interface AbandonRequest extends Request
 {
     /** Ldap abandon request type code */
-    MessageTypeEnum TYPE = MessageTypeEnum.ABANDONREQUEST;
+    MessageTypeEnum TYPE = MessageTypeEnum.ABANDON_REQUEST;
 
 
     /**

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequest.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequest.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequest.java Mon Nov 13 12:16:16 2006
@@ -35,7 +35,7 @@
 public interface AddRequest extends SingleReplyRequest, AbandonableRequest
 {
     /** LDAPv3 add request type enum code */
-    MessageTypeEnum TYPE = MessageTypeEnum.ADDREQUEST;
+    MessageTypeEnum TYPE = MessageTypeEnum.ADD_REQUEST;
 
     /** LDAPv3 add response type enum code */
     MessageTypeEnum RESP_TYPE = AddResponse.TYPE;

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddResponse.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddResponse.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddResponse.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddResponse.java Mon Nov 13 12:16:16 2006
@@ -31,5 +31,5 @@
 public interface AddResponse extends ResultResponse
 {
     /** Add response message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.ADDRESPONSE;
+    MessageTypeEnum TYPE = MessageTypeEnum.ADD_RESPONSE;
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequest.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequest.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequest.java Mon Nov 13 12:16:16 2006
@@ -32,7 +32,7 @@
 public interface BindRequest extends SingleReplyRequest
 {
     /** Bind request message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.BINDREQUEST;
+    MessageTypeEnum TYPE = MessageTypeEnum.BIND_REQUEST;
 
     /** Bind response message type enumeration value */
     MessageTypeEnum RESP_TYPE = BindResponse.TYPE;

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindResponse.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindResponse.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindResponse.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindResponse.java Mon Nov 13 12:16:16 2006
@@ -31,7 +31,7 @@
 public interface BindResponse extends ResultResponse
 {
     /** Bind response message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.BINDRESPONSE;
+    MessageTypeEnum TYPE = MessageTypeEnum.BIND_RESPONSE;
 
 
     /**

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequest.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequest.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequest.java Mon Nov 13 12:16:16 2006
@@ -32,7 +32,7 @@
 public interface CompareRequest extends SingleReplyRequest, AbandonableRequest
 {
     /** Compare request message type enum code */
-    MessageTypeEnum TYPE = MessageTypeEnum.COMPAREREQUEST;
+    MessageTypeEnum TYPE = MessageTypeEnum.COMPARE_REQUEST;
 
     /** Compare response message type enum code */
     MessageTypeEnum RESP_TYPE = CompareResponse.TYPE;

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareResponse.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareResponse.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareResponse.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareResponse.java Mon Nov 13 12:16:16 2006
@@ -30,5 +30,5 @@
 public interface CompareResponse extends ResultResponse
 {
     /** Compare response message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.COMPARERESPONSE;
+    MessageTypeEnum TYPE = MessageTypeEnum.COMPARE_RESPONSE;
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequest.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequest.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequest.java Mon Nov 13 12:16:16 2006
@@ -32,7 +32,7 @@
 public interface DeleteRequest extends SingleReplyRequest, AbandonableRequest
 {
     /** Delete request message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.DELREQUEST;
+    MessageTypeEnum TYPE = MessageTypeEnum.DEL_REQUEST;
 
     /** Delete response message type enumeration value */
     MessageTypeEnum RESP_TYPE = DeleteResponse.TYPE;

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteResponse.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteResponse.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteResponse.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteResponse.java Mon Nov 13 12:16:16 2006
@@ -30,5 +30,5 @@
 public interface DeleteResponse extends ResultResponse
 {
     /** Delete response message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.DELRESPONSE;
+    MessageTypeEnum TYPE = MessageTypeEnum.DEL_RESPONSE;
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DerefAliasesEnum.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DerefAliasesEnum.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DerefAliasesEnum.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/DerefAliasesEnum.java Mon Nov 13 12:16:16 2006
@@ -22,8 +22,6 @@
 
 import java.util.Map;
 
-import org.apache.directory.shared.ldap.util.ValuedEnum;
-
 
 /**
  * Type-safe derefAliases search parameter enumeration which determines the mode
@@ -33,12 +31,23 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Revision$
  */
-public class DerefAliasesEnum extends ValuedEnum
+public enum DerefAliasesEnum
 {
-    static final long serialVersionUID = 1501231261415745531L;
+    /** Alias handling mode value that treats aliases like entries */
+    NEVER_DEREF_ALIASES,
+
+    /** Alias handling mode value that dereferences only when searching */
+    DEREF_IN_SEARCHING,
+
+    /** Alias handling mode value that dereferences only in finding the base */
+    DEREF_FINDING_BASE_OBJ,
+
+    /** Alias handling mode value that dereferences always */
+    DEREF_ALWAYS;
+
 
     /** java.naming.ldap.derefAliases JNDI property */
-    public static final String JNDI_PROP = "java.naming.ldap.derefAliases";
+    public static final String JNDI_DEREF_ALIAS_PROP = "java.naming.ldap.derefAliases";
 
     /** Alias handling mode name that treats aliases like entries */
     public static final String NEVERDEREFALIASES_NAME = "never";
@@ -52,151 +61,14 @@
     /** Alias handling mode name that dereferences always */
     public static final String DEREFALWAYS_NAME = "always";
 
-    /** Alias handling mode value that treats aliases like entries */
-    public static final int NEVERDEREFALIASES_VAL = 0;
-
-    /** Alias handling mode value that dereferences only when searching */
-    public static final int DEREFINSEARCHING_VAL = 1;
-
-    /** Alias handling mode value that dereferences only in finding the base */
-    public static final int DEREFFINDINGBASEOBJ_VAL = 2;
-
-    /** Alias handling mode value that dereferences always */
-    public static final int DEREFALWAYS_VAL = 3;
-
-    /** Alias handling mode that treats aliases like entries */
-    public static final DerefAliasesEnum NEVERDEREFALIASES = new DerefAliasesEnum( NEVERDEREFALIASES_NAME,
-        NEVERDEREFALIASES_VAL );
-
-    /** Alias handling mode that dereferences only when searching */
-    public static final DerefAliasesEnum DEREFINSEARCHING = new DerefAliasesEnum( DEREFINSEARCHING_NAME,
-        DEREFINSEARCHING_VAL );
-
-    /** Alias handling mode that dereferences only in finding the base */
-    public static final DerefAliasesEnum DEREFFINDINGBASEOBJ = new DerefAliasesEnum( DEREFFINDINGBASEOBJ_NAME,
-        DEREFFINDINGBASEOBJ_VAL );
-
-    /** Alias handling mode that dereferences always */
-    public static final DerefAliasesEnum DEREFALWAYS = new DerefAliasesEnum( DEREFALWAYS_NAME, DEREFALWAYS_VAL );
-
-
     /**
      * Private construct so no other instances can be created other than the
      * public static constants in this class.
-     * 
-     * @param a_name
-     *            a string name for the enumeration value.
-     * @param a_value
-     *            the integer value of the enumeration.
-     */
-    private DerefAliasesEnum(final String a_name, final int a_value)
-    {
-        super( a_name, a_value );
-    }
-
-
-    /**
-     * Checks to see if we dereference while searching and finding the base.
-     * 
-     * @return true if value is DEREFALWAYS_VAL, false otherwise
-     */
-    public boolean derefAlways()
-    {
-        return getValue() == DEREFALWAYS_VAL;
-    }
-
-
-    /**
-     * Checks to see if we never dereference aliases.
-     * 
-     * @return true if value is NEVERDEREFALIASES_VAL, false otherwise
      */
-    public boolean neverDeref()
+    private DerefAliasesEnum()
     {
-        return getValue() == NEVERDEREFALIASES_VAL;
     }
 
-
-    /**
-     * Checks to see if we dereference while searching.
-     * 
-     * @return true if value is DEREFALWAYS_VAL, or DEREFINSEARCHING_VAL, and
-     *         false otherwise.
-     */
-    public boolean derefInSearching()
-    {
-        switch ( getValue() )
-        {
-            case ( DEREFALWAYS_VAL ):
-                return true;
-            case ( DEREFFINDINGBASEOBJ_VAL ):
-                return false;
-            case ( DEREFINSEARCHING_VAL ):
-                return true;
-            case ( NEVERDEREFALIASES_VAL ):
-                return false;
-            default:
-                throw new IllegalArgumentException( "Class has bug: check for valid enumeration values" );
-        }
-    }
-
-
-    /**
-     * Checks to see if we dereference while finding the base.
-     * 
-     * @return true if value is DEREFALWAYS_VAL, or DEREFFINDINGBASEOBJ_VAL, and
-     *         false otherwise.
-     */
-    public boolean derefFindingBase()
-    {
-        switch ( getValue() )
-        {
-            case ( DEREFALWAYS_VAL ):
-                return true;
-            case ( DEREFFINDINGBASEOBJ_VAL ):
-                return true;
-            case ( DEREFINSEARCHING_VAL ):
-                return false;
-            case ( NEVERDEREFALIASES_VAL ):
-                return false;
-            default:
-                throw new IllegalArgumentException( "Class has bug: check for valid enumeration values" );
-        }
-    }
-
-
-    /**
-     * Gets the enumeration for a enumeration name which also happens to be the
-     * value of the java.naming.ldap.derefAliases LDAP proovider property.
-     * 
-     * @param a_name
-     *            the value for the java.naming.ldap.derefAliases or a name of
-     *            an enum value.
-     * @return the enumeration for a name
-     */
-    public static DerefAliasesEnum getEnum( String a_name )
-    {
-        if ( null == a_name || a_name.equalsIgnoreCase( DEREFALWAYS_NAME ) )
-        {
-            return DEREFALWAYS;
-        }
-        else if ( a_name.equalsIgnoreCase( DEREFFINDINGBASEOBJ_NAME ) )
-        {
-            return DEREFFINDINGBASEOBJ;
-        }
-        else if ( a_name.equalsIgnoreCase( DEREFINSEARCHING_NAME ) )
-        {
-            return DEREFINSEARCHING;
-        }
-        else if ( a_name.equalsIgnoreCase( NEVERDEREFALIASES_NAME ) )
-        {
-            return NEVERDEREFALIASES;
-        }
-
-        throw new IllegalArgumentException( "Unrecognized JNDI environment property " + JNDI_PROP + " value: " + a_name );
-    }
-
-
     /**
      * Gets the enumeration from by extracting the value for the JNDI LDAP
      * specific environment property, java.naming.ldap.derefAliases, from the
@@ -209,6 +81,6 @@
      */
     public static DerefAliasesEnum getEnum( Map env )
     {
-        return getEnum( ( String ) env.get( JNDI_PROP ) );
+        return DerefAliasesEnum.valueOf( ( String ) env.get( JNDI_DEREF_ALIAS_PROP) );
     }
 }

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequest.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequest.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequest.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequest.java Mon Nov 13 12:16:16 2006
@@ -56,7 +56,7 @@
 public interface ExtendedRequest extends SingleReplyRequest, javax.naming.ldap.ExtendedRequest
 {
     /** Extended request message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.EXTENDEDREQ;
+    MessageTypeEnum TYPE = MessageTypeEnum.EXTENDED_REQ;
 
     /** Extended response message type enumeration value */
     MessageTypeEnum RESP_TYPE = ExtendedResponse.TYPE;

Modified: directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponse.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponse.java?view=diff&rev=474487&r1=474486&r2=474487
==============================================================================
--- directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponse.java (original)
+++ directory/branches/apacheds-schema/shared/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedResponse.java Mon Nov 13 12:16:16 2006
@@ -30,7 +30,7 @@
 public interface ExtendedResponse extends ResultResponse, javax.naming.ldap.ExtendedResponse
 {
     /** Extended response message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.EXTENDEDRESP;
+    MessageTypeEnum TYPE = MessageTypeEnum.EXTENDED_RESP;
 
 
     /**



Mime
View raw message