directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r477302 - in /directory/trunks/apacheds/core/src: main/java/org/apache/directory/server/core/ main/java/org/apache/directory/server/core/authz/ main/java/org/apache/directory/server/core/exception/ main/java/org/apache/directory/server/core...
Date Mon, 20 Nov 2006 19:30:21 GMT
Author: elecharny
Date: Mon Nov 20 11:30:20 2006
New Revision: 477302

URL: http://svn.apache.org/viewvc?view=rev&rev=477302
Log:
Changed the ResultCodeEnum to become an enum instead of an subclass
of ValuedEnum (Java 5 migration)

Modified:
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
    directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
    directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
    directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?view=diff&rev=477302&r1=477301&r2=477302
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
Mon Nov 20 11:30:20 2006
@@ -405,7 +405,7 @@
              * complain because SASL is not a supported auth method yet
              */
             throw new LdapAuthenticationNotSupportedException( "Unknown authentication type:
'" + authentication + "'",
-                ResultCodeEnum.AUTHMETHODNOTSUPPORTED );
+                ResultCodeEnum.AUTH_METHOD_NOT_SUPPORTED );
         }
     }
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java?view=diff&rev=477302&r1=477301&r2=477302
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/authz/AuthorizationService.java
Mon Nov 20 11:30:20 2006
@@ -274,7 +274,7 @@
             {
                 String msg = "failed to parse entryACI: " + aciString;
                 log.error( msg, e );
-                throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONSERROR );
+                throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONS_ERROR );
             }
 
             tuples.addAll( item.toTuples() );
@@ -326,7 +326,7 @@
             {
                 String msg = "failed to parse subentryACI: " + aciString;
                 log.error( msg, e );
-                throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONSERROR );
+                throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONS_ERROR );
             }
 
             tuples.addAll( item.toTuples() );

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?view=diff&rev=477302&r1=477301&r2=477302
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
Mon Nov 20 11:30:20 2006
@@ -151,7 +151,7 @@
             // should not be necessary because of schema interceptor but schema checking
             // can be turned off and in this case we must protect against being able to
             // add access control information to anything other than an AC subentry
-            throw new LdapSchemaViolationException( "", ResultCodeEnum.OBJECTCLASSVIOLATION
);
+            throw new LdapSchemaViolationException( "", ResultCodeEnum.OBJECT_CLASS_VIOLATION
);
         }
         else if ( aci == null )
         {

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java?view=diff&rev=477302&r1=477301&r2=477302
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/exception/ExceptionService.java
Mon Nov 20 11:30:20 2006
@@ -120,7 +120,7 @@
         if ( objectClass.contains( "alias" ) )
         {
             String msg = "Attempt to add entry to alias '" + normName.getUpName() + "' not
allowed.";
-            ResultCodeEnum rc = ResultCodeEnum.ALIASPROBLEM;
+            ResultCodeEnum rc = ResultCodeEnum.ALIAS_PROBLEM;
             NamingException e = new LdapNamingException( msg, rc );
             e.setResolvedName( new LdapDN( parentDn.getUpName() ) );
             throw e;

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?view=diff&rev=477302&r1=477301&r2=477302
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java
Mon Nov 20 11:30:20 2006
@@ -829,7 +829,7 @@
         if ( objectClass == null )
         {
             String msg = "Entry " + normName.getUpName() + " contains no objectClass attribute:
" + entry;
-            throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECTCLASSVIOLATION
);
+            throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECT_CLASS_VIOLATION
);
         }
 
         // Start adding the system indices
