directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r912436 [2/2] - in /directory/shared/trunk: i18n/src/main/java/org/apache/directory/shared/i18n/ i18n/src/main/resources/org/apache/directory/shared/i18n/ ldap/src/main/java/org/apache/directory/shared/ldap/csn/ ldap/src/main/java/org/apach...
Date Sun, 21 Feb 2010 23:16:30 GMT
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/spi/Provider.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/spi/Provider.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/spi/Provider.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/spi/Provider.java Sun Feb 21 23:16:28 2010
@@ -25,6 +25,7 @@
 import java.util.Hashtable;
 import java.util.Properties;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapProvider;
 
 
@@ -84,16 +85,15 @@
                 }
                 catch ( ClassNotFoundException e )
                 {
-                    System.err.println( "provider monitor class " + fqcn + " not found" );
+                    System.err.println( I18n.err( I18n.ERR_04177, fqcn ) );
                 }
                 catch ( IllegalAccessException e )
                 {
-                    System.err.println( "provider monitor class " + fqcn
-                        + " does not expose a public default constructor" );
+                    System.err.println( I18n.err( I18n.ERR_04178, fqcn ) );
                 }
                 catch ( InstantiationException e )
                 {
-                    System.err.println( "provider monitor class " + fqcn + " failed during instantiation" );
+                    System.err.println( I18n.err( I18n.ERR_04179, fqcn ) );
                 }
             }
         }
@@ -229,8 +229,7 @@
         // --------------------------------------------------------------------
         if ( ( className == null ) || className.trim().equals( "" ) )
         {
-            throw new ProviderException( null, "Could not instantiate provider - environment does not specify "
-                + BERLIB_PROVIDER + " property!" );
+            throw new ProviderException( null, I18n.err( I18n.ERR_04180, BERLIB_PROVIDER ) );
         }
 
         try
@@ -241,28 +240,25 @@
         }
         catch ( ClassNotFoundException cnfe )
         {
-            ProviderException pe = new ProviderException( null, "Count not find the Provider class " + className );
+            ProviderException pe = new ProviderException( null, I18n.err( I18n.ERR_04181, className ) );
             pe.addThrowable( cnfe );
             throw pe;
         }
         catch ( NoSuchMethodException nsme )
         {
-            ProviderException pe = new ProviderException( null, "Count not invoke the Provider's factory method: "
-                + className + ".getProvider() - it may not exist!" );
+            ProviderException pe = new ProviderException( null, I18n.err( I18n.ERR_04182, className ) );
             pe.addThrowable( nsme );
             throw pe;
         }
         catch ( IllegalAccessException iae )
         {
-            ProviderException pe = new ProviderException( null, "Count not invoke the Provider's factory method: "
-                + className + ".getProvider() - it does seem to be a public method!" );
+            ProviderException pe = new ProviderException( null, I18n.err( I18n.ERR_04183, className ) );
             pe.addThrowable( iae );
             throw pe;
         }
         catch ( InvocationTargetException ite )
         {
-            ProviderException pe = new ProviderException( null, "Call to Provider's factory method: " + className
-                + ".getProvider() threw the following exception:\n" + ite.getTargetException() );
+            ProviderException pe = new ProviderException( null, I18n.err( I18n.ERR_04184, className, ite.getTargetException() ) );
             pe.addThrowable( ite.getTargetException() );
             throw pe;
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVA.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVA.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVA.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/AVA.java Sun Feb 21 23:16:28 2010
@@ -28,6 +28,7 @@
 
 import javax.naming.InvalidNameException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
@@ -171,7 +172,7 @@
         {
             if ( StringTools.isEmpty( normTypeTrimmed ) )
             {
-                String message =  "The type cannot be empty or null";
+                String message =  I18n.err( I18n.ERR_04188 );
                 LOG.error( message );
                 throw new InvalidNameException( message );
             }
@@ -228,7 +229,7 @@
         {
             if ( StringTools.isEmpty( normTypeTrimmed ) )
             {
-                String message = "The type cannot be empty or null";
+                String message = I18n.err( I18n.ERR_04188 );
                 LOG.error( message );
                 throw new InvalidNameException( message );
             }
@@ -295,14 +296,14 @@
     {
         if ( StringTools.isEmpty( type ) || StringTools.isEmpty( type.trim() ) )
         {
-            String message = "The type cannot be empty or null";
+            String message = I18n.err( I18n.ERR_04188 );
             LOG.error( message );
             throw new InvalidNameException( message );
         }
         
         if ( StringTools.isEmpty( upType ) || StringTools.isEmpty( upType.trim() ) )
         {
-            String message = "The User Provided type cannot be empty or null";
+            String message = I18n.err( I18n.ERR_04189 );
             LOG.error( message );
             throw new InvalidNameException( message );
         }
@@ -311,7 +312,7 @@
         
         if ( equalPosition <= 1 )
         {
-            String message = "The User provided name does not contains an '='"; 
+            String message = I18n.err( I18n.ERR_04190 ); 
             LOG.error( message );
             throw new InvalidNameException( message );
         }
@@ -333,8 +334,8 @@
     {
         if ( StringTools.isEmpty( type ) || StringTools.isEmpty( type.trim() ) )
         {
-            LOG.error( "The type cannot be empty or null" );
-            throw new InvalidNameException( "The AVA type cannot be null or empty " );
+            LOG.error( I18n.err( I18n.ERR_04191 ) );
+            throw new InvalidNameException( I18n.err( I18n.ERR_04191 ) );
         }
 
         normType = type.trim().toLowerCase();

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/FastLdapDnParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/FastLdapDnParser.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/FastLdapDnParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/FastLdapDnParser.java Sun Feb 21 23:16:28 2010
@@ -27,6 +27,7 @@
 import javax.naming.NameParser;
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
 import org.apache.directory.shared.ldap.util.Position;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -112,8 +113,7 @@
                     break;
 
                 default:
-                    throw new InvalidNameException( "Unexpected character '" + c + "' at position " + pos.start
-                        + ". Excpected ',' or ';'." );
+                    throw new InvalidNameException( I18n.err( I18n.ERR_04192, c, pos.start) );
             }
         }
     }
@@ -131,11 +131,11 @@
     {
         if ( name == null || name.length() == 0 )
         {
-            throw new InvalidNameException( "RDN must not be empty" );
+            throw new InvalidNameException( I18n.err( I18n.ERR_04193 ) );
         }
         if( rdn == null )
         {
-            throw new InvalidNameException( "RDN must not be null" );
+            throw new InvalidNameException( I18n.err( I18n.ERR_04194 ) );
         }
 
         Position pos = new Position();
@@ -291,8 +291,7 @@
 
             default:
                 // error
-                throw new InvalidNameException( "Unexpected character '" + c + "' at position " + pos.start
-                    + ". Excpected start of attributeType." );
+                throw new InvalidNameException( I18n.err( I18n.ERR_04195, c, pos.start) );
         }
     }
 
@@ -392,8 +391,7 @@
 
                 default:
                     // error
-                    throw new InvalidNameException( "Unexpected character '" + c + "' at position " + pos.start
-                        + ". Excpected start of attributeType descr." );
+                    throw new InvalidNameException( I18n.err( I18n.ERR_04196, c, pos.start ) );
             }
         }
         return descr.toString();
