directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r902547 - in /directory/apacheds/trunk: i18n/src/main/resources/org/apache/directory/server/i18n/ protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/ protocol-kerberos/src/main/java/org/apache/directory/server/ker...
Date Sun, 24 Jan 2010 11:25:12 GMT
Author: felixk
Date: Sun Jan 24 11:25:11 2010
New Revision: 902547

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

Modified:
    directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosTcpDecoder.java
    directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsModel.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsModel.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchTimeLimitingMonitor.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiMechanismHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/plain/PlainSaslServer.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StartTlsHandler.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ssl/LdapsInitializer.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=902547&r1=902546&r2=902547&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 11:25:11 2010
@@ -672,43 +672,43 @@
 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=
-ERR_654=
-ERR_655=
-ERR_656=
-ERR_657=
-ERR_658=
-ERR_659=
-ERR_660=
-ERR_661=
-ERR_662=
-ERR_663=
-ERR_664=
-ERR_665=
-ERR_666=
-ERR_667=
-ERR_668=
-ERR_669=
-ERR_670=
-ERR_671=
-ERR_672=
-ERR_673=
-ERR_674=
-ERR_675=
-ERR_676=
-ERR_677=
-ERR_678=
-ERR_679=
-ERR_680=
-ERR_681=
-ERR_682=
-ERR_683=
-ERR_684=
-ERR_685=
-ERR_686=
-ERR_687=
+ERR_651=SamSubsystem not enabled with key integrity checker
+ERR_652=Entry has null SAM type
+ERR_653=Could not find property '{0}'
+ERR_654=Expecting entries with SAM type of {0} but got a type of entry with SAM type of {1}
+ERR_655=Could not find verifier class '{0}' for SamType( {1} ) 
+ERR_656=No public default constructor on class '{0}' for SamType( {1} ) 
+ERR_657=Failed on default constructor invocation for class '{0}' for SamType( {1} ) 
+ERR_658=column index max is {0}
+ERR_659=Service principal {0} not found at search base DN {1}.
+ERR_660=Cannot receive NTLM message before sending Type 2 challenge.
+ERR_661=Cannot receive NTLM message after Type 3 has been received.
+ERR_662=Sasl challenge response already completed.
+ERR_663=Cannot send Type 2 challenge before Type 1 response.
+ERR_664=Cannot send Type 2 after it's already sent.
+ERR_665=Sasl challenge response already completed.
+ERR_666=response was null
+ERR_667=response with zero bytes
+ERR_668=There was a failure during NTLM Type 1 message handling.
+ERR_669=There was a failure during NTLM Type 3 message handling.
+ERR_670=Authentication attempted but the credentials were invalid..
+ERR_671=response with no auhcid or no password
+ERR_672='0' chars are not allowed in authcid or no password
+ERR_673=response with no auhcid or no password
+ERR_674=The given InitialReponse is incorrect
+ERR_675=Cannot authenticate an invalid authcid DN
+ERR_676=Cannot authenticate the user {0}
+ERR_677=Failed authorization in callback handler.
+ERR_678=Failed on keystore load which should never really happen.
+ERR_679=Failed to create KeyManagerFactory
+ERR_680=Failed to initialize KeyManagerFactory
+ERR_681=Failed to create SSLContext
+ERR_682=Failed to initialize SSLContext
+ERR_683=Failed to create a SSL context.
+ERR_684=Although ExtendedRequests are SingleReplyRequests they're not handled using this
base class. They have no target entry unlike the rest of the SingleReplyRequests
+ERR_685=Unidentified single reply request/response type: {0}
+ERR_686=Unexpected base scope.
+ERR_687=TimeUnit not supported: {0}
 ERR_688=
 ERR_689=
 ERR_690=

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosTcpDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosTcpDecoder.java?rev=902547&r1=902546&r2=902547&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosTcpDecoder.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosTcpDecoder.java
Sun Jan 24 11:25:11 2010
@@ -20,6 +20,7 @@
 package org.apache.directory.server.kerberos.protocol;
 
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.io.decoder.KdcRequestDecoder;
 import org.apache.mina.core.buffer.IoBuffer;
 import org.apache.mina.core.session.IoSession;
