directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r912399 [4/4] - in /directory/shared/trunk: ./ asn1-codec/ asn1-codec/src/main/java/org/apache/directory/shared/asn1/codec/ asn1/ asn1/src/main/java/org/apache/directory/shared/asn1/ asn1/src/main/java/org/apache/directory/shared/asn1/ber/ ...
Date Sun, 21 Feb 2010 20:52:35 GMT
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/certGeneration/CertGenerationGrammar.java Sun Feb 21 20:52:31 2010
@@ -29,6 +29,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -124,7 +125,7 @@
                     {
                         if( !LdapDN.isValid( targetDN ) )
                         {
-                            String msg = "invalid target DN " +  targetDN;
+                            String msg = I18n.err( I18n.ERR_04032, targetDN );
                             LOG.error( msg );
                             throw new DecoderException( msg );
                         }
@@ -133,8 +134,7 @@
                     }
                     else
                     {
-                        String msg = "failed to decode the target DN, it cannot be null or empty it is '"
-                            + StringTools.dumpBytes( value.getData() );
+                        String msg = I18n.err( I18n.ERR_04033, StringTools.dumpBytes( value.getData() ) );
                         LOG.error( msg );
                         throw new DecoderException( msg );
                     }
@@ -171,7 +171,7 @@
                     {
                         if( !LdapDN.isValid( issuerDN ) )
                         {
-                            String msg = "invalid issuer DN " +  issuerDN;
+                            String msg = I18n.err( I18n.ERR_04034, issuerDN );
                             LOG.error( msg );
                             throw new DecoderException( msg );
                         }
@@ -211,7 +211,7 @@
                     {
                         if( !LdapDN.isValid( subjectDN ) )
                         {
-                            String msg = "invalid subject DN " +  subjectDN;
+                            String msg = I18n.err( I18n.ERR_04035, subjectDN );
                             LOG.error( msg );
                             throw new DecoderException( msg );
                         }
@@ -220,8 +220,7 @@
                     }
                     else
                     {
-                        String msg = "failed to decode the subject DN, it cannot be null or empty it is '"
-                            + StringTools.dumpBytes( value.getData() );
+                        String msg = I18n.err( I18n.ERR_04033, StringTools.dumpBytes( value.getData() ) );
                         LOG.error( msg );
                         throw new DecoderException( msg );
                     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulDisconnect/GracefulDisconnectGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulDisconnect/GracefulDisconnectGrammar.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulDisconnect/GracefulDisconnectGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulDisconnect/GracefulDisconnectGrammar.java Sun Feb 21 20:52:31 2010
@@ -31,6 +31,7 @@
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.util.IntegerDecoder;
 import org.apache.directory.shared.asn1.util.IntegerDecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.extended.operations.GracefulActionConstants;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.util.LdapURL;
@@ -97,8 +98,7 @@
             }
             catch ( IntegerDecoderException e )
             {
-                String msg = "failed to decode the delay, the value should be between 0 and 86400 seconds, it is '"
-                    + StringTools.dumpBytes( value.getData() ) + "'";
+                String msg = I18n.err( I18n.ERR_04036, StringTools.dumpBytes( value.getData() ) );
                 log.error( msg );
                 throw new DecoderException( msg );
             }
@@ -159,8 +159,7 @@
             }
             catch ( IntegerDecoderException e )
             {
-                String msg = "failed to decode the timeOffline, the value should be between 0 and 720 minutes, " + 
-                "it is '" + StringTools.dumpBytes( value.getData() ) + "'";
+                String msg = I18n.err( I18n.ERR_04037, StringTools.dumpBytes( value.getData() ) );
                 log.error( msg );
                 throw new DecoderException( msg );
             }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulShutdown/GracefulShutdownGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulShutdown/GracefulShutdownGrammar.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulShutdown/GracefulShutdownGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulShutdown/GracefulShutdownGrammar.java Sun Feb 21 20:52:31 2010
@@ -31,6 +31,7 @@
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.util.IntegerDecoder;
 import org.apache.directory.shared.asn1.util.IntegerDecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.extended.operations.GracefulActionConstants;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -133,8 +134,7 @@
                     }
                     catch ( IntegerDecoderException e )
                     {
-                        String msg = "failed to decode the timeOffline, the value should be between 0 and 720 minutes, it is '"
-                            + StringTools.dumpBytes( value.getData() ) + "'";
+                        String msg = I18n.err( I18n.ERR_04037, StringTools.dumpBytes( value.getData() ) );
                         log.error( msg );
                         throw new DecoderException( msg );
                     }