@@ -434,8 +432,7 @@
                             pos.start--;
                             break;
                         default:
-                            throw new InvalidNameException( "Unexpected character '" + c + "' at position " + pos.start
-                                + ". Excpected numericoid." );
+                            throw new InvalidNameException( I18n.err( I18n.ERR_04197, c, pos.start ) );
                     }
                     break;
 
@@ -477,8 +474,7 @@
                                 numericOid.append( c );
                                 break;
                             default:
-                                throw new InvalidNameException( "Unexpected character '" + c + "' at position "
-                                    + pos.start + ". Excpected numericoid." );
+                                throw new InvalidNameException( I18n.err( I18n.ERR_04197, c, pos.start ) );
                         }
                     }
                     break;
@@ -491,11 +487,10 @@
                     }
                     else
                     {
-                        throw new InvalidNameException( "Numeric OID must contain at least one dot." );
+                        throw new InvalidNameException( I18n.err( I18n.ERR_04198 ) );
                     }
                 default:
-                    throw new InvalidNameException( "Unexpected character '" + c + "' at position " + pos.start
-                        + ". Excpected start of attributeType numericoid." );
+                    throw new InvalidNameException( I18n.err( I18n.ERR_04199, c, pos.start ) );
             }
         }
     }
@@ -514,8 +509,7 @@
         char c = nextChar( name, pos, true );
         if ( c != '=' )
         {
-            throw new InvalidNameException( "Unexpected character '" + c + "' at position " + pos.start
-                + ". Excpected EQUALS '='." );
+            throw new InvalidNameException( I18n.err( I18n.ERR_04200, c, pos.start ) );
         }
     }
 
@@ -582,7 +576,7 @@
     {
         if ( !hasMoreChars( pos ) )
         {
-            throw new InvalidNameException( "No more characters available at position " + pos.start );
+            throw new InvalidNameException( I18n.err( I18n.ERR_04201, pos.start ) );
         }
         char c = name.charAt( pos.start );
         if ( increment )

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDN.java Sun Feb 21 23:16:28 2010
@@ -35,6 +35,7 @@
 import javax.naming.Name;
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -225,7 +226,7 @@
         
         if ( valueExpected )
         {
-            throw new InvalidNameException( "A value is missing on some RDN" );
+            throw new InvalidNameException( I18n.err( I18n.ERR_04202 ) );
         }
 
         // Stores the representations of a DN : internal (as a string and as a
@@ -429,7 +430,7 @@
 
         if ( posn > rdns.size() )
         {
-            String message = "Impossible to get the position " + posn + ", the DN only has " + rdns.size() + " RDNs";
+            String message = I18n.err( I18n.ERR_04203, posn, rdns.size() );
             LOG.error( message );
             throw new ArrayIndexOutOfBoundsException( message );
         }
@@ -668,7 +669,7 @@
                 }
                 catch ( InvalidNameException e )
                 {
-                    LOG.error( "Failed to parse RDN for name " + name.toString(), e );
+                    LOG.error( I18n.err( I18n.ERR_04204, name.toString() ), e );
                     return false;
                 }
 
@@ -762,7 +763,7 @@
                 }
                 catch ( InvalidNameException e )
                 {
-                    LOG.error( "Failed to parse RDN for name " + name.toString(), e );
+                    LOG.error( I18n.err( I18n.ERR_04204, name.toString() ), e );
                     return false;
                 }
 