@@ -1689,7 +1689,7 @@
         throw new LdapAuthenticationNotSupportedException(
             "Bind requests only tunnel down into partitions if there are no authenticators
to handle the mechanism.\n"
                 + "Check to see if you have correctly configured authenticators for the server.",
-            ResultCodeEnum.AUTHMETHODNOTSUPPORTED );
+            ResultCodeEnum.AUTH_METHOD_NOT_SUPPORTED );
     }
 
 

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java?view=diff&rev=477302&r1=477301&r2=477302
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/referral/ReferralService.java
Mon Nov 20 11:30:20 2006
@@ -441,13 +441,13 @@
             else if ( farthestDst != null )
             {
                 throw new LdapNamingException( farthestDst + " ancestor is a referral for
modifyDn on " + newName
-                    + " so it affects multiple DSAs", ResultCodeEnum.AFFECTSMULTIPLEDSAS
);
+                    + " so it affects multiple DSAs", ResultCodeEnum.AFFECTS_MULTIPLE_DSAS
);
             }
             else if ( lut.isReferral( newName ) )
             {
                 throw new LdapNamingException( newName
                     + " exists and is a referral for modifyDn destination so it affects multiple
DSAs",
-                    ResultCodeEnum.AFFECTSMULTIPLEDSAS );
+                    ResultCodeEnum.AFFECTS_MULTIPLE_DSAS );
             }
 
             throw new IllegalStateException( "If you get this exception the server's logic
was flawed in handling a "
@@ -508,13 +508,13 @@
             else if ( farthestDst != null )
             {
                 throw new LdapNamingException( farthestDst + " ancestor is a referral for
modifyDn on " + newName
-                    + " so it affects multiple DSAs", ResultCodeEnum.AFFECTSMULTIPLEDSAS
);
+                    + " so it affects multiple DSAs", ResultCodeEnum.AFFECTS_MULTIPLE_DSAS
);
             }
             else if ( lut.isReferral( newName ) )
             {
                 throw new LdapNamingException( newName
                     + " exists and is a referral for modifyDn destination so it affects multiple
DSAs",
-                    ResultCodeEnum.AFFECTSMULTIPLEDSAS );
+                    ResultCodeEnum.AFFECTS_MULTIPLE_DSAS );
             }
 
             throw new IllegalStateException( "If you get this exception the server's logic
was flawed in handling a "
@@ -579,13 +579,13 @@
             else if ( farthestDst != null )
             {
                 throw new LdapNamingException( farthestDst + " ancestor is a referral for
modifyDn on " + newName
-                    + " so it affects multiple DSAs", ResultCodeEnum.AFFECTSMULTIPLEDSAS
);
+                    + " so it affects multiple DSAs", ResultCodeEnum.AFFECTS_MULTIPLE_DSAS
);
             }
             else if ( lut.isReferral( newName ) )
             {
                 throw new LdapNamingException( newName
                     + " exists and is a referral for modifyDn destination so it affects multiple
DSAs",
-                    ResultCodeEnum.AFFECTSMULTIPLEDSAS );
+                    ResultCodeEnum.AFFECTS_MULTIPLE_DSAS );
             }
 
             throw new IllegalStateException( "If you get this exception the server's logic
was flawed in handling a "

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java?view=diff&rev=477302&r1=477301&r2=477302
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
Mon Nov 20 11:30:20 2006
@@ -87,7 +87,7 @@
             {
                 log.info( msg + ".  Raising LdapSchemaViolationException." );
             }
-            throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECTCLASSMODSPROHIBITED
);
+            throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
         }
 
         // check that there is at least one structural objectClass in the replacement set
@@ -107,7 +107,7 @@
         {
             log.info( msg + ".  Raising LdapSchemaViolationException." );
         }
-        throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECTCLASSMODSPROHIBITED
);
+        throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
     }
 
 
@@ -147,7 +147,7 @@
             {
                 log.info( msg + ".  Raising LdapSchemaViolationException." );
             }
-            throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECTCLASSMODSPROHIBITED
);
+            throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
         }
 
         // check that there is at least one structural objectClass in the replacement set
@@ -167,7 +167,7 @@
         {
             log.info( msg + ".  Raising LdapSchemaViolationException." );
         }