@@ -177,8 +177,7 @@
                     }
                     catch ( IntegerDecoderException e )
                     {
-                        String msg = "failed to decode the delay, the value should be between 0 and 86400 seconds, it is '"
-                            + StringTools.dumpBytes( value.getData() ) + "'";
+                        String msg = I18n.err( I18n.ERR_04036, StringTools.dumpBytes( value.getData() ) );
                         log.error( msg );
                         throw new DecoderException( msg );
                     }
@@ -222,8 +221,7 @@
                     }
                     catch ( IntegerDecoderException e )
                     {
-                        String msg = "failed to decode the delay, the value should be between 0 and 86400 seconds, it is '"
-                            + StringTools.dumpBytes( value.getData() ) + "'";
+                        String msg = I18n.err( I18n.ERR_04036, StringTools.dumpBytes( value.getData() ) );
                         log.error( msg );
                         throw new DecoderException( msg );
                     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedure.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedure.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedure.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedure.java Sun Feb 21 20:52:31 2010
@@ -32,6 +32,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.util.StringTools;
 
 
@@ -308,7 +309,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         return bb;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedureGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedureGrammar.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedureGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedureGrammar.java Sun Feb 21 20:52:31 2010
@@ -29,6 +29,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.extended.operations.storedProcedure.StoredProcedure.StoredProcedureParameter;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
@@ -101,8 +102,8 @@
                     if ( tlv.getLength() == 0 )
                     {
                         // We can't have a void language !
-                        log.error( "The stored procedure language is null" );
-                        throw new DecoderException( "The stored procedure language cannot be null" );
+                        log.error( I18n.err( I18n.ERR_04038 ) );
+                        throw new DecoderException( I18n.err( I18n.ERR_04038 ) );
                     }
                     else
                     {
@@ -144,8 +145,8 @@
                     if ( tlv.getLength() == 0 )
                     {
                         // We can't have a void procedure !
-                        log.error( "The procedure can't be null" );
-                        throw new DecoderException( "The procedure can't be null" );
+                        log.error( I18n.err( I18n.ERR_04039 ) );
+                        throw new DecoderException( I18n.err( I18n.ERR_04039 ) );
                     }
                     else
                     {
@@ -210,8 +211,8 @@
                     if ( tlv.getLength() == 0 )
                     {
                         // We can't have a void parameter type !
-                        log.error( "The parameter type can't be null" );
-                        throw new DecoderException( "The parameter type can't be null" );
+                        log.error( I18n.err( I18n.ERR_04040 ) );
+                        throw new DecoderException( I18n.err( I18n.ERR_04040 ) );
                     }
                     else
                     {
@@ -255,8 +256,8 @@
                     if ( tlv.getLength() == 0 )
                     {
                         // We can't have a void parameter value !
-                        log.error( "The parameter value can't be null" );
-                        throw new DecoderException( "The parameter value can't be null" );
+                        log.error( I18n.err( I18n.ERR_04041 ) );
+                        throw new DecoderException( I18n.err( I18n.ERR_04041 ) );
                     }
                     else
                     {
@@ -277,8 +278,8 @@
                         }
                         else
                         {
-                            log.error( "The parameter value is empty. This is not allowed." );
-                            throw new DecoderException( "The parameter value is empty. This is not allowed." );
+                            log.error( I18n.err( I18n.ERR_04042 ) );
+                            throw new DecoderException( I18n.err( I18n.ERR_04042 ) );
                         }
                     }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseCodec.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.asn1.primitives.OID;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -232,7 +233,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            String msg = "The PDU buffer size is too small !";
+            String msg = I18n.err( I18n.ERR_04005 );
             LOGGER.error( msg );
             throw new EncoderException( msg );
         }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java Sun Feb 21 20:52:31 2010
@@ -30,6 +30,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -500,7 +501,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
     }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseCodec.java Sun Feb 21 20:52:31 2010
@@ -25,6 +25,7 @@
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -109,7 +110,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         // The ldapResult

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestCodec.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -277,7 +278,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
     }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseCodec.java Sun Feb 21 20:52:31 2010