@@ -67,7 +68,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-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java?rev=902547&r1=902546&r2=902547&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
(original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/sam/SamSubsystem.java
Sun Jan 24 11:25:11 2010
@@ -28,6 +28,7 @@
 import javax.naming.directory.DirContext;
 import javax.security.auth.kerberos.KerberosKey;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.messages.value.SamType;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
 
@@ -101,12 +102,12 @@
 
         if ( keyChecker == null )
         {
-            throw new IllegalStateException( "SamSubsystem not enabled with key integrity
checker" );
+            throw new IllegalStateException( I18n.err( I18n.ERR_651 ) );
         }
 
         if ( entry.getSamType() == null )
         {
-            throw new SamException( entry.getSamType(), "Entry has null SAM type" );
+            throw new SamException( entry.getSamType(), I18n.err( I18n.ERR_652 ) );
         }
 
         if ( verifiers.containsKey( entry.getSamType() ) )
@@ -131,7 +132,7 @@
 
         if ( !env.containsKey( key ) )
         {
-            String msg = "Could not find property '" + key + "'";
+            String msg = I18n.err( I18n.ERR_653, key );
 
             throw new SamException( entry.getSamType(), msg );
         }
@@ -160,9 +161,7 @@
 
             if ( !verifier.getSamType().equals( entry.getSamType() ) )
             {
-                String msg = "Expecting entries with SAM type of " + verifier.getSamType();
-
-                msg += " but got a type of entry with SAM type of " + entry.getSamType();
+                String msg = I18n.err( I18n.ERR_654, verifier.getSamType(), entry.getSamType()
);
 
                 throw new SamException( entry.getSamType(), msg );
             }
@@ -173,25 +172,19 @@
         }
         catch ( ClassNotFoundException e )
         {
-            String msg = "Could not find verifier class '" + fqcn;
-
-            msg += "' for SamType( " + entry.getSamType() + " ) ";
+            String msg = I18n.err( I18n.ERR_655, fqcn, entry.getSamType() );
 
             throw new SamException( entry.getSamType(), msg, e );
         }
         catch ( IllegalAccessException e )
         {
-            String msg = "No public default constructor on class '" + fqcn;
-
-            msg += "' for SamType( " + entry.getSamType() + " ) ";
+            String msg = I18n.err( I18n.ERR_656, fqcn, entry.getSamType() );
 
             throw new SamException( entry.getSamType(), msg, e );
         }
         catch ( InstantiationException e )
         {
-            String msg = "Failed on default constructor invocation for class '" + fqcn;
-
-            msg += "' for SamType( " + entry.getSamType() + " ) ";
+            String msg = I18n.err( I18n.ERR_657, fqcn, entry.getSamType() );
 
             throw new SamException( entry.getSamType(), msg, e );
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsModel.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsModel.java?rev=902547&r1=902546&r2=902547&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsModel.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/OutstandingRequestsModel.java
Sun Jan 24 11:25:11 2010
@@ -23,6 +23,7 @@
 import javax.swing.event.TableModelListener;
 import javax.swing.table.TableModel;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.message.InternalAbandonableRequest;
 
 
@@ -88,7 +89,7 @@
             case ( 1 ):
                 return req.getType().toString();
             default:
-                throw new IndexOutOfBoundsException( "column index max is " + ( columns.length
- 1 ) );
+                throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_658, ( columns.length
- 1 ) ) );
         }
     }
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsModel.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsModel.java?rev=902547&r1=902546&r2=902547&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsModel.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsModel.java
Sun Jan 24 11:25:11 2010
@@ -25,6 +25,7 @@
 import javax.swing.event.TableModelListener;
 import javax.swing.table.TableModel;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.LdapSession;
 
 
@@ -94,7 +95,7 @@
             case ( 3 ):
                 return new Integer( ( ( InetSocketAddress ) session.getIoSession().getLocalAddress()
).getPort() );
             default:
-                throw new IndexOutOfBoundsException( "column index max is " + ( columns.length
- 1 ) );
+                throw new IndexOutOfBoundsException( I18n.err( I18n.ERR_658, ( columns.length
- 1 ) ) );
         }
     }
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java?rev=902547&r1=902546&r2=902547&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ReferralAwareRequestHandler.java
Sun Jan 24 11:25:11 2010
@@ -97,14 +97,10 @@
                     break;
 
                 case EXTENDED_REQ:
-                    throw new IllegalStateException( 
-                        "Although ExtendedRequests are SingleReplyRequests they're not handled"
+
-                        " using this base class.  They have no target entry unlike the rest
of" +
-                        " the SingleReplyRequests" );
+                    throw new IllegalStateException( I18n.err( I18n.ERR_684 ) );
                     
                 default:
-                    throw new IllegalStateException( 
-                        "Unidentified single reply request/response type: " + req );
+                    throw new IllegalStateException( I18n.err( I18n.ERR_685, req ) );
             }
             
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java?rev=902547&r1=902546&r2=902547&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchHandler.java
Sun Jan 24 11:25:11 2010
@@ -806,7 +806,7 @@
                         break;
                         
                     default:
-                        throw new IllegalStateException( "Unexpected base scope." );
+                        throw new IllegalStateException( I18n.err( I18n.ERR_686 ) );
                 }
                 
                 respRef.getReferral().addLdapUrl( ldapUrl.toString() );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchTimeLimitingMonitor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchTimeLimitingMonitor.java?rev=902547&r1=902546&r2=902547&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchTimeLimitingMonitor.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/SearchTimeLimitingMonitor.java
Sun Jan 24 11:25:11 2010
@@ -22,6 +22,7 @@
 
 import java.util.concurrent.TimeUnit;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.cursor.ClosureMonitor;
 import org.apache.directory.shared.ldap.cursor.CursorClosedException;
 import org.apache.directory.shared.ldap.exception.LdapTimeLimitExceededException;
@@ -63,7 +64,7 @@
                 this.millisToLive = timeToLive * 1000;
                 break;
             default:
-                throw new IllegalStateException( "TimeUnit not supported: " + unit );
+                throw new IllegalStateException( I18n.err( I18n.ERR_687, unit ) );
         }
     }
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java?rev=902547&r1=902546&r2=902547&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
Sun Jan 24 11:25:11 2010
@@ -23,6 +23,7 @@
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -213,7 +214,7 @@
                 catch ( Exception e )
                 {
                     // TODO - figure out how to handle this properly.
-                    throw new RuntimeException( "Failed authorization in callback handler.",
e );
+                    throw new RuntimeException( I18n.err( I18n.ERR_677 ), e );
                 }
             }
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiMechanismHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiMechanismHandler.java?rev=902547&r1=902546&r2=902547&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiMechanismHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/gssapi/GssapiMechanismHandler.java
Sun Jan 24 11:25:11 2010
@@ -32,6 +32,7 @@
 import javax.security.sasl.SaslServer;
 
 import org.apache.directory.server.core.CoreSession;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
@@ -137,15 +138,13 @@
         }
         catch ( ServiceConfigurationException sce )
         {
-            String message = "Service principal " + servicePrincipalName + " not found at
search base DN "
-                + ldapServer.getSearchBaseDn() + ".";
+            String message = I18n.err( I18n.ERR_659, servicePrincipalName, ldapServer.getSearchBaseDn()
);
             throw new ServiceConfigurationException( message, sce );
         }
 
         if ( entry == null )
         {
-            String message = "Service principal " + servicePrincipalName + " not found at
search base DN "
-                + ldapServer.getSearchBaseDn() + ".";
+            String message = I18n.err( I18n.ERR_659, servicePrincipalName, ldapServer.getSearchBaseDn()
);
             throw new ServiceConfigurationException( message );
         }
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java?rev=902547&r1=902546&r2=902547&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/ntlm/NtlmSaslServer.java
Sun Jan 24 11:25:11 2010
@@ -27,6 +27,7 @@
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.server.ldap.handlers.bind.AbstractSaslServer;
 import org.apache.directory.server.ldap.handlers.bind.SaslConstants;