@@ -892,7 +893,7 @@
             {
                 if ( pos >= rdns.size() )
                 {
-                    LOG.error( "Exceeded number of elements in the current object" );
+                    LOG.error( I18n.err( I18n.ERR_04205 ) );
                     throw new NoSuchElementException();
                 }
 
@@ -935,7 +936,7 @@
             {
                 if ( pos >= rdns.size() )
                 {
-                    LOG.error( "Exceeded number of elements in the current object" );
+                    LOG.error( I18n.err( I18n.ERR_04205 ) );
                     throw new NoSuchElementException();
                 }
 
@@ -959,7 +960,7 @@
 
         if ( ( posn < 0 ) || ( posn > rdns.size() ) )
         {
-            String message = "The posn(" + posn + ") should be in the range [0, " + rdns.size() + "]";
+            String message = I18n.err( I18n.ERR_04206, posn, rdns.size() );
             LOG.error( message );
             throw new ArrayIndexOutOfBoundsException( message );
         }
@@ -991,7 +992,7 @@
 
         if ( ( posn < 0 ) || ( posn > rdns.size() ) )
         {
-            String message = "The posn(" + posn + ") should be in the range [0, " + rdns.size() + "]";
+            String message = I18n.err( I18n.ERR_04206, posn, rdns.size() );
             LOG.error( message );
             throw new ArrayIndexOutOfBoundsException( message );
         }
@@ -1235,7 +1236,7 @@
     {
         if ( ( posn < 0 ) || ( posn > size() ) )
         {
-            String message = "The posn(" + posn + ") should be in the range [0, " + rdns.size() + "]";
+            String message = I18n.err( I18n.ERR_04206, posn, rdns.size() );
             LOG.error( message );
             throw new ArrayIndexOutOfBoundsException( message );
         }
@@ -1265,7 +1266,7 @@
 
         if ( ( posn < 0 ) || ( posn >= rdns.size() ) )
         {
-            String message = "The posn(" + posn + ") should be in the range [0, " + rdns.size() + "]";
+            String message = I18n.err( I18n.ERR_04206, posn, rdns.size() );
             LOG.error( message );
             throw new ArrayIndexOutOfBoundsException( message );
         }
@@ -1299,8 +1300,8 @@
         }
         catch ( CloneNotSupportedException cnse )
         {
-            LOG.error( "The clone operation has failed" );
-            throw new Error( "Assertion failure : cannot clone the object" );
+            LOG.error( I18n.err( I18n.ERR_04207 ) );
+            throw new Error( I18n.err( I18n.ERR_04208 ) );
         }
     }
 
@@ -1416,8 +1417,8 @@
         else
         {
             // The type is empty : this is not possible...
-            LOG.error( "Empty type not allowed in a DN" );
-            throw new InvalidNameException( "Empty type not allowed in a DN" );
+            LOG.error( I18n.err( I18n.ERR_04209 ) );
+            throw new InvalidNameException( I18n.err( I18n.ERR_04209 ) );
         }
     }
 
@@ -1590,7 +1591,7 @@
     {
         if ( upName == null )
         {
-            String message = "Cannot serialize a NULL DN";
+            String message = I18n.err( I18n.ERR_04210 );
             LOG.error( message );
             throw new IOException( message );
         }
@@ -1612,7 +1613,7 @@
         }
         else
         {
-            String message = "The DN should have been normalized before being serialized";
+            String message = I18n.err( I18n.ERR_04211 );
             LOG.error( message );
             throw new IOException( message );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDNSerializer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDNSerializer.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDNSerializer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/LdapDNSerializer.java Sun Feb 21 23:16:28 2010
@@ -23,6 +23,7 @@
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -81,7 +82,7 @@
         }
         else
         {
-            String message = "The DN should have been normalized before being serialized " + dn;
+            String message = I18n.err( I18n.ERR_04212, dn );
             LOG.error( message );
             throw new IOException( message );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/RDN.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/RDN.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/RDN.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/RDN.java Sun Feb 21 23:16:28 2010
@@ -35,6 +35,7 @@
 
 import org.apache.commons.collections.MultiMap;
 import org.apache.commons.collections.map.MultiValueMap;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
 import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
@@ -1042,7 +1043,7 @@
 
             if ( ( chars.length % 2 ) != 1 )
             {
-                throw new IllegalArgumentException( "This value is not in hex form, we have an odd number of hex chars" );
+                throw new IllegalArgumentException( I18n.err( I18n.ERR_04213 ) );
             }
 
             // HexString form
@@ -1057,7 +1058,7 @@
                 }
                 else
                 {
-                    throw new IllegalArgumentException( "This value is not in hex form" );
+                    throw new IllegalArgumentException( I18n.err( I18n.ERR_04214 ) );
                 }
             }
 
@@ -1138,12 +1139,12 @@
                                     break;
                                 }
                             case '=':
