directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r902546 - in /directory/apacheds/trunk: i18n/src/main/resources/org/apache/directory/server/i18n/ protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/ protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/ ...
Date Sun, 24 Jan 2010 10:44:42 GMT
Author: felixk
Date: Sun Jan 24 10:44:42 2010
New Revision: 902546

URL: http://svn.apache.org/viewvc?rev=902546&view=rev
Log:
I18n

Modified:
    directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/DnsMessageDecoder.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsTcpDecoder.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/SingleBaseSearch.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/operations/GetRecords.java
    directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/ReverseEnumMap.java

Modified: directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties?rev=902546&r1=902545&r2=902546&view=diff
==============================================================================
--- directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties
(original)
+++ directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties
Sun Jan 24 10:44:42 2010
@@ -664,14 +664,14 @@
 ERR_640=Can't initialize option field classes
 ERR_641=Max data length: 128 bytes.
 ERR_642=ASCII encoding unavailable
-ERR_643=
-ERR_644=
-ERR_645=
-ERR_646=
-ERR_647=
-ERR_648=
-ERR_649=
-ERR_650=
+ERR_643=Decoder unavailable for {0}
+ERR_644=Encoder unavailable for {0}
+ERR_645=maxObjectSize: {0}
+ERR_646=Record type to objectClass mapping has not been set.
+ERR_647=ResourceRecord requires STRUCTURAL objectClass
+ERR_648=Invalid search base {0}
+ERR_649=Can't get context at {0}
+ERR_650=Invalid enum value: {0}
 ERR_651=
 ERR_652=
 ERR_653=

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/DnsMessageDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/DnsMessageDecoder.java?rev=902546&r1=902545&r2=902546&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/DnsMessageDecoder.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/DnsMessageDecoder.java
Sun Jan 24 10:44:42 2010
@@ -38,6 +38,7 @@
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.messages.ResourceRecordImpl;
 import org.apache.directory.server.dns.messages.ResponseCode;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.mina.core.buffer.IoBuffer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -147,7 +148,7 @@
 
         if ( recordDecoder == null )
         {
-            throw new IllegalArgumentException( "Decoder unavailable for " + type );
+            throw new IllegalArgumentException( I18n.err(I18n.ERR_643, type ) );
         }
 
         return recordDecoder.decode( byteBuffer, length );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java?rev=902546&r1=902545&r2=902546&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java
Sun Jan 24 10:44:42 2010
@@ -35,6 +35,7 @@
 import org.apache.directory.server.dns.messages.RecordType;
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.messages.ResponseCode;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.mina.core.buffer.IoBuffer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -166,7 +167,7 @@
 
         if ( encoder == null )
         {
-            throw new IOException( "Encoder unavailable for " + type );
+            throw new IOException( I18n.err( I18n.ERR_644, type ) );
         }
 
         encoder.put( byteBuffer, record );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsTcpDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsTcpDecoder.java?rev=902546&r1=902545&r2=902546&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsTcpDecoder.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsTcpDecoder.java
Sun Jan 24 10:44:42 2010
@@ -22,6 +22,7 @@
 
 
 import org.apache.directory.server.dns.io.decoder.DnsMessageDecoder;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.mina.core.buffer.IoBuffer;
 import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.CumulativeProtocolDecoder;
@@ -68,7 +69,7 @@
     {
         if ( maxObjectSize <= 0 )
         {
-            throw new IllegalArgumentException( "maxObjectSize: " + maxObjectSize );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_645, maxObjectSize ) );
         }
 
         this.maxObjectSize = maxObjectSize;

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/SingleBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/SingleBaseSearch.java?rev=902546&r1=902545&r2=902546&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/SingleBaseSearch.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/SingleBaseSearch.java
Sun Jan 24 10:44:42 2010
@@ -33,6 +33,7 @@
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.messages.ResponseCode;
 import org.apache.directory.server.dns.store.jndi.operations.GetRecords;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.protocol.shared.ServiceConfigurationException;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.slf4j.Logger;
@@ -64,7 +65,7 @@
             ctx = new ServerLdapContext( directoryService, session, new LdapDN( searchBaseDn
) );
         } catch ( Exception e )
         {
-            throw new ServiceConfigurationException( "Can't get context at" + searchBaseDn,
e );
+            throw new ServiceConfigurationException( I18n.err( I18n.ERR_649, searchBaseDn
), e );
         }
 
     }

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/operations/GetRecords.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/operations/GetRecords.java?rev=902546&r1=902545&r2=902546&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/operations/GetRecords.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/operations/GetRecords.java
Sun Jan 24 10:44:42 2010
@@ -45,6 +45,7 @@
 import org.apache.directory.server.dns.messages.ResourceRecordModifier;
 import org.apache.directory.server.dns.store.DnsAttribute;
 import org.apache.directory.server.dns.store.jndi.DnsOperation;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 
 
@@ -272,14 +273,14 @@
 
                 if ( type == null )
                 {
-                    throw new RuntimeException( "Record type to objectClass mapping has not
been set." );
+                    throw new RuntimeException( I18n.err( I18n.ERR_646 ) );
                 }
 
                 return type;
             }
         }
 
-        throw new NamingException( "ResourceRecord requires STRUCTURAL objectClass" );
+        throw new NamingException( I18n.err( I18n.ERR_647 ) );
     }
 
 
@@ -298,7 +299,7 @@
 
         if ( !searchBaseDn.startsWith( ctxRoot ) )
         {
-            throw new NamingException( "Invalid search base " + baseDn );
+            throw new NamingException( I18n.err( I18n.ERR_648, baseDn ) );
         }
 
         for ( int ii = 0; ii < ctxRoot.size(); ii++ )

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/ReverseEnumMap.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/ReverseEnumMap.java?rev=902546&r1=902545&r2=902546&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/ReverseEnumMap.java
(original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/util/ReverseEnumMap.java
Sun Jan 24 10:44:42 2010
@@ -24,6 +24,8 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.directory.server.i18n.I18n;
+
 
 /**
  * A map to easily get the actual Enum instance from it's value as seen in the
@@ -65,7 +67,7 @@
         E e = reverseMap.get( value );
         if ( e == null )
         {
-            throw new IllegalArgumentException( "Invalid enum value: " + value );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_650, value ) );
         }
         return e;
     }



Mime
View raw message