@@ -80,17 +81,17 @@
                 break;
                 
             case TYPE_1_RECEIVED:
-                throw new IllegalStateException( "Cannot receive NTLM message before sending
Type 2 challenge." );
+                throw new IllegalStateException( I18n.err( I18n.ERR_660 ) );
                 
             case TYPE_2_SENT:
                 state = NegotiationState.TYPE_3_RECEIVED;
                 break;
                 
             case TYPE_3_RECEIVED:
-                throw new IllegalStateException( "Cannot receive NTLM message after Type
3 has been received." );
+                throw new IllegalStateException( I18n.err( I18n.ERR_661 ) );
                 
             case COMPLETED:
-                throw new IllegalStateException( "Sasl challenge response already completed."
);
+                throw new IllegalStateException( I18n.err( I18n.ERR_662 ) );
         }
     }
 
@@ -100,21 +101,21 @@
         switch ( state )
         {
             case INITIALIZED:
-                throw new IllegalStateException( "Cannot send Type 2 challenge before Type
1 response." );
+                throw new IllegalStateException( I18n.err( I18n.ERR_663 ) );
                 
             case TYPE_1_RECEIVED:
                 state = NegotiationState.TYPE_2_SENT;
                 break;
                 
             case TYPE_2_SENT:
-                throw new IllegalStateException( "Cannot send Type 2 after it's already sent."
);
+                throw new IllegalStateException( I18n.err( I18n.ERR_664 ) );
                 
             case TYPE_3_RECEIVED:
                 state = NegotiationState.COMPLETED;
                 break;
                 
             case COMPLETED:
-                throw new IllegalStateException( "Sasl challenge response already completed."
);
+                throw new IllegalStateException( I18n.err( I18n.ERR_665 ) );
         }
     }
 
@@ -126,12 +127,12 @@
     {
         if ( response == null )
         {
-            throw new NullPointerException( "response was null" );
+            throw new NullPointerException( I18n.err( I18n.ERR_666 ) );
         }
 
         if ( response.length == 0 )
         {
-            throw new IllegalArgumentException( "response with zero bytes" );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_667 ) );
         }
 
         responseRecieved();
@@ -146,7 +147,7 @@
                 }
                 catch ( Exception e )
                 {
-                    throw new SaslException( "There was a failure during NTLM Type 1 message
handling.", e );
+                    throw new SaslException( I18n.err( I18n.ERR_668 ), e );
                 }
                 
                 break;
@@ -164,12 +165,12 @@
                 }
                 catch ( Exception e )
                 {
-                    throw new SaslException( "There was a failure during NTLM Type 3 message
handling.", e );
+                    throw new SaslException( I18n.err( I18n.ERR_669 ), e );
                 }
 
                 if ( ! result )
                 {
-                    throw new SaslException( "Authentication attempted but the credentials
were invalid.." );
+                    throw new SaslException( I18n.err( I18n.ERR_670 ) );
                 }
                 
                 break;

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/plain/PlainSaslServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/plain/PlainSaslServer.java?rev=902547&r1=902546&r2=902547&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/plain/PlainSaslServer.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/plain/PlainSaslServer.java
Sun Jan 24 11:25:11 2010
@@ -24,6 +24,7 @@
 
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.server.ldap.handlers.bind.AbstractSaslServer;
 import org.apache.directory.shared.ldap.constants.SupportedSaslMechanisms;
@@ -152,7 +153,7 @@
                             else
                             {
                                 // This not allowed
-                                throw new IllegalArgumentException( "response with no auhcid
or no password" );
+                                throw new IllegalArgumentException( I18n.err( I18n.ERR_671
) );
                             }
                         }
                         else
@@ -179,7 +180,7 @@
                                     
                                 default :
                                     // This is an error !
-                                    throw new IllegalArgumentException( "'\0' chars are not
allowed in authcid or no password" );
+                                    throw new IllegalArgumentException( I18n.err( I18n.ERR_672
) );
                             }
                         }
                     }