-        throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECTCLASSMODSPROHIBITED
);
+        throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
     }
 
 
@@ -218,7 +218,7 @@
             {
                 log.info( msg + ".  Raising LdapSchemaViolationException." );
             }
-            throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECTCLASSMODSPROHIBITED
);
+            throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
         }
 
         // remove all the objectClass attribute values from a cloned copy and then
@@ -248,7 +248,7 @@
         {
             log.info( msg + ".  Raising LdapSchemaViolationException." );
         }
-        throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECTCLASSMODSPROHIBITED
);
+        throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
     }
 
 
@@ -300,7 +300,7 @@
             {
                 log.info( msg + ".  Raising LdapSchemaViolationException." );
             }
-            throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECTCLASSMODSPROHIBITED
);
+            throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
         }
 
         // remove all the objectClass attribute values from a cloned copy and then
@@ -330,7 +330,7 @@
         {
             log.info( msg + ".  Raising LdapSchemaViolationException." );
         }
-        throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECTCLASSMODSPROHIBITED
);
+        throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
     }
 
 
@@ -381,7 +381,7 @@
             {
                 log.info( msg + ". SchemaChecker is throwing a schema violation exception."
);
             }
-            throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOTALLOWEDONRDN );
+            throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN
);
         }
 
         // from here on the modify operation replaces specific values
@@ -401,7 +401,7 @@
                 {
                     log.info( msg + ". SchemaChecker is throwing a schema violation exception."
);
                 }
-                throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOTALLOWEDONRDN
);
+                throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN
);
             }
         }
     }
@@ -454,7 +454,7 @@
                     {
                         log.info( msg + ". SchemaChecker is throwing a schema violation exception."
);
                     }
-                    throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOTALLOWEDONRDN
);
+                    throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN
);
                 }
 
                 // from here on the modify operation replaces specific values
@@ -475,7 +475,7 @@
                         {
                             log.info( msg + ". SchemaChecker is throwing a schema violation
exception." );
                         }
-                        throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOTALLOWEDONRDN
);
+                        throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN
);
                     }
                 }
             }
@@ -530,7 +530,7 @@
             {
                 log.info( msg + ". SchemaChecker is throwing a schema violation exception."
);
             }
-            throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOTALLOWEDONRDN );
+            throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN
);
         }
 
         // from here on the modify operation only deletes specific values
@@ -548,7 +548,7 @@
                 {
                     log.info( msg + ". SchemaChecker is throwing a schema violation exception."
);
                 }
-                throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOTALLOWEDONRDN
);
+                throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN
);
             }
         }
     }
@@ -601,7 +601,7 @@
                     {
                         log.info( msg + ". SchemaChecker is throwing a schema violation exception."
);
                     }
-                    throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOTALLOWEDONRDN
);
+                    throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN
);
                 }
 
                 // from here on the modify operation only deletes specific values
@@ -620,7 +620,7 @@
                         {
                             log.info( msg + ". SchemaChecker is throwing a schema violation
exception." );
                         }
-                        throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOTALLOWEDONRDN
);
+                        throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN
);
                     }
                 }
             }

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java?view=diff&rev=477302&r1=477301&r2=477302
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/schema/SchemaService.java
Mon Nov 20 11:30:20 2006
@@ -591,7 +591,7 @@
         if ( !objectClassAttr.getID().equalsIgnoreCase( "objectClass" ) )
         {
             throw new LdapNamingException( "Expecting an objectClass attribute but got "
+ objectClassAttr.getID(),
-                ResultCodeEnum.OPERATIONSERROR );
+                ResultCodeEnum.OPERATIONS_ERROR );
         }
 
         Set objectClasses = new HashSet();
@@ -686,7 +686,7 @@
                 {
                     // not ok for add but ok for replace and delete
                     throw new LdapInvalidAttributeValueException( "No value is not a valid
value for an attribute.", 
-                        ResultCodeEnum.INVALIDATTRIBUTESYNTAX );
+                        ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
                 }
             }
 