-                                throw new IllegalArgumentException( "Unescaped special characters are not allowed" );
+                                throw new IllegalArgumentException( I18n.err( I18n.ERR_04215 ) );
 
                             case ' ':
                                 if ( ( i == 0 ) || ( i == chars.length - 1 ) )
                                 {
-                                    throw new IllegalArgumentException( "Unescaped special characters are not allowed" );
+                                    throw new IllegalArgumentException( I18n.err( I18n.ERR_04215 ) );
                                 }
                                 else
                                 {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/SimpleNameComponentNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/SimpleNameComponentNormalizer.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/SimpleNameComponentNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/name/SimpleNameComponentNormalizer.java Sun Feb 21 23:16:28 2010
@@ -23,6 +23,7 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
 import org.apache.directory.shared.ldap.schema.Normalizer;
 
@@ -86,6 +87,6 @@
 
     public String normalizeName( String attributeName ) throws NamingException
     {
-        throw new UnsupportedOperationException( "This class is not aware of schema information and cannot normalize" );
+        throw new UnsupportedOperationException( I18n.err( I18n.ERR_04216 ) );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/ComparableComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/ComparableComparator.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/ComparableComparator.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/ComparableComparator.java Sun Feb 21 23:16:28 2010
@@ -22,6 +22,7 @@
 
 import java.util.Comparator;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -101,7 +102,6 @@
         // return o1.hashCode() - o2.hashCode();
         
         // now we will blow a stack trace if none of the objects are Comparable
-        throw new IllegalArgumentException( "None of the arguments are Comparable objects:\n" 
-            + "\targ1 = " + o1 + "\n\targ2 = " + o2 );
+        throw new IllegalArgumentException( I18n.err( I18n.ERR_04217, o1, o2 ) );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/DnComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/DnComparator.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/DnComparator.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/DnComparator.java Sun Feb 21 23:16:28 2010
@@ -23,6 +23,7 @@
 import javax.naming.Name;
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -90,8 +91,7 @@
         }
         else
         {
-            throw new IllegalStateException( "I do not know how to handle dn comparisons with objects of class: " 
-                + (obj == null ? null : obj.getClass() ) );
+            throw new IllegalStateException( I18n.err( I18n.ERR_04218, (obj == null ? null : obj.getClass() ) ) );
         }
         
         return dn;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/LongComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/LongComparator.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/LongComparator.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/LongComparator.java Sun Feb 21 23:16:28 2010
@@ -20,6 +20,7 @@
 package org.apache.directory.shared.ldap.schema.comparators;
 
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 
 
@@ -63,11 +64,11 @@
         {
             if ( obj1 == null )
             {
-                throw new IllegalArgumentException( "Argument 'obj1' is null" );
+                throw new IllegalArgumentException( I18n.err( I18n.ERR_04219 ) );
             }
             else
             {
-                throw new IllegalArgumentException( "Argument 'obj2' is null" );
+                throw new IllegalArgumentException( I18n.err( I18n.ERR_04220 ));
             }
         }
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/SerializableComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/SerializableComparator.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/SerializableComparator.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/SerializableComparator.java Sun Feb 21 23:16:28 2010
@@ -24,6 +24,7 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 
@@ -77,7 +78,7 @@
             }
             catch ( NamingException e )
             {
-                throw new RuntimeException( "Matching rule not found: " + matchingRuleOid );
+                throw new RuntimeException( I18n.err( I18n.ERR_04221, matchingRuleOid ) );
             }
         }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/comparators/UniqueMemberComparator.java Sun Feb 21 23:16:28 2010
@@ -23,6 +23,7 @@
 import javax.naming.Name;
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.schema.LdapComparator;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -185,8 +186,7 @@
         }
         else
         {
-            throw new IllegalStateException( "I do not know how to handle dn comparisons with objects of class: "
-                + ( obj == null ? null : obj.getClass() ) );
+            throw new IllegalStateException( I18n.err( I18n.ERR_04218, ( obj == null ? null : obj.getClass() ) ) );
         }
 
         return dn;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/ConcreteNameComponentNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/ConcreteNameComponentNormalizer.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/ConcreteNameComponentNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/ConcreteNameComponentNormalizer.java Sun Feb 21 23:16:28 2010
@@ -24,6 +24,7 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
 import org.apache.directory.shared.ldap.name.NameComponentNormalizer;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -127,7 +128,7 @@
             }
             catch ( UnsupportedEncodingException uee )
             {
-                String message = "The value stored in a non Human Readable attribute as a String should be convertible to a byte[]";
+                String message = I18n.err( I18n.ERR_04222 );
                 LOG.error( message );
                 throw new NamingException( message );
             }
@@ -156,7 +157,7 @@
             }
             catch ( UnsupportedEncodingException uee )
             {
-                String message = "The value stored in an Human Readable attribute as a byte[] should be convertible to a String";
+                String message = I18n.err( I18n.ERR_04223 );
                 LOG.error( message );
                 throw new NamingException( message );
             }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimNormalizer.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimNormalizer.java Sun Feb 21 23:16:28 2010
@@ -24,6 +24,7 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
 import org.apache.directory.shared.ldap.schema.Normalizer;
@@ -79,7 +80,7 @@
        }
        catch ( IOException ioe )
        {
-           throw new NamingException( "Invalid value : " + value );
+           throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
        }
    }
 
@@ -98,7 +99,7 @@
        }
        catch ( IOException ioe )
        {
-           throw new NamingException( "Invalid value : " + value );
+           throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
        }
    }
 }