@@ -191,7 +192,7 @@
             
                 if ( start == end )
                 {
-                    throw new IllegalArgumentException( "response with no auhcid or no password"
);
+                    throw new IllegalArgumentException( I18n.err( I18n.ERR_673 ) );
                 }
                 
                 start++;
@@ -201,7 +202,7 @@
                 
                 if ( ( authcId == null ) || ( password == null ) )
                 {
-                    throw new IllegalArgumentException( "response with no auhcid or no password"
);
+                    throw new IllegalArgumentException( I18n.err( I18n.ERR_673 ) );
                 }
                 
                 // Now that we have the authcid and password, try to authenticate.
@@ -213,15 +214,15 @@
             }
             catch ( IOException ioe )
             {
-                throw new IllegalArgumentException( "The given InitialReponse is incorrect"
);
+                throw new IllegalArgumentException( I18n.err( I18n.ERR_674 ) );
             }
             catch ( InvalidNameException ine )
             {
-                throw new IllegalArgumentException( "Cannot authenticate an invalid authcid
DN" );
+                throw new IllegalArgumentException( I18n.err( I18n.ERR_675 ) );
             }
             catch ( Exception e )
             {
-                throw new SaslException( "Cannot authenticate the user " + authcId );
+                throw new SaslException( I18n.err( I18n.ERR_676, authcId ) );
             }
         }
 

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StartTlsHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StartTlsHandler.java?rev=902547&r1=902546&r2=902547&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StartTlsHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StartTlsHandler.java
Sun Jan 24 11:25:11 2010
@@ -36,6 +36,7 @@
 import javax.net.ssl.X509TrustManager;
 
 import org.apache.directory.server.core.security.CoreKeyStoreSpi;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.ExtendedOperationHandler;
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.server.ldap.LdapSession;
@@ -151,7 +152,7 @@
         }
         catch ( Exception e1 )
         {
-            throw new RuntimeException( "Failed on keystore load which should never really
happen." );
+            throw new RuntimeException( I18n.err( I18n.ERR_678 ) );
         }
         
         KeyManagerFactory keyManagerFactory = null;
@@ -161,7 +162,7 @@
         }
         catch ( Exception e )
         {
-            throw new RuntimeException( "Failed to create KeyManagerFactory", e );
+            throw new RuntimeException( I18n.err( I18n.ERR_679 ), e );
         }
         
         try
@@ -170,7 +171,7 @@
         }
         catch ( Exception e )
         {
-            throw new RuntimeException( "Failed to initialize KeyManagerFactory", e );
+            throw new RuntimeException( I18n.err( I18n.ERR_680 ), e );
         }
         
         try
@@ -179,7 +180,7 @@
         }
         catch ( Exception e )
         {
-            throw new RuntimeException( "Failed to create SSLContext", e );
+            throw new RuntimeException( I18n.err( I18n.ERR_681 ), e );
         }
         
         try
@@ -190,7 +191,7 @@
         }
         catch ( Exception e )
         {
-            throw new RuntimeException( "Failed to initialize SSLContext", e );
+            throw new RuntimeException( I18n.err( I18n.ERR_682 ), e );
         }
     }
 }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ssl/LdapsInitializer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ssl/LdapsInitializer.java?rev=902547&r1=902546&r2=902547&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ssl/LdapsInitializer.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/ssl/LdapsInitializer.java
Sun Jan 24 11:25:11 2010
@@ -29,6 +29,7 @@
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.TrustManager;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.mina.core.filterchain.DefaultIoFilterChainBuilder;
 import org.apache.mina.core.filterchain.IoFilterChainBuilder;
@@ -76,7 +77,7 @@
         }
         catch ( Exception e )
         {
-            throw ( NamingException ) new NamingException( "Failed to create a SSL context."
).initCause( e );
+            throw ( NamingException ) new NamingException( I18n.err( I18n.ERR_683 ) ).initCause(
e );
         }
 
         DefaultIoFilterChainBuilder chain = new DefaultIoFilterChainBuilder();



Mime
View raw message