@@ -25,6 +25,7 @@
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -109,7 +110,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         // The ldapResult

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AndFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AndFilter.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AndFilter.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AndFilter.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 
 
@@ -102,7 +103,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         try
@@ -113,7 +114,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         super.encode( buffer );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AttributeValueAssertionFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AttributeValueAssertionFilter.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AttributeValueAssertionFilter.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/AttributeValueAssertionFilter.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.AttributeValueAssertion;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 
@@ -185,7 +186,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         try
@@ -214,7 +215,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         // The attribute desc

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ConnectorFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ConnectorFilter.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ConnectorFilter.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ConnectorFilter.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 
 
 /**
@@ -132,7 +133,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         // encode each filter

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ExtensibleMatchFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ExtensibleMatchFilter.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ExtensibleMatchFilter.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/ExtensibleMatchFilter.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -261,7 +262,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         try
@@ -272,7 +273,7 @@
 
             if ( ( matchingRule == null ) && ( type == null ) )
             {
-                throw new EncoderException( "Cannot have a null matching rule and a null type" );
+                throw new EncoderException( I18n.err( I18n.ERR_04056 ) );
             }
 
             // The matching rule
@@ -317,7 +318,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         return buffer;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/NotFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/NotFilter.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/NotFilter.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/NotFilter.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 
 
@@ -67,7 +68,7 @@
     {
         if ( filterSet != null )
         {
-            throw new DecoderException( "Cannot have more than one Filter within a Not Filter" );
+            throw new DecoderException( I18n.err( I18n.ERR_04057 ) );
         }
 
         super.addFilter( filter );
@@ -94,7 +95,7 @@
     {
         if ( filterSet != null )
         {
-            throw new DecoderException( "Cannot have more than one Filter within a Not Filter" );
+            throw new DecoderException( I18n.err( I18n.ERR_04057 ) );
         }
 
         super.addFilter( notFilter );
@@ -129,7 +130,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         try
@@ -140,7 +141,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         super.encode( buffer );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/OrFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/OrFilter.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/OrFilter.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/OrFilter.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 
 
@@ -103,7 +104,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         try
@@ -114,7 +115,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         super.encode( buffer );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/PresentFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/PresentFilter.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/PresentFilter.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/PresentFilter.java Sun Feb 21 20:52:31 2010
@@ -25,6 +25,7 @@
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -119,7 +120,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         try
@@ -131,7 +132,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         super.encode( buffer );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequestCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequestCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequestCodec.java Sun Feb 21 20:52:31 2010
@@ -33,6 +33,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
@@ -596,7 +597,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
     }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneCodec.java Sun Feb 21 20:52:31 2010
@@ -25,6 +25,7 @@
 
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -111,7 +112,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         // The ldapResult

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java Sun Feb 21 20:52:31 2010
@@ -32,6 +32,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.asn1.util.Asn1StringUtils;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -406,7 +407,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
     }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceCodec.java Sun Feb 21 20:52:31 2010
@@ -28,6 +28,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -174,7 +175,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
     }
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SubstringFilter.java Sun Feb 21 20:52:31 2010
@@ -29,6 +29,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -292,7 +293,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         try
@@ -311,7 +312,7 @@
             if ( ( initialSubstrings == null ) && ( ( anySubstrings == null ) || ( anySubstrings.size() == 0 ) )
                 && ( finalSubstrings == null ) )
             {
-                throw new EncoderException( "Cannot have a null initial, any and final substring" );
+                throw new EncoderException( I18n.err( I18n.ERR_04058 ) );
             }
 
             // The initial substring
@@ -346,7 +347,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04005 ) );
         }
 
         return buffer;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/ChangeType.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/ChangeType.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/ChangeType.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/ChangeType.java Sun Feb 21 20:52:31 2010
@@ -19,6 +19,8 @@
  */
 package org.apache.directory.shared.ldap.codec.search.controls;
 