\ No newline at end of file

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimToLowerNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimToLowerNormalizer.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimToLowerNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/DeepTrimToLowerNormalizer.java Sun Feb 21 23:16:28 2010
@@ -24,6 +24,7 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
 import org.apache.directory.shared.ldap.schema.Normalizer;
@@ -83,7 +84,7 @@
         }
         catch ( IOException ioe )
         {
-            throw new NamingException( "Invalid value : " + value );
+            throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
         }
     }
 
@@ -107,7 +108,7 @@
         }
         catch ( IOException ioe )
         {
-            throw new NamingException( "Invalid value : " + value );
+            throw new NamingException( I18n.err( I18n.ERR_04224,  value ) );
         }
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/GeneralizedTimeNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/GeneralizedTimeNormalizer.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/GeneralizedTimeNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/GeneralizedTimeNormalizer.java Sun Feb 21 23:16:28 2010
@@ -24,6 +24,7 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
@@ -70,7 +71,7 @@
        }
        catch ( IOException ioe )
        {
-           throw new NamingException( "Invalid value : " + value );
+           throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
        }
    }
 
@@ -89,7 +90,7 @@
        }
        catch ( IOException ioe )
        {
-           throw new NamingException( "Invalid value : " + value );
+           throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
        }
    }
 }
\ No newline at end of file

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NameOrNumericIdNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NameOrNumericIdNormalizer.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NameOrNumericIdNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NameOrNumericIdNormalizer.java Sun Feb 21 23:16:28 2010
@@ -22,6 +22,7 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
@@ -96,8 +97,7 @@
         }
 
         // if all else fails
-        throw new LdapNamingException( "Encountered name based id of " + value
-            + " which was not found in the OID registry", ResultCodeEnum.OTHER );
+        throw new LdapNamingException( I18n.err( I18n.ERR_04225, value ), ResultCodeEnum.OTHER );
     }
 
 
@@ -131,8 +131,7 @@
         }
 
         // if all else fails
-        throw new LdapNamingException( "Encountered name based id of " + value
-            + " which was not found in the OID registry", ResultCodeEnum.OTHER );
+        throw new LdapNamingException( I18n.err( I18n.ERR_04226, value ), ResultCodeEnum.OTHER );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NumericNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NumericNormalizer.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NumericNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/NumericNormalizer.java Sun Feb 21 23:16:28 2010
@@ -24,6 +24,7 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
@@ -64,7 +65,7 @@
        }
        catch ( IOException ioe )
        {
-           throw new NamingException( "Invalid value : " + value );
+           throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
        }
    }
 
@@ -81,7 +82,7 @@
        }
        catch ( IOException ioe )
        {
-           throw new NamingException( "Invalid value : " + value );
+           throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
        }
    }
 }
\ No newline at end of file

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/TelephoneNumberNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/TelephoneNumberNormalizer.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/TelephoneNumberNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/TelephoneNumberNormalizer.java Sun Feb 21 23:16:28 2010
@@ -24,6 +24,7 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
@@ -65,7 +66,7 @@
        }
        catch ( IOException ioe )
        {
-           throw new NamingException( "Invalid value : " + value );
+           throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
        }
    }
 
@@ -82,7 +83,7 @@
        }
        catch ( IOException ioe )
        {
-           throw new NamingException( "Invalid value : " + value );
+           throw new NamingException( I18n.err( I18n.ERR_04224, value ) );
        }
    }
 }
\ No newline at end of file

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/UniqueMemberNormalizer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/UniqueMemberNormalizer.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/UniqueMemberNormalizer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/normalizers/UniqueMemberNormalizer.java Sun Feb 21 23:16:28 2010
@@ -22,6 +22,7 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
@@ -89,8 +90,7 @@
             }
             else
             {
-                throw new IllegalStateException( "I do not know how to handle NameAndOptionalUID normalization with objects of class: " 
-                    + value.getClass() );
+                throw new IllegalStateException( I18n.err( I18n.ERR_04226, value.getClass() ) );
             }
         }
         else
@@ -137,8 +137,7 @@
             }
             else
             {
-                throw new IllegalStateException( "I do not know how to handle NameAndOptionalUID normalization with objects of class: " 
-                    + value.getClass() );
+                throw new IllegalStateException( I18n.err( I18n.ERR_04226, value.getClass() ) );
             }
         }
         else

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/AttributeTypeDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/AttributeTypeDescriptionSchemaParser.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/AttributeTypeDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/AttributeTypeDescriptionSchemaParser.java Sun Feb 21 23:16:28 2010
@@ -22,6 +22,7 @@
 
 import java.text.ParseException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -91,7 +92,7 @@
 
         if ( attributeTypeDescription == null )
         {
-            LOG.error( "Cannot parse a null AttributeType" );
+            LOG.error( I18n.err( I18n.ERR_04227 ) );
             throw new ParseException( "Null", 0 );
         }
 
