directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r923721 [2/2] - in /directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core: event/ interceptor/context/ partition/ schema/ schema/registries/synchronizers/
Date Tue, 16 Mar 2010 13:08:56 GMT
Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java?rev=923721&r1=923720&r2=923721&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
(original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java
Tue Mar 16 13:08:55 2010
@@ -23,13 +23,12 @@ package org.apache.directory.server.core
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.MetaSchemaConstants;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
@@ -133,7 +132,7 @@ public class SyntaxSynchronizer extends 
                 String msg = I18n.err( I18n.ERR_399, entry.getDn().getName(),
                     StringTools.listToString( schemaManager.getErrors() ) );
                 LOG.info( msg );
-                throw new LdapUnwillingToPerformException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM
);
+                throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
msg );
             }
         }
         else
@@ -240,7 +239,7 @@ public class SyntaxSynchronizer extends 
                 String msg = I18n.err( I18n.ERR_400, entry.getDn().getName(), 
                     StringTools.listToString( errors ) );
                 LOG.info( msg );
-                throw new LdapUnwillingToPerformException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM
);
+                throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
msg );
             }
         }
         else
@@ -263,8 +262,8 @@ public class SyntaxSynchronizer extends 
 
         if ( dependees.size() != 0 )
         {
-            throw new LdapUnwillingToPerformException( I18n.err( I18n.ERR_401, oldOid,
-                getNames( dependees ) ), ResultCodeEnum.UNWILLING_TO_PERFORM );
+            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
I18n.err( I18n.ERR_401, oldOid,
+                    getNames( dependees ) ) );
         }
 
         ServerEntry targetEntry = ( ServerEntry ) entry.clone();
@@ -303,8 +302,8 @@ public class SyntaxSynchronizer extends 
 
         if ( dependees.size() != 0 )
         {
-            throw new LdapUnwillingToPerformException( I18n.err( I18n.ERR_401, oldOid, getNames(
dependees ) ),
-                ResultCodeEnum.UNWILLING_TO_PERFORM );
+            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
+                I18n.err( I18n.ERR_401, oldOid, getNames( dependees ) ) );
         }
 
         ServerEntry targetEntry = ( ServerEntry ) entry.clone();
@@ -379,24 +378,24 @@ public class SyntaxSynchronizer extends 
     }
 
 
-    private void checkNewParent( DN newParent ) throws NamingException
+    private void checkNewParent( DN newParent ) throws LdapException
     {
         if ( newParent.size() != 3 )
         {
-            throw new LdapInvalidDnException( I18n.err( I18n.ERR_402 ),
-                ResultCodeEnum.NAMING_VIOLATION );
+            throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION,
+                I18n.err( I18n.ERR_402 ) );
         }
 
         RDN rdn = newParent.getRdn();
         if ( !schemaManager.getAttributeTypeRegistry().getOidByName( rdn.getNormType() ).equals(
             SchemaConstants.OU_AT_OID ) )
         {
-            throw new LdapInvalidDnException( I18n.err( I18n.ERR_403 ), ResultCodeEnum.NAMING_VIOLATION
);
+            throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err(
I18n.ERR_403 ) );
         }
 
         if ( !( ( String ) rdn.getNormValue() ).equalsIgnoreCase( "syntaxes" ) )
         {
-            throw new LdapInvalidDnException( I18n.err( I18n.ERR_363 ), ResultCodeEnum.NAMING_VIOLATION
);
+            throw new LdapInvalidDnException( ResultCodeEnum.NAMING_VIOLATION, I18n.err(
I18n.ERR_363 ) );
         }
     }
 }



Mime
View raw message