+import org.apache.directory.shared.i18n.I18n;
+
 
 /**
  * Enumeration type for entry changes associates with the persistent search
@@ -100,7 +102,7 @@
             case ( MODDN_VALUE ):
                 return MODDN;
             default:
-                throw new IllegalArgumentException( "Undefined changeType value: " + value );
+                throw new IllegalArgumentException( I18n.err( I18n.ERR_04055, value ) );
         }
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControl.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControl.java Sun Feb 21 20:52:31 2010
@@ -27,6 +27,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
 import org.apache.directory.shared.ldap.codec.search.controls.ChangeType;
 import org.apache.directory.shared.ldap.name.LdapDN;
@@ -159,7 +160,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         // Encode the Control envelop

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/entryChange/EntryChangeControlGrammar.java Sun Feb 21 20:52:31 2010
@@ -34,6 +34,7 @@
 import org.apache.directory.shared.asn1.util.IntegerDecoderException;
 import org.apache.directory.shared.asn1.util.LongDecoder;
 import org.apache.directory.shared.asn1.util.LongDecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.search.controls.ChangeType;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -123,7 +124,7 @@
                             break;
 
                         default:
-                            String msg = "failed to decode the changeType for EntryChangeControl";
+                            String msg = I18n.err( I18n.ERR_04044 );
                             log.error( msg );
                             throw new DecoderException( msg );
                     }
@@ -133,7 +134,7 @@
                 }
                 catch ( IntegerDecoderException e )
                 {
-                    String msg = "failed to decode the changeType for EntryChangeControl";
+                    String msg = I18n.err( I18n.ERR_04044 );
                     log.error( msg, e );
                     throw new DecoderException( msg );
                 }
@@ -164,8 +165,8 @@
 
                 if ( changeType != ChangeType.MODDN )
                 {
-                    log.error( "The previousDN field should not contain anything if the changeType is not MODDN" );
-                    throw new DecoderException( "Previous DN is not allowed for this change type" );
+                    log.error( I18n.err( I18n.ERR_04045 ) );
+                    throw new DecoderException( I18n.err( I18n.ERR_04046 ));
                 }
                 else
                 {
@@ -178,8 +179,8 @@
                     }
                     catch ( InvalidNameException ine )
                     {
-                        log.error( "Bad Previous DN : '" + StringTools.dumpBytes( value.getData() ) );
-                        throw new DecoderException( "failed to decode the previous DN" );
+                        log.error( I18n.err( I18n.ERR_04047, StringTools.dumpBytes( value.getData() ) ) );
+                        throw new DecoderException( I18n.err( I18n.ERR_04048 ) );
                     }
 
                     if ( IS_DEBUG )
@@ -219,7 +220,7 @@
                 }
                 catch ( LongDecoderException e )
                 {
-                    String msg = "failed to decode the changeNumber for EntryChangeControl";
+                    String msg = I18n.err( I18n.ERR_04049 );
                     log.error( msg, e );
                     throw new DecoderException( msg );
                 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsControl.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsControl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsControl.java Sun Feb 21 20:52:31 2010
@@ -27,6 +27,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
 import org.apache.directory.shared.ldap.util.StringTools;
 
@@ -135,7 +136,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         // Encode the Control envelop

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsControlGrammar.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/pagedSearch/PagedResultsControlGrammar.java Sun Feb 21 20:52:31 2010
@@ -31,6 +31,7 @@
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.util.IntegerDecoder;
 import org.apache.directory.shared.asn1.util.IntegerDecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -127,7 +128,7 @@
                     }
                     catch ( IntegerDecoderException e )
                     {
-                        String msg = "failed to decode the size for PagedSearchControl";
+                        String msg = I18n.err( I18n.ERR_04050 );
                         log.error( msg, e );
                         throw new DecoderException( msg );
                     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchControl.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchControl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchControl.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
 import org.apache.directory.shared.ldap.codec.search.controls.ChangeType;
 
@@ -164,7 +165,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         // Encode the Control envelop

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchControlGrammar.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/persistentSearch/PersistentSearchControlGrammar.java Sun Feb 21 20:52:31 2010
@@ -33,6 +33,7 @@
 import org.apache.directory.shared.asn1.util.BooleanDecoderException;
 import org.apache.directory.shared.asn1.util.IntegerDecoder;
 import org.apache.directory.shared.asn1.util.IntegerDecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -129,7 +130,7 @@
                     }
                     catch ( IntegerDecoderException e )
                     {
-                        String msg = "failed to decode the changeTypes for PSearchControl";
+                        String msg = I18n.err( I18n.ERR_04051 );
                         log.error( msg, e );
                         throw new DecoderException( msg );
                     }
@@ -168,7 +169,7 @@
                     }
                     catch ( BooleanDecoderException e )
                     {
-                        String msg = "failed to decode the changesOnly for PSearchControl";
+                        String msg = I18n.err( I18n.ERR_04052 );
                         log.error( msg, e );
                         throw new DecoderException( msg );
                     }
@@ -210,7 +211,7 @@
                     }
                     catch ( BooleanDecoderException e )
                     {
-                        String msg = "failed to decode the returnECs for PSearchControl";
+                        String msg = I18n.err( I18n.ERR_04053 );
                         log.error( msg, e );
                         throw new DecoderException( msg );
                     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesControl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesControl.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesControl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesControl.java Sun Feb 21 20:52:31 2010
@@ -26,6 +26,7 @@
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
 
 
@@ -99,7 +100,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_04023 ) );
         }
 
         // Encode the Control envelop

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesControlGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesControlGrammar.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesControlGrammar.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/controls/subentries/SubentriesControlGrammar.java Sun Feb 21 20:52:31 2010
@@ -31,6 +31,7 @@
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.util.BooleanDecoder;
 import org.apache.directory.shared.asn1.util.BooleanDecoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -92,8 +93,7 @@
                     }
                     catch ( BooleanDecoderException bde )
                     {
-                        log.error( "The visibility flag {} is invalid : {}. It should be 0 or 255", StringTools
-                            .dumpBytes( value.getData() ), bde.getMessage() );
+                        log.error( I18n.err( I18n.ERR_04054, StringTools.dumpBytes( value.getData() ), bde.getMessage() ) );
 
                         // This will generate a PROTOCOL_ERROR
                         throw new DecoderException( bde.getMessage() );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestCodec.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestCodec.java Sun Feb 21 20:52:31 2010
@@ -24,6 +24,7 @@
 import java.nio.ByteBuffer;
 
 import org.apache.directory.shared.asn1.codec.EncoderException;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
@@ -100,7 +101,7 @@
         }
         catch ( BufferOverflowException boe )
         {
-            String msg = "The PDU buffer size is too small !";
+            String msg = I18n.err( I18n.ERR_04005 );
             LOGGER.error( msg );
             throw new EncoderException( msg );
         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java Sun Feb 21 20:52:31 2010
@@ -257,7 +257,7 @@
         }
         catch ( DecoderException de )
         {
-            assertEquals( "The current Value length is above the expected length", de.getMessage() );
+            assertEquals( "ERR_00008 The current Value length 48 is above the expected length 47", de.getMessage() );
             return;
         }
 
@@ -304,7 +304,7 @@
         }
         catch ( DecoderException de )
         {
-            assertEquals( "Bad transition !", de.getMessage() );
+            assertEquals( "ERR_00002 Bad transition !", de.getMessage() );
             return;
         }
 
@@ -350,7 +350,7 @@
         }
         catch ( DecoderException de )
         {
-            assertEquals( "Bad transition !", de.getMessage() );
+            assertEquals( "ERR_00002 Bad transition !", de.getMessage() );
             return;
         }
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java Sun Feb 21 20:52:31 2010
@@ -250,8 +250,8 @@
                     default:
                         String res = de.getMessage();
 
-                        if ( res.equals( "Bad transition !" ) || res.startsWith( "Universal tag " )
-                            || res.startsWith( "Truncated PDU" ) )
+                        if ( res.equals( "ERR_00002 Bad transition !" ) || res.startsWith( "Universal tag " )
+                            || res.startsWith( "ERR_00010 Truncated PDU" ) )
                         {
                             assertTrue( true );
                         }

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/bind/BindRequestTest.java Sun Feb 21 20:52:31 2010
@@ -301,7 +301,7 @@
         }
         catch ( DecoderException de )
         {
-            assertEquals( "Bad transition !", de.getMessage() );
+            assertEquals( "ERR_00002 Bad transition !", de.getMessage() );
             return;
         }
 

Modified: directory/shared/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/pom.xml?rev=912399&r1=912398&r2=912399&view=diff
==============================================================================
--- directory/shared/trunk/pom.xml (original)
+++ directory/shared/trunk/pom.xml Sun Feb 21 20:52:31 2010
@@ -65,6 +65,7 @@
   </issueManagement>
 
   <modules>
+    <module>i18n</module>
     <module>all</module>
     <module>asn1</module>
     <module>ldap</module>



Mime
View raw message