directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r923756 - /directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
Date Tue, 16 Mar 2010 14:31:15 GMT
Author: kayyagari
Date: Tue Mar 16 14:31:15 2010
New Revision: 923756

URL: http://svn.apache.org/viewvc?rev=923756&view=rev
Log:
replaced jndi exceptions with ADS exceptions

Modified:
    directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java

Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java?rev=923756&r1=923755&r2=923756&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
(original)
+++ directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
Tue Mar 16 14:31:15 2010
@@ -51,6 +51,8 @@ import org.apache.directory.server.xdbm.
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.csn.CsnFactory;
 import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.ldif.LdifUtils;
@@ -181,7 +183,7 @@ public class LdifPartition extends BTree
         {
             String msg = I18n.err( I18n.ERR_150 );
             LOG.error( msg );
-            throw new InvalidNameException( msg );
+            throw new LdapInvalidDnException( msg );
         }
 
         if ( !suffix.isNormalized() )
@@ -518,7 +520,7 @@ public class LdifPartition extends BTree
     /**
      * Create the file name from the entry DN.
      */
-    private File getFile( DN entryDn, boolean create ) throws NamingException
+    private File getFile( DN entryDn, boolean create ) throws LdapException
     {
         StringBuilder filePath = new StringBuilder();
         filePath.append( suffixDirectory ).append( File.separator );
@@ -548,7 +550,7 @@ public class LdifPartition extends BTree
         if ( ldifFile.exists() && create )
         {
             // The entry already exists
-            throw new NamingException( I18n.err( I18n.ERR_633 ) );
+            throw new LdapException( I18n.err( I18n.ERR_633 ) );
         }
 
         return ldifFile;
@@ -561,7 +563,7 @@ public class LdifPartition extends BTree
      * 
      * We don't allow filename which length is > 255 chars.
      */
-    private String getFileName( RDN rdn ) throws NamingException
+    private String getFileName( RDN rdn ) throws LdapException
     {
         // First, get the AT name, or OID
         String normAT = rdn.getAtav().getNormType();
@@ -584,7 +586,7 @@ public class LdifPartition extends BTree
      * 
      * We don't allow filename which length is > 255 chars.
      */
-    private String getFileName( DN dn ) throws NamingException
+    private String getFileName( DN dn ) throws LdapException
     {
         StringBuilder sb = new StringBuilder();
         boolean isFirst = true;
@@ -1048,7 +1050,7 @@ public class LdifPartition extends BTree
 
 
     @Override
-    public void setSuffix( String suffix ) throws InvalidNameException
+    public void setSuffix( String suffix ) throws LdapInvalidDnException
     {
         super.setSuffix( suffix );
         wrappedPartition.setSuffix( suffix );



Mime
View raw message