@@ -700,7 +700,7 @@
             if ( modOp == DirContext.REMOVE_ATTRIBUTE && isRequired( change.getID(),
objectClass )
                 && isCompleteRemoval( change, entry ) )
             {
-                throw new LdapSchemaViolationException( ResultCodeEnum.OBJECTCLASSVIOLATION
);
+                throw new LdapSchemaViolationException( ResultCodeEnum.OBJECT_CLASS_VIOLATION
);
             }
         }
 
@@ -814,7 +814,7 @@
                 if ( mods[ii].getModificationOp() == DirContext.ADD_ATTRIBUTE )
                 {
                     throw new LdapInvalidAttributeValueException( "No value is not a valid
value for an attribute.", 
-                        ResultCodeEnum.INVALIDATTRIBUTESYNTAX );
+                        ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
                 }
             }
 
@@ -916,7 +916,7 @@
                     if ( isRequired( change.getID(), objectClass ) && isCompleteRemoval(
change, entry ) )
                     {
                         log.error( "Trying to remove a required attribute" );
-                        throw new LdapSchemaViolationException( ResultCodeEnum.OBJECTCLASSVIOLATION
);
+                        throw new LdapSchemaViolationException( ResultCodeEnum.OBJECT_CLASS_VIOLATION
);
                     }
                     
                     tmpEntry.remove( change.getID() );
@@ -1170,7 +1170,7 @@
         if ( attribute.size() > 1 && registry.lookup( attribute.getID() ).isSingleValue()
)
         {                
             throw new LdapInvalidAttributeValueException( "More than one value has been provided
" +
-                "for the single-valued attribute: " + attribute.getID(), ResultCodeEnum.CONSTRAINTVIOLATION
);
+                "for the single-valued attribute: " + attribute.getID(), ResultCodeEnum.CONSTRAINT_VIOLATION
);
         }
     }
 
@@ -1199,7 +1199,7 @@
             {
                 throw new LdapSchemaViolationException( "Required attribute " + 
                     required[ii].getName() + " not found within entry.", 
-                    ResultCodeEnum.OBJECTCLASSVIOLATION );
+                    ResultCodeEnum.OBJECT_CLASS_VIOLATION );
             }
         }
     }

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java?view=diff&rev=477302&r1=477301&r2=477302
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/subtree/SubentryService.java
Mon Nov 20 11:30:20 2006
@@ -180,7 +180,7 @@
         if ( oc == null )
         {
             throw new LdapSchemaViolationException( "A subentry must have an objectClass
attribute", 
-                ResultCodeEnum.OBJECTCLASSVIOLATION );
+                ResultCodeEnum.OBJECT_CLASS_VIOLATION );
         }
         
         if ( oc.contains( "accessControlSubentry" ) )
@@ -411,7 +411,7 @@
             {
                 String msg = "Failed while parsing subtreeSpecification for " + normName.getUpName();
                 log.warn( msg );
-                throw new LdapInvalidAttributeValueException( msg, ResultCodeEnum.INVALIDATTRIBUTESYNTAX
);
+                throw new LdapInvalidAttributeValueException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX
);
             }
             subentryCache.setSubentry( normName.toString(), ss, getSubentryTypes( entry )
);
             next.add(normName, entry );
@@ -718,7 +718,7 @@
             {
                 String msg = "Will not allow rename operation on entries with administrative
descendants.";
                 log.warn( msg );
-                throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOTALLOWEDONRDN
);
+                throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN
);
             }
             next.modifyRn( name, newRn, deleteOldRn );
 
@@ -791,7 +791,7 @@
             {
                 String msg = "Will not allow rename operation on entries with administrative
descendants.";
                 log.warn( msg );
-                throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOTALLOWEDONRDN
);
+                throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN
);
             }
             next.move( oriChildName, newParentName, newRn, deleteOldRn );
 