@@ -108,23 +109,19 @@
         }
         catch ( RecognitionException re )
         {
-            String msg = "Parser failure on attribute type description:\n\t" + attributeTypeDescription +
-                "\nAntlr message: " + re.getMessage() +
-                "\nAntlr column: " + re.getColumn();
+            String msg = I18n.err( I18n.ERR_04228, attributeTypeDescription , re.getMessage() , re.getColumn() );
             LOG.error( msg );
             throw new ParseException( msg, re.getColumn() );
         }
         catch ( TokenStreamRecognitionException tsre )
         {
-            String msg = "Parser failure on attribute type description:\n\t" + attributeTypeDescription +
-                "\nAntlr message: " + tsre.getMessage();
+            String msg = I18n.err( I18n.ERR_04229, attributeTypeDescription, tsre.getMessage() );
             LOG.error( msg );
             throw new ParseException( msg, 0 );
         }
         catch ( TokenStreamException tse )
         {
-            String msg = "Parser failure on attribute type description:\n\t" + attributeTypeDescription +
-                "\nAntlr message: " + tse.getMessage();
+            String msg = I18n.err( I18n.ERR_04229, attributeTypeDescription, tse.getMessage() );
             LOG.error( msg );
             throw new ParseException( msg, 0 );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITContentRuleDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITContentRuleDescriptionSchemaParser.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITContentRuleDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITContentRuleDescriptionSchemaParser.java Sun Feb 21 23:16:28 2010
@@ -22,6 +22,7 @@
 
 import java.text.ParseException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.schema.DITContentRule;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -76,7 +77,7 @@
 
         if ( ditContentRuleDescription == null )
         {
-            LOG.error( "Cannot parse a null DITContentRule" );
+            LOG.error( I18n.err( I18n.ERR_04230 ) );
             throw new ParseException( "Null", 0 );
         }
 
@@ -93,16 +94,13 @@
         }
         catch ( RecognitionException re )
         {
-            String msg = "Parser failure on DIT content rule description:\n\t" + ditContentRuleDescription +
-                "\nAntlr message: " + re.getMessage() +
-                "\nAntlr column: " + re.getColumn();
+            String msg = I18n.err( I18n.ERR_04231, ditContentRuleDescription, re.getMessage(), re.getColumn() );
             LOG.error( msg );
             throw new ParseException( msg, re.getColumn() );
         }
         catch ( TokenStreamException tse )
         {
-            String msg = "Parser failure on DIT content rule description:\n\t" + ditContentRuleDescription +
-                "\nAntlr message: " + tse.getMessage();
+            String msg = I18n.err( I18n.ERR_04232, ditContentRuleDescription, tse.getMessage() );
             LOG.error( msg );
             throw new ParseException( msg, 0 );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITStructureRuleDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITStructureRuleDescriptionSchemaParser.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITStructureRuleDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/DITStructureRuleDescriptionSchemaParser.java Sun Feb 21 23:16:28 2010
@@ -22,6 +22,7 @@
 
 import java.text.ParseException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.schema.DITStructureRule;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -80,7 +81,7 @@
 
         if ( ditStructureRuleDescription == null )
         {
-            LOG.error( "Cannot parse a null DITStructureRule description" );
+            LOG.error( I18n.err( I18n.ERR_04233 ) );
             throw new ParseException( "Null", 0 );
         }
 
@@ -97,16 +98,13 @@
         }
         catch ( RecognitionException re )
         {
-            String msg = "Parser failure on DIT structure rule description:\n\t" + ditStructureRuleDescription +
-                "\nAntlr message: " + re.getMessage() +
-                "\nAntlr column: " + re.getColumn();
+            String msg = I18n.err( I18n.ERR_04234, ditStructureRuleDescription, re.getMessage(), re.getColumn() );
             LOG.error( msg );
             throw new ParseException( msg, re.getColumn() );
         }
         catch ( TokenStreamException tse )
         {
-            String msg = "Parser failure on DIT structure rule description:\n\t" + ditStructureRuleDescription +
-                "\nAntlr message: " + tse.getMessage();
+            String msg = I18n.err( I18n.ERR_04235, ditStructureRuleDescription, tse.getMessage() );
             LOG.error( msg );
             throw new ParseException( msg, 0 );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapComparatorDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapComparatorDescriptionSchemaParser.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapComparatorDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapComparatorDescriptionSchemaParser.java Sun Feb 21 23:16:28 2010
@@ -22,6 +22,7 @@
 
 import java.text.ParseException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -80,7 +81,7 @@
         
         if ( comparatorDescription == null )
         {
-            LOG.error( "Cannot parse a null LdapComparator description" );
+            LOG.error( I18n.err( I18n.ERR_04236 ) );
             throw new ParseException( "Null", 0 );
         }
 
@@ -101,16 +102,13 @@
             }
             catch ( RecognitionException re )
             {
-                String msg = "Parser failure on comparator description:\n\t" + comparatorDescription +
-                    "\nAntlr message: " + re.getMessage() +
-                    "\nAntlr column: " + re.getColumn();
+                String msg = I18n.err( I18n.ERR_04273, comparatorDescription, re.getMessage(), re.getColumn() );
                 LOG.error( msg );
                 throw new ParseException( msg, re.getColumn() );
             }
             catch ( TokenStreamException tse )
             {
-                String msg = "Parser failure on comparator description:\n\t" + comparatorDescription +
-                    "\nAntlr message: " + tse.getMessage();
+                String msg = I18n.err( I18n.ERR_04238, comparatorDescription, tse.getMessage() );
                 LOG.error( msg );
                 throw new ParseException( msg, 0 );
             }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapSyntaxDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapSyntaxDescriptionSchemaParser.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapSyntaxDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/LdapSyntaxDescriptionSchemaParser.java Sun Feb 21 23:16:28 2010