@@ -859,7 +859,7 @@
             {
                 String msg = "Will not allow rename operation on entries with administrative
descendants.";
                 log.warn( msg );
-                throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOTALLOWEDONRDN
);
+                throw new LdapSchemaViolationException( msg, ResultCodeEnum.NOT_ALLOWED_ON_RDN
);
             }
             next.move( oriChildName, newParentName );
 
@@ -971,7 +971,7 @@
             {
                 String msg = "failed to parse the new subtreeSpecification";
                 log.error( msg, e );
-                throw new LdapInvalidAttributeValueException( msg, ResultCodeEnum.INVALIDATTRIBUTESYNTAX
);
+                throw new LdapInvalidAttributeValueException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX
);
             }
 
             subentryCache.setSubentry( name.toNormName(), ssNew, getSubentryTypes( entry,
modOp, mods ) );
@@ -1056,7 +1056,7 @@
             {
                 String msg = "failed to parse the new subtreeSpecification";
                 log.error( msg, e );
-                throw new LdapInvalidAttributeValueException( msg, ResultCodeEnum.INVALIDATTRIBUTESYNTAX
);
+                throw new LdapInvalidAttributeValueException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX
);
             }
 
             subentryCache.setSubentry( name.toNormName(), ssNew, getSubentryTypes( entry,
mods ) );

Modified: directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java?view=diff&rev=477302&r1=477301&r2=477302
==============================================================================
--- directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
(original)
+++ directory/trunks/apacheds/core/src/main/java/org/apache/directory/server/core/trigger/TriggerService.java
Mon Nov 20 11:30:20 2006
@@ -173,7 +173,7 @@
             {
                 String msg = "failed to parse entryTrigger: " + triggerString;
                 log.error( msg, e );
-                throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONSERROR );
+                throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONS_ERROR );
             }
 
             triggerSpecs.add( item );

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java?view=diff&rev=477302&r1=477301&r2=477302
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
(original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaCheckerTest.java
Mon Nov 20 11:30:20 2006
@@ -147,7 +147,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECTCLASSMODSPROHIBITED );
+            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
         }
 
         // this should fail since the modify operation tries to delete all
@@ -162,7 +162,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECTCLASSMODSPROHIBITED );
+            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
         }
     }
 
@@ -210,7 +210,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECTCLASSMODSPROHIBITED );
+            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
         }
 
         // this should fail since the modify operation tries to delete all
@@ -226,7 +226,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECTCLASSMODSPROHIBITED );
+            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
         }
     }
 
@@ -254,7 +254,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( ResultCodeEnum.NOTALLOWEDONRDN, e.getResultCode() );
+            assertEquals( ResultCodeEnum.NOT_ALLOWED_ON_RDN, e.getResultCode() );
         }
 
         // test success using more than one attribute for the Rdn but not modifying rdn attribute
@@ -272,7 +272,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( ResultCodeEnum.NOTALLOWEDONRDN, e.getResultCode() );
+            assertEquals( ResultCodeEnum.NOT_ALLOWED_ON_RDN, e.getResultCode() );
         }
 
         // should succeed since the value being deleted from the rdn attribute is
@@ -291,7 +291,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( ResultCodeEnum.NOTALLOWEDONRDN, e.getResultCode() );
+            assertEquals( ResultCodeEnum.NOT_ALLOWED_ON_RDN, e.getResultCode() );
         }
     }
 
@@ -319,7 +319,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( ResultCodeEnum.NOTALLOWEDONRDN, e.getResultCode() );
+            assertEquals( ResultCodeEnum.NOT_ALLOWED_ON_RDN, e.getResultCode() );
         }
 
         // test success using more than one attribute for the Rdn but not modifying rdn attribute
@@ -337,7 +337,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( ResultCodeEnum.NOTALLOWEDONRDN, e.getResultCode() );
+            assertEquals( ResultCodeEnum.NOT_ALLOWED_ON_RDN, e.getResultCode() );
         }
 
         // should succeed since the values being replaced from the rdn attribute is
@@ -357,7 +357,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( ResultCodeEnum.NOTALLOWEDONRDN, e.getResultCode() );
+            assertEquals( ResultCodeEnum.NOT_ALLOWED_ON_RDN, e.getResultCode() );
         }
     }
 
@@ -395,7 +395,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECTCLASSMODSPROHIBITED );
+            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
         }
 
         // this should fail since the modify operation tries to delete all
@@ -408,7 +408,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECTCLASSMODSPROHIBITED );
+            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
         }
     }
 
@@ -450,7 +450,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECTCLASSMODSPROHIBITED );
+            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
         }
 
         // this should fail since the modify operation tries to delete all
@@ -464,7 +464,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECTCLASSMODSPROHIBITED );
+            assertEquals( e.getResultCode(), ResultCodeEnum.OBJECT_CLASS_MODS_PROHIBITED
);
         }
     }
 
@@ -491,7 +491,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( ResultCodeEnum.NOTALLOWEDONRDN, e.getResultCode() );
+            assertEquals( ResultCodeEnum.NOT_ALLOWED_ON_RDN, e.getResultCode() );
         }
 
         // test success using more than one attribute for the Rdn but not modifying rdn attribute
@@ -507,7 +507,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( ResultCodeEnum.NOTALLOWEDONRDN, e.getResultCode() );
+            assertEquals( ResultCodeEnum.NOT_ALLOWED_ON_RDN, e.getResultCode() );
         }
 
         // should succeed since the value being deleted from the rdn attribute is
@@ -522,7 +522,7 @@
         }
         catch ( LdapSchemaViolationException e )
         {
-            assertEquals( ResultCodeEnum.NOTALLOWEDONRDN, e.getResultCode() );
+            assertEquals( ResultCodeEnum.NOT_ALLOWED_ON_RDN, e.getResultCode() );
         }
     }
 
@@ -547,7 +547,7 @@
 //        }
 //        catch ( LdapSchemaViolationException e )
 //        {
-//            assertEquals( ResultCodeEnum.NOTALLOWEDONRDN, e.getResultCode() );
+//            assertEquals( ResultCodeEnum.NOT_ALLOWED_ON_RDN, e.getResultCode() );
 //        }
 //
 //        // test success using more than one attribute for the Rdn but not modifying rdn
attribute
@@ -562,7 +562,7 @@
 //        }
 //        catch ( LdapSchemaViolationException e )
 //        {
-//            assertEquals( ResultCodeEnum.NOTALLOWEDONRDN, e.getResultCode() );
+//            assertEquals( ResultCodeEnum.NOT_ALLOWED_ON_RDN, e.getResultCode() );
 //        }
 //
 //        // should succeed since the values being replaced from the rdn attribute is
@@ -582,7 +582,7 @@
 //        }
 //        catch ( LdapSchemaViolationException e )
 //        {
-//            assertEquals( ResultCodeEnum.NOTALLOWEDONRDN, e.getResultCode() );
+//            assertEquals( ResultCodeEnum.NOT_ALLOWED_ON_RDN, e.getResultCode() );
 //        }
 //    }
 

Modified: directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java?view=diff&rev=477302&r1=477301&r2=477302
==============================================================================
--- directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
(original)
+++ directory/trunks/apacheds/core/src/test/java/org/apache/directory/server/core/schema/SchemaServiceTest.java
Mon Nov 20 11:30:20 2006
@@ -101,7 +101,7 @@
         }
         catch ( LdapNamingException e )
         {
-            assertEquals( ResultCodeEnum.OPERATIONSERROR, e.getResultCode() );
+            assertEquals( ResultCodeEnum.OPERATIONS_ERROR, e.getResultCode() );
         }
 
         attr = new BasicAttribute( "objectClass" );



Mime
View raw message