@@ -22,6 +22,7 @@
 
 import java.text.ParseException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.schema.LdapSyntax;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -70,7 +71,7 @@
 
         if ( ldapSyntaxDescription == null )
         {
-            LOG.error( "Cannot parse a null LdapSyntax" );
+            LOG.error( I18n.err( I18n.ERR_04239 ) );
             throw new ParseException( "Null", 0 );
         }
 
@@ -88,16 +89,13 @@
         }
         catch ( RecognitionException re )
         {
-            String msg = "Parser failure on LDAP syntay description:\n\t" + ldapSyntaxDescription +
-                "\nAntlr message: " + re.getMessage() +
-                "\nAntlr column: " + re.getColumn();
+            String msg = I18n.err( I18n.ERR_04240, ldapSyntaxDescription, re.getMessage(), re.getColumn() );
             LOG.error( msg );
             throw new ParseException( msg, re.getColumn() );
         }
         catch ( TokenStreamException tse )
         {
-            String msg = "Parser failure on LDAP syntay description:\n\t" + ldapSyntaxDescription +
-                "\nAntlr message: " + tse.getMessage();
+            String msg = I18n.err( I18n.ERR_04241, ldapSyntaxDescription, tse.getMessage() );
             LOG.error(  msg  );
             throw new ParseException( msg, 0 );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleDescriptionSchemaParser.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleDescriptionSchemaParser.java Sun Feb 21 23:16:28 2010
@@ -22,6 +22,7 @@
 
 import java.text.ParseException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.schema.MatchingRule;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -76,7 +77,7 @@
 
         if ( matchingRuleDescription == null )
         {
-            LOG.error( "Cannot parse a null MatchingRule" );
+            LOG.error( I18n.err( I18n.ERR_04242 ) );
             throw new ParseException( "Null", 0 );
         }
 
@@ -93,16 +94,13 @@
         }
         catch ( RecognitionException re )
         {
-            String msg = "Parser failure on matching rule description:\n\t" + matchingRuleDescription +
-                "\nAntlr message: " + re.getMessage() +
-                "\nAntlr column: " + re.getColumn();
+            String msg = I18n.err( I18n.ERR_04243, matchingRuleDescription, re.getMessage(), re.getColumn() );
             LOG.error( msg );
             throw new ParseException( msg, re.getColumn() );
         }
         catch ( TokenStreamException tse )
         {
-            String msg = "Parser failure on matching rule description:\n\t" + matchingRuleDescription +
-                "\nAntlr message: " + tse.getMessage();
+            String msg = I18n.err( I18n.ERR_04244, matchingRuleDescription, tse.getMessage() );
             LOG.error( msg );
             throw new ParseException( msg, 0 );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleUseDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleUseDescriptionSchemaParser.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleUseDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/MatchingRuleUseDescriptionSchemaParser.java Sun Feb 21 23:16:28 2010
@@ -22,6 +22,7 @@
 
 import java.text.ParseException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.schema.MatchingRuleUse;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -77,7 +78,7 @@
 
         if ( matchingRuleUseDescription == null )
         {
-            LOG.error( "Cannot parse a null MatchingRuleUse" );
+            LOG.error( I18n.err( I18n.ERR_04245 ) );
             throw new ParseException( "Null", 0 );
         }
 
@@ -94,16 +95,13 @@
         }
         catch ( RecognitionException re )
         {
-            String msg = "Parser failure on matching rule description:\n\t" + matchingRuleUseDescription +
-                "\nAntlr message: " + re.getMessage() +
-                "\nAntlr column: " + re.getColumn();
+            String msg = I18n.err( I18n.ERR_04246, matchingRuleUseDescription, re.getMessage(), re.getColumn() );
             LOG.error( msg );
             throw new ParseException( msg, re.getColumn() );
         }
         catch ( TokenStreamException tse )
         {
-            String msg = "Parser failure on matching rule description:\n\t" + matchingRuleUseDescription +
-                "\nAntlr message: " + tse.getMessage();
+            String msg = I18n.err( I18n.ERR_04247, matchingRuleUseDescription, tse.getMessage() );
             LOG.error( msg );
             throw new ParseException( msg, 0 );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NameFormDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NameFormDescriptionSchemaParser.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NameFormDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NameFormDescriptionSchemaParser.java Sun Feb 21 23:16:28 2010
@@ -22,6 +22,7 @@
 
 import java.text.ParseException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.schema.NameForm;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -75,7 +76,7 @@
 
         if ( nameFormDescription == null )
         {
-            LOG.error( "Cannot parse a null NameForm" );
+            LOG.error( I18n.err( I18n.ERR_04248 ) );
             throw new ParseException( "Null", 0 );
         }
 
@@ -92,16 +93,13 @@
         }
         catch ( RecognitionException re )
         {
-            String msg = "Parser failure on name form description:\n\t" + nameFormDescription +
-                "\nAntlr message: " + re.getMessage() +
-                "\nAntlr column: " + re.getColumn();
+            String msg = I18n.err( I18n.ERR_04249, nameFormDescription, re.getMessage(), re.getColumn() );
             LOG.error( msg );
             throw new ParseException( msg, re.getColumn() );
         }
         catch ( TokenStreamException tse )
         {
-            String msg = "Parser failure on name form description:\n\t" + nameFormDescription +
-                "\nAntlr message: " + tse.getMessage();
+            String msg = I18n.err( I18n.ERR_04250, nameFormDescription, tse.getMessage() );
             LOG.error( msg );
             throw new ParseException( msg, 0 );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NormalizerDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NormalizerDescriptionSchemaParser.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NormalizerDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/NormalizerDescriptionSchemaParser.java Sun Feb 21 23:16:28 2010
@@ -22,6 +22,7 @@
 
 import java.text.ParseException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -81,7 +82,7 @@
 
         if ( normalizerDescription == null )
         {
-            LOG.error( "Cannot parse a null Normalizer description" );
+            LOG.error( I18n.err( I18n.ERR_04251 ) );
             throw new ParseException( "Null", 0 );
         }
 
@@ -98,16 +99,13 @@
         }
         catch ( RecognitionException re )
         {
-            String msg = "Parser failure on normalizer description:\n\t" + normalizerDescription +
-                "\nAntlr message: " + re.getMessage() +
-                "\nAntlr column: " + re.getColumn();
+            String msg = I18n.err( I18n.ERR_04252, normalizerDescription, re.getMessage(), re.getColumn() );
             LOG.error( msg );
             throw new ParseException( msg, re.getColumn() );
         }
         catch ( TokenStreamException tse )
         {
-            String msg = "Parser failure on normalizer description:\n\t" + normalizerDescription +
-                "\nAntlr message: " + tse.getMessage();
+            String msg = I18n.err( I18n.ERR_04253, normalizerDescription, tse.getMessage() );
             LOG.error( msg );
             throw new ParseException( msg, 0 );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ObjectClassDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ObjectClassDescriptionSchemaParser.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ObjectClassDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/ObjectClassDescriptionSchemaParser.java Sun Feb 21 23:16:28 2010
@@ -22,6 +22,7 @@
 
 import java.text.ParseException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -83,7 +84,7 @@
 
         if ( objectClassDescription == null )
         {
-            LOG.error( "Cannot parse a null LdapComparator description" );
+            LOG.error( I18n.err( I18n.ERR_04254 ) );
             throw new ParseException( "Null", 0 );
         }
 
@@ -100,16 +101,13 @@
         }
         catch ( RecognitionException re )
         {
-            String msg = "Parser failure on object class description:\n\t" + objectClassDescription +
-                "\nAntlr message: " + re.getMessage()+
-                "\nAntlr column: " + re.getColumn();
+            String msg = I18n.err( I18n.ERR_04255, objectClassDescription, re.getMessage(), re.getColumn() );
             LOG.error( msg );
             throw new ParseException( msg, re.getColumn() );
         }
         catch ( TokenStreamException tse )
         {
-            String msg = "Parser failure on object class description:\n\t" + objectClassDescription +
-                "\nAntlr message: " + tse.getMessage();
+            String msg = I18n.err( I18n.ERR_04256, objectClassDescription, tse.getMessage() );
             LOG.error( msg );
             throw new ParseException( msg, 0 );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/OpenLdapSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/OpenLdapSchemaParser.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/OpenLdapSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/OpenLdapSchemaParser.java Sun Feb 21 23:16:28 2010
@@ -31,6 +31,7 @@
 import java.util.List;
 import java.util.Map;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.ObjectClass;
 import org.apache.directory.shared.ldap.schema.SchemaObject;
@@ -214,7 +215,7 @@
             }
             else
             {
-                throw new ParseException( "No object identifier macro with name " + nameAndSuffix[0], 0 );
+                throw new ParseException( I18n.err( I18n.ERR_04257, nameAndSuffix[0] ), 0 );
             }
 
         }
@@ -246,7 +247,7 @@
     {
         if ( schemaObject == null || schemaObject.trim().equals( "" ) )
         {
-            throw new ParseException( "The schemaObject is either null or is " + "the empty String!", 0 );
+            throw new ParseException( I18n.err( I18n.ERR_04258 ), 0 );
         }
 
         reset( schemaObject ); // reset and initialize the parser / lexer pair

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/SyntaxCheckerDescriptionSchemaParser.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/SyntaxCheckerDescriptionSchemaParser.java?rev=912436&r1=912435&r2=912436&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/SyntaxCheckerDescriptionSchemaParser.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/schema/parsers/SyntaxCheckerDescriptionSchemaParser.java Sun Feb 21 23:16:28 2010
@@ -22,6 +22,7 @@
 
 import java.text.ParseException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -96,16 +97,13 @@
         }
         catch ( RecognitionException re )
         {
-            String msg = "Parser failure on syntax checker description:\n\t" + syntaxCheckerDescription +
-                "\nAntlr message: " + re.getMessage() +
-                "\nAntlr column: " + re.getColumn();
+            String msg = I18n.err( I18n.ERR_04259, syntaxCheckerDescription, re.getMessage(), re.getColumn() );
             LOG.error( msg );
             throw new ParseException( msg, re.getColumn() );
         }
         catch ( TokenStreamException tse )
         {
-            String msg = "Parser failure on syntax checker description:\n\t" + syntaxCheckerDescription +
-                "\nAntlr message: " + tse.getMessage();
+            String msg = I18n.err( I18n.ERR_04260, syntaxCheckerDescription, tse.getMessage() );
             LOG.error( msg );
             throw new ParseException( msg, 0 );
         }



Mime
View raw message