directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r901508 - in /directory/sandbox/felixk/apacheds-i18n: core-annotations/ core-annotations/src/main/java/org/apache/directory/server/core/factory/ core/ core/src/main/java/org/apache/directory/server/core/ core/src/main/java/org/apache/direct...
Date Thu, 21 Jan 2010 03:00:13 GMT
Author: felixk
Date: Thu Jan 21 02:59:05 2010
New Revision: 901508

URL: http://svn.apache.org/viewvc?rev=901508&view=rev
Log:
Some i18n extractions ...

Modified:
    directory/sandbox/felixk/apacheds-i18n/core-annotations/pom.xml
    directory/sandbox/felixk/apacheds-i18n/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
    directory/sandbox/felixk/apacheds-i18n/core/pom.xml
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/changelog/DefaultChangeLog.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/security/CoreKeyStoreSpi.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
    directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
    directory/sandbox/felixk/apacheds-i18n/i18n/src/main/java/org/apache/directory/server/i18n/Err.java
    directory/sandbox/felixk/apacheds-i18n/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties

Modified: directory/sandbox/felixk/apacheds-i18n/core-annotations/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-annotations/pom.xml?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-annotations/pom.xml (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-annotations/pom.xml Thu Jan 21 02:59:05 2010
@@ -25,6 +25,12 @@
 
     <dependency>
       <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-i18n</artifactId>
+      <version>${pom.version}</version>
+    </dependency>  
+
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-core-jndi</artifactId>
       <version>${pom.version}</version>
     </dependency>  

Modified: directory/sandbox/felixk/apacheds-i18n/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java Thu Jan 21 02:59:05 2010
@@ -37,6 +37,7 @@
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
@@ -260,7 +261,7 @@
                 }
                 catch ( Exception e )
                 {
-                    LOG.error( "Cannot inject the following entry : {}. Error : {}.", ldifFile, e.getMessage() );
+                    LOG.error( Err.i18n( Err.ERR_80, ldifFile, e.getMessage() ) );
                 }
             }
         }

Modified: directory/sandbox/felixk/apacheds-i18n/core/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/pom.xml?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/pom.xml (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/pom.xml Thu Jan 21 02:59:05 2010
@@ -39,6 +39,12 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-i18n</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-core-api</artifactId>
       <version>${pom.version}</version>
     </dependency>

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Thu Jan 21 02:59:05 2010
@@ -74,6 +74,7 @@
 import org.apache.directory.server.core.security.TlsKeyGenerator;
 import org.apache.directory.server.core.subtree.SubentryInterceptor;
 import org.apache.directory.server.core.trigger.TriggerInterceptor;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
@@ -268,7 +269,7 @@
                 }
                 catch ( Exception e )
                 {
-                    LOG.error( "SynchWorker failed to synch directory.", e );
+                    LOG.error( Err.i18n( Err.ERR_74 ), e );
                 }
             }
         }
@@ -844,17 +845,15 @@
                             break;
                             
                         default:
-                            LOG.error( "ChangeType unknown" );
-                            throw new NotImplementedException( "Reverts of change type " + reverse.getChangeType()
-                                    + " has not yet been implemented!");
+                            LOG.error( Err.i18n( Err.ERR_75 ) );
+                            throw new NotImplementedException( Err.i18n( Err.ERR_76, reverse.getChangeType() ) );
                     }
                 }
             }
         }
         catch ( IOException e )
         {
-            String message = "Encountered a failure while trying to revert to a previous revision: "
-                + revision;
+            String message = Err.i18n( Err.ERR_77, revision );
             LOG.error( message );
             throw new NamingException( message );
         }
@@ -1566,7 +1565,7 @@
         }
         catch ( Exception e )
         {
-            LOG.error( "Cannot build an entry for '{}' and this DN :'{}'", ldif, dn );
+            LOG.error( Err.i18n( Err.ERR_78, ldif, dn ) );
             // do nothing
             return null;
         }
@@ -1671,7 +1670,7 @@
     {
         if ( ( replicaId < 0 ) || ( replicaId > 999 ) )
         {
-            LOG.error( "The replicaId must be in [0, 999]" );
+            LOG.error( Err.i18n( Err.ERR_79 ) );
             this.replicaId = 0;
         }
         else

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java Thu Jan 21 02:59:05 2010
@@ -53,6 +53,7 @@
 import org.apache.directory.server.core.interceptor.context.OperationContext;
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.exception.LdapAuthenticationException;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
@@ -416,8 +417,8 @@
         if ( operation.getSession().isAnonymous() && !directoryService.isAllowAnonymousAccess() 
             && !operation.getDn().isEmpty() )
         {
-            LOG.error( "Attempted operation {} by unauthenticated caller.", operation.getName() );
-            throw new LdapNoPermissionException( "Attempted operation by unauthenticated caller." );
+            LOG.error( Err.i18n( Err.ERR_5, operation.getName() ) );
+            throw new LdapNoPermissionException( Err.i18n( Err.ERR_5, operation.getName() ) );
         }
     }
 

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java Thu Jan 21 02:59:05 2010
@@ -48,6 +48,7 @@
 import org.apache.directory.server.core.schema.SchemaInterceptor;
 import org.apache.directory.server.core.subtree.SubentryInterceptor;
 import org.apache.directory.server.core.trigger.TriggerInterceptor;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.LdapSecurityConstants;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
@@ -612,7 +613,7 @@
         }
         catch ( Exception cause )
         {
-            LOG.error( "Authentication error : " + cause.getMessage() );
+            LOG.error( Err.i18n( Err.ERR_6, cause.getMessage() ) );
             LdapAuthenticationException e = new LdapAuthenticationException( cause.getMessage() );
             e.setRootCause( e );
             throw e;
@@ -723,7 +724,7 @@
         }
         catch ( NoSuchAlgorithmException nsae )
         {
-            LOG.error( "Cannot create a digested password for algorithm '{}'", algorithm );
+            LOG.error( Err.i18n( Err.ERR_7, algorithm ) );
             throw new IllegalArgumentException( nsae.getMessage() );
         }
     }

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java Thu Jan 21 02:59:05 2010
@@ -61,6 +61,7 @@
 import org.apache.directory.server.core.interceptor.context.SearchingOperationContext;
 import org.apache.directory.server.core.partition.ByPassConstants;
 import org.apache.directory.server.core.subtree.SubentryInterceptor;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.aci.ACIItem;
 import org.apache.directory.shared.ldap.aci.ACIItemParser;
 import org.apache.directory.shared.ldap.aci.ACITuple;
@@ -233,17 +234,14 @@
 
         if ( dn.isEmpty() )
         {
-            String msg = "The rootDSE cannot be deleted, moved or renamed!";
+            String msg = Err.i18n( Err.ERR_8 );
             LOG.error( msg );
             throw new LdapNoPermissionException( msg );
         }
 
         if ( isTheAdministrator( dn ) )
         {
-            String msg = "User '" + principalDn.getName();
-            msg += "' does not have permission to move or rename the admin";
-            msg += " account.  No one not even the admin can del, move or";
-            msg += " rename " + dn.getName() + "!";
+            String msg = Err.i18n( Err.ERR_9, principalDn.getName(), dn.getName() );
             LOG.error( msg );
             throw new LdapNoPermissionException( msg );
         }
@@ -337,7 +335,7 @@
             }
             catch ( ParseException e )
             {
-                String msg = "failed to parse entryACI: " + aciString;
+                String msg = Err.i18n( Err.ERR_10, aciString );
                 LOG.error( msg, e );
                 throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONS_ERROR );
             }
@@ -390,7 +388,7 @@
             }
             catch ( ParseException e )
             {
-                String msg = "failed to parse subentryACI: " + aciString;
+                String msg = Err.i18n( Err.ERR_11, aciString );
                 LOG.error( msg, e );
                 throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONS_ERROR );
             }

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/DefaultAuthorizationInterceptor.java Thu Jan 21 02:59:05 2010
@@ -49,6 +49,7 @@
 import org.apache.directory.server.core.interceptor.context.SearchingOperationContext;
 import org.apache.directory.server.core.partition.DefaultPartitionNexus;
 import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -176,23 +177,21 @@
 
         if ( name.isEmpty() )
         {
-            String msg = "The rootDSE cannot be deleted!";
+            String msg = Err.i18n( Err.ERR_12 );
             LOG.error( msg );
             throw new LdapNoPermissionException( msg );
         }
 
         if ( name.getNormName().equals( ADMIN_GROUP_DN.getNormName() ) )
         {
-            String msg = "The Administrators group cannot be deleted!";
+            String msg = Err.i18n( Err.ERR_13 );
             LOG.error( msg );
             throw new LdapNoPermissionException( msg );
         }
 
         if ( isTheAdministrator( name ) )
         {
-            String msg = "User " + principalDn.getName();
-            msg += " does not have permission to delete the admin account.";
-            msg += " No one not even the admin can delete this account!";
+            String msg = Err.i18n( Err.ERR_14, principalDn.getName() );
             LOG.error( msg );
             throw new LdapNoPermissionException( msg );
         }
@@ -203,18 +202,14 @@
             {
                 if ( name.startsWith( USER_BASE_DN ) )
                 {
-                    String msg = "User " + principalDn.getName();
-                    msg += " does not have permission to delete the user account: ";
-                    msg += name.getName() + ". Only the admin can delete user accounts.";
+                    String msg = Err.i18n( Err.ERR_15, principalDn.getName(), name.getName() );
                     LOG.error( msg );
                     throw new LdapNoPermissionException( msg );
                 }
         
                 if ( name.startsWith( GROUP_BASE_DN ) )
                 {
-                    String msg = "User " + principalDn.getName();
-                    msg += " does not have permission to delete the group entry: ";
-                    msg += name.getName() + ". Only the admin can delete groups.";
+                    String msg = Err.i18n( Err.ERR_16, principalDn.getName(), name.getName() );
                     LOG.error( msg );
                     throw new LdapNoPermissionException( msg );
                 }
@@ -277,7 +272,7 @@
 
         if ( dn.isEmpty() )
         {
-            String msg = "The rootDSE cannot be modified!";
+            String msg = Err.i18n( Err.ERR_17 );
             LOG.error( msg );
             throw new LdapNoPermissionException( msg );
         }
@@ -292,9 +287,7 @@
             
             if ( dn.getNormName().equals( ServerDNConstants.ADMIN_SYSTEM_DN_NORMALIZED ) )
             {
-                String msg = "User " + principalDn.getName();
-                msg += " does not have permission to modify the account of the";
-                msg += " admin user.";
+                String msg = Err.i18n( Err.ERR_18, principalDn.getName() );
                 LOG.error( msg );
                 throw new LdapNoPermissionException( msg );
             }
@@ -303,20 +296,14 @@
                 {
                 if ( dn.startsWith( USER_BASE_DN ) )
                 {
-                    String msg = "User " + principalDn.getName();
-                    msg += " does not have permission to modify the account of the";
-                    msg += " user " + dn.getName() + ".\nEven the owner of an account cannot";
-                    msg += " modify it.\nUser accounts can only be modified by the";
-                    msg += " administrator.";
+                    String msg = Err.i18n( Err.ERR_19, principalDn.getName(),  dn.getName() );
                     LOG.error( msg );
                     throw new LdapNoPermissionException( msg );
                 }
     
                 if ( dn.startsWith( GROUP_BASE_DN ) )
                 {
-                    String msg = "User " + principalDn.getName();
-                    msg += " does not have permission to modify the group entry ";
-                    msg += dn.getName() + ".\nGroups can only be modified by the admin.";
+                    String msg = Err.i18n( Err.ERR_20, principalDn.getName(), dn.getName() );
                     LOG.error( msg );
                     throw new LdapNoPermissionException( msg );
                 }
@@ -381,36 +368,29 @@
 
         if ( dn.getNormName().equals( ADMIN_GROUP_DN.getNormName() ) )
         {
-            String msg = "The Administrators group cannot be moved or renamed!";
+            String msg = Err.i18n( Err.ERR_21 );
             LOG.error( msg );
             throw new LdapNoPermissionException( msg );
         }
         
         if ( isTheAdministrator( dn ) )
         {
-            String msg = "User '" + principalDn.getName();
-            msg += "' does not have permission to move or rename the admin";
-            msg += " account.  No one not even the admin can move or";
-            msg += " rename " + dn.getName() + "!";
+            String msg = Err.i18n( Err.ERR_22, principalDn.getName(), dn.getName() );
             LOG.error( msg );
             throw new LdapNoPermissionException( msg );
         }
 
         if ( dn.size() > 2 && dn.startsWith( USER_BASE_DN ) && !isAnAdministrator( principalDn ) )
         {
-            String msg = "User '" + principalDn.getName();
-            msg += "' does not have permission to move or rename the user";
-            msg += " account: " + dn.getName() + ". Only the admin can move or";
-            msg += " rename user accounts.";
+            String msg = Err.i18n( Err.ERR_23, principalDn.getName(), dn.getName() );
             LOG.error( msg );
             throw new LdapNoPermissionException( msg );
         }
 
         if ( dn.size() > 2 && dn.startsWith( GROUP_BASE_DN ) && !isAnAdministrator( principalDn ) )
         {
-            String msg = "User " + principalDn.getName();
-            msg += " does not have permission to move or rename the group entry ";
-            msg += dn.getName() + ".\nGroups can only be moved or renamed by the admin.";
+            String msg = Err.i18n( Err.ERR_24, principalDn.getName(), dn.getName() );
+            LOG.error( msg );
             throw new LdapNoPermissionException( msg );
         }
     }
@@ -444,9 +424,7 @@
                         return;
                     }
     
-                    String msg = "Access to user account '" + normalizedDn.getName() + "' not permitted";
-                    msg += " for user '" + principalDn.getName() + "'.  Only the admin can";
-                    msg += " access user account information";
+                    String msg = Err.i18n( Err.ERR_25, normalizedDn.getName(), principalDn.getName() );
                     LOG.error( msg );
                     throw new LdapNoPermissionException( msg );
                 }
@@ -459,9 +437,7 @@
                         return;
                     }
     
-                    String msg = "Access to group '" + normalizedDn.getName() + "' not permitted";
-                    msg += " for user '" + principalDn.getName() + "'.  Only the admin can";
-                    msg += " access group information";
+                    String msg = Err.i18n( Err.ERR_26, normalizedDn.getName(), principalDn.getName() );
                     LOG.error( msg );
                     throw new LdapNoPermissionException( msg );
                 }
@@ -475,9 +451,7 @@
                     return;
                 }
 
-                String msg = "Access to admin account not permitted for user '";
-                msg += principalDn.getName() + "'.  Only the admin can";
-                msg += " access admin account information";
+                String msg = Err.i18n( Err.ERR_27,  principalDn.getName() );
                 LOG.error( msg );
                 throw new LdapNoPermissionException( msg );
             }

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java Thu Jan 21 02:59:05 2010
@@ -37,6 +37,7 @@
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.aci.ACIItem;
 import org.apache.directory.shared.ldap.aci.ACIItemParser;
 import org.apache.directory.shared.ldap.aci.ACITuple;
@@ -198,10 +199,7 @@
             }
             catch ( ParseException e )
             {
-                String msg = "ACIItem parser failure on \n'" + item + "'\ndue to syntax error. "
-                    + "Cannnot add ACITuples to TupleCache.\n"
-                    + "Check that the syntax of the ACI item is correct. \nUntil this error "
-                    + "is fixed your security settings will not be as expected.";
+                String msg = Err.i18n( Err.ERR_28, item );
                 LOG.error( msg, e );
 
                 // do not process this ACI Item because it will be null

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/changelog/DefaultChangeLog.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/changelog/DefaultChangeLog.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/changelog/DefaultChangeLog.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/changelog/DefaultChangeLog.java Thu Jan 21 02:59:05 2010
@@ -24,6 +24,7 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.partition.Partition;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -96,7 +97,7 @@
     {
         if ( storeInitialized )
         {
-            LOG.error(  "Cannot set a changeLog store when one is already active" );
+            LOG.error( Err.i18n( Err.ERR_29 ) );
         }
         else
         {

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java Thu Jan 21 02:59:05 2010
@@ -49,6 +49,7 @@
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchingOperationContext;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
@@ -209,7 +210,7 @@
             if ( !isAdmin )
             {
                 // Wrong !
-                String message = "The " + SchemaConstants.ENTRY_UUID_AT + " operational attribute cannot be modified by a user";
+                String message = Err.i18n( Err.ERR_30, SchemaConstants.ENTRY_UUID_AT );
                 LOG.error( message );
                 throw new LdapSchemaViolationException( message, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS );
             }
@@ -224,7 +225,7 @@
             if ( !isAdmin )
             {
                 // Wrong !
-                String message = "The " + SchemaConstants.ENTRY_CSN_AT + " operational attribute cannot be modified by a user";
+                String message =  Err.i18n( Err.ERR_30, SchemaConstants.ENTRY_CSN_AT );
                 LOG.error( message );
                 throw new LdapSchemaViolationException( message, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS );
             }
@@ -257,14 +258,14 @@
             
             if ( attributeType.equals( MODIFIERS_NAME_ATTRIBUTE_TYPE ) )
             {
-                String message = "The ModifiersName operational attribute cannot be modified by a user";
+                String message = Err.i18n( Err.ERR_31 );
                 LOG.error( message );
                 throw new LdapSchemaViolationException( message, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS );
             }
 
             if ( attributeType.equals( MODIFY_TIMESTAMP_ATTRIBUTE_TYPE ) )
             {
-                String message = "The ModifyTimestamp operational attribute cannot be modified by a user";
+                String message = Err.i18n( Err.ERR_32 );
                 LOG.error( message );
                 throw new LdapSchemaViolationException( message, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS );
             }

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/partition/DefaultPartitionNexus.java Thu Jan 21 02:59:05 2010
@@ -66,6 +66,7 @@
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.interceptor.context.UnbindOperationContext;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.MultiException;
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
@@ -198,7 +199,7 @@
         }
         catch ( IOException e )
         {
-            LOG.error( "failed to LOG version properties" );
+            LOG.error( Err.i18n( Err.ERR_33 ) );
         }
 
         rootDSE.put( SchemaConstants.VENDOR_VERSION_AT, props.getProperty( "apacheds.version", "UNKNOWN" ) );
@@ -923,7 +924,7 @@
         
         if ( partition == null )
         {
-            String msg = "No partition with suffix: " + key;
+            String msg = Err.i18n( Err.ERR_34, key );
             LOG.error( msg );
             throw new NameNotFoundException( msg );
         }
@@ -942,8 +943,7 @@
             }
             else
             {
-                String msg = "No partition with suffix '" + key + 
-                                    "' can be found in the NamingContexts";
+                String msg = Err.i18n( Err.ERR_35, key );
                 LOG.error( msg );
                 throw new NameNotFoundException( msg );
             }

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/referral/ReferralInterceptor.java Thu Jan 21 02:59:05 2010
@@ -40,6 +40,7 @@
 import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
 import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.codec.util.LdapURLEncodingException;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -98,35 +99,35 @@
             // This is the default value if we don't have any scope
             // Let's assume that it's incorrect if we get something
             // else in the LdapURL
-            String message = "An LDAPURL should not contains a scope";
+            String message = Err.i18n( Err.ERR_36 );
             LOG.error( message );
             throw new NamingException( message );
         }
 
         if ( !StringTools.isEmpty( ldapUrl.getFilter() ) )
         {
-            String message = "An LDAPURL should not contains filters";
+            String message = Err.i18n( Err.ERR_37 );
             LOG.error( message );
             throw new NamingException( message );
         }
 
         if ( ( ldapUrl.getAttributes() != null ) && ( ldapUrl.getAttributes().size() != 0 ) )
         {
-            String message = "An LDAPURL should not contains any description attribute list";
+            String message = Err.i18n( Err.ERR_38 );
             LOG.error( message );
             throw new NamingException( message );
         }
 
         if ( ( ldapUrl.getExtensions() != null ) && ( ldapUrl.getExtensions().size() != 0 ) )
         {
-            String message = "An LDAPURL should not contains any extension";
+            String message = Err.i18n( Err.ERR_39 );
             LOG.error( message );
             throw new NamingException( message );
         }
 
         if ( ( ldapUrl.getExtensions() != null ) && ( ldapUrl.getExtensions().size() != 0 ) )
         {
-            String message = "An LDAPURL should not contains any critical extension";
+            String message = Err.i18n( Err.ERR_40 );
             LOG.error( message );
             throw new NamingException( message );
         }
@@ -135,7 +136,7 @@
 
         if ( ( dn == null ) || dn.isEmpty() )
         {
-            String message = "An LDAPURL should contains a non-empty DN";
+            String message = Err.i18n( Err.ERR_41 );
             LOG.error( message );
             throw new NamingException( message );
         }
@@ -175,7 +176,7 @@
             if ( refAttr == null )
             {
                 // very unlikely, as we have already checked the entry in SchemaInterceptor
-                String message = "An entry with a 'referral' ObjectClass must contains a 'ref' Attribute";
+                String message = Err.i18n( Err.ERR_42 );
                 LOG.error( message );
                 throw new NamingException( message );
             }

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java Thu Jan 21 02:59:05 2010
@@ -29,6 +29,7 @@
 
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
@@ -685,8 +686,8 @@
 
         if ( idOid == null )
         {
-            log.error( "The id {} does not have any OID. It should be a wrong AttributeType.", id);
-            throw new NamingException( "Wrong AttributeType, does not have an associated OID : " + id );
+            log.error( Err.i18n( Err.ERR_43, id ) );
+            throw new NamingException( Err.i18n( Err.ERR_44, id ) );
         }
 
         String[] comps = NamespaceTools.getCompositeComponents( name.get( name.size() - 1 ) );
@@ -700,8 +701,8 @@
 
             if ( rdnAttrOid == null )
             {
-                log.error( "The id {} does not have any OID. It should be a wrong AttributeType.", rdnAttrOid);
-                throw new NamingException( "Wrong AttributeType, does not have an associated OID : " + rdnAttrOid );
+                log.error( Err.i18n( Err.ERR_44, rdnAttrOid ) );
+                throw new NamingException( Err.i18n( Err.ERR_45, rdnAttrOid ) );
             }
 
             if ( rdnAttrOid.equalsIgnoreCase( idOid ) )

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java Thu Jan 21 02:59:05 2010
@@ -57,6 +57,7 @@
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchingOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.constants.MetaSchemaConstants;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.cursor.EmptyCursor;
@@ -534,7 +535,7 @@
                 }
                 catch ( UnsupportedEncodingException uee )
                 {
-                    String message = "The value stored in an Human Readable attribute as a byte[] should be convertible to a String";
+                    String message = Err.i18n( Err.ERR_47 );
                     LOG.error( message );
                     throw new NamingException( message );
                 }
@@ -550,7 +551,7 @@
                 }
                 catch ( UnsupportedEncodingException uee )
                 {
-                    String message = "The value stored in a non Human Readable attribute as a String should be convertible to a byte[]";
+                    String message = Err.i18n( Err.ERR_48 );
                     LOG.error( message );
                     throw new NamingException( message );
                 }
@@ -570,7 +571,7 @@
     {
         if ( filter == null )
         {
-            String message = "A filter should not be null";
+            String message = Err.i18n( Err.ERR_49 );
             LOG.error( message );
             throw new NamingException( message );
         }
@@ -595,7 +596,7 @@
 
                 if ( !schemaManager.lookupAttributeTypeRegistry( node.getAttribute() ).getSyntax().isHumanReadable() )
                 {
-                    String message = "A Substring filter should be used only on Human Readable attributes";
+                    String message = Err.i18n( Err.ERR_50 );
                     LOG.error( message );
                     throw new NamingException( message );
                 }
@@ -635,7 +636,7 @@
 
                 if ( !schemaManager.lookupAttributeTypeRegistry( node.getAttribute() ).getSyntax().isHumanReadable() )
                 {
-                    String message = "A Extensible filter should be used only on Human Readable attributes";
+                    String message = Err.i18n( Err.ERR_51 );
                     LOG.error( message );
                     throw new NamingException( message );
                 }
@@ -1205,7 +1206,7 @@
                 if ( !attributeType.equals( MODIFIERS_NAME_ATTRIBUTE_TYPE ) &&
                      !attributeType.equals( MODIFY_TIMESTAMP_ATTRIBUTE_TYPE ) )
                 {
-                    String msg = "Cannot modify the attribute : " + attributeType;
+                    String msg = Err.i18n( Err.ERR_52, attributeType );
                     LOG.error( msg );
                     throw new NoPermissionException( msg );
                 }
@@ -1218,7 +1219,7 @@
                     if ( !attribute.isValid() )
                     {
                         // The value syntax is incorrect : this is an error
-                        String msg = "The new Attribute or one of its value is incorrect : " + attributeType;
+                        String msg = Err.i18n( Err.ERR_53, attributeType );
                         LOG.error( msg );
                         throw new LdapInvalidAttributeValueException( msg, 
                             ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
@@ -1238,8 +1239,7 @@
                             if ( currentAttribute.contains( value ))
                             {
                                 // This is an error. 
-                                String msg = "Cannot add a value which is already present : " +
-                                    value;
+                                String msg = Err.i18n( Err.ERR_54, value );
                                 LOG.error( msg );
                                 throw new LdapAttributeInUseException( msg );
                             }
@@ -1263,7 +1263,7 @@
                     // First check that the removed attribute exists
                     if ( !tempEntry.containsAttribute( attributeType ) )
                     {
-                        String msg = "Trying to remove an non-existant attribute: " + attributeType;
+                        String msg = Err.i18n( Err.ERR_55, attributeType );
                         LOG.error( msg );
                         throw new LdapNoSuchAttributeException( msg );
                     }
@@ -1288,7 +1288,7 @@
                             }
                             else
                             {
-                                String msg = "Cannot remove an absent value from attribute : " + attributeType;
+                                String msg = Err.i18n( Err.ERR_56, attributeType );
                                 LOG.error( msg );
                                 throw new LdapNoSuchAttributeException( msg );
                             }
@@ -1640,7 +1640,7 @@
                         case ABSTRACT :
                             if ( !superior.isAbstract() )
                             {
-                                String message = "An ABSTRACT ObjectClass cannot inherit from an objectClass which is not ABSTRACT";
+                                String message = Err.i18n( Err.ERR_57 );
                                 LOG.error( message );
                                 throw new LdapSchemaViolationException( message, ResultCodeEnum.OBJECT_CLASS_VIOLATION );
                             }
@@ -1650,7 +1650,7 @@
                         case AUXILIARY :
                             if ( !superior.isAbstract() && ! superior.isAuxiliary() )
                             {
-                                String message = "An AUXILiARY ObjectClass cannot inherit from an objectClass which is not ABSTRACT or AUXILIARY";
+                                String message = Err.i18n( Err.ERR_58 );
                                 LOG.error( message );
                                 throw new LdapSchemaViolationException( message, ResultCodeEnum.OBJECT_CLASS_VIOLATION );
                             }
@@ -1664,7 +1664,7 @@
                 catch ( NamingException ne )
                 {
                     // The superior OC does not exist : this is an error
-                    String message = "Cannot have a superior which does not exist";
+                    String message = Err.i18n( Err.ERR_59 );
                     LOG.error( message );
                     throw new LdapSchemaViolationException( message, ResultCodeEnum.OBJECT_CLASS_VIOLATION );
                 }
@@ -1863,7 +1863,7 @@
 
         if ( structuralObjectClasses.isEmpty() )
         {
-            String message = "Entry " + dn + " does not contain a STRUCTURAL ObjectClass";
+            String message = Err.i18n( Err.ERR_60, dn );
             LOG.error( message );
             throw new LdapSchemaViolationException( message, ResultCodeEnum.OBJECT_CLASS_VIOLATION );
         }
@@ -1895,7 +1895,7 @@
         // Like the highlander there can only be one :).
         if ( remaining.size() > 1 )
         {
-            String message = "Entry " + dn + " contains more than one STRUCTURAL ObjectClass: " + remaining;
+            String message = Err.i18n( Err.ERR_61, dn, remaining );
             LOG.error( message );
             throw new LdapSchemaViolationException( message, ResultCodeEnum.OBJECT_CLASS_VIOLATION );
         }
@@ -1948,7 +1948,7 @@
             
             if ( ( attribute == null ) || ( !attribute.contains( atav.getNormValue() ) ) )
             {
-                String message = "Entry " + dn + " does not have the " + atav.getUpType() + " attributeType, which is part of the RDN";
+                String message = Err.i18n( Err.ERR_62, dn, atav.getUpType() );
                 LOG.error( message );
                 throw new LdapSchemaViolationException( message, ResultCodeEnum.NOT_ALLOWED_ON_RDN );
             }
@@ -2028,14 +2028,14 @@
                 }
                 catch ( UnsupportedEncodingException uee )
                 {
-                    String message = "The value stored in a not Human Readable attribute as a String should be convertible to a byte[]";
+                    String message = Err.i18n( Err.ERR_63 );
                     LOG.error( message );
                     throw new NamingException( message );
                 }
             }
             else
             {
-                String message = "The value is not valid. It should be a String or a byte[]";
+                String message = Err.i18n( Err.ERR_64 );
                 LOG.error( message );
                 throw new NamingException( message );
             }

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/security/CoreKeyStoreSpi.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/security/CoreKeyStoreSpi.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/security/CoreKeyStoreSpi.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/security/CoreKeyStoreSpi.java Thu Jan 21 02:59:05 2010
@@ -42,6 +42,7 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.util.SingletonEnumeration;
@@ -141,7 +142,7 @@
             }
             catch ( Exception e )
             {
-                LOG.error( "Failed to access certificate in DIT.", e );
+                LOG.error( Err.i18n( Err.ERR_65 ), e );
             }
         }
         
@@ -177,7 +178,7 @@
         }
         catch ( Exception e )
         {
-            LOG.error( "Failed on attempt to compare certificate bytes to determine alias.", e );
+            LOG.error( Err.i18n( Err.ERR_66 ), e );
         }
         
         return null;
@@ -199,7 +200,7 @@
         }
         catch ( Exception e )
         {
-            LOG.error( "Failed on attempt to compare certificate bytes to determine alias.", e );
+            LOG.error( Err.i18n( Err.ERR_67 ), e );
         }
         
         return new Certificate[0];
@@ -233,7 +234,7 @@
         }
         catch ( Exception e )
         {
-            LOG.error( "Failed on attempt to extract key.", e );
+            LOG.error( Err.i18n( Err.ERR_68 ), e );
         }
         
         return null;

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java Thu Jan 21 02:59:05 2010
@@ -31,6 +31,7 @@
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.server.core.interceptor.context.ListSuffixOperationContext;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
@@ -123,7 +124,7 @@
         }
         catch ( Exception e )
         {
-            log.error( "Exception while searching the DIT for class: " + name, e );
+            log.error( Err.i18n( Err.ERR_69, name ), e );
         }
 
         throw new ClassNotFoundException();
@@ -204,8 +205,8 @@
         }
         catch ( Exception e ) 
         {
-            String msg = "Encountered failure while searching directory for class: " + name;
-            log.error( msg + e );
+            String msg = Err.i18n( Err.ERR_70, name );
+            log.error( msg, e );
             throw new ClassNotFoundException( msg );
         }
         

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java Thu Jan 21 02:59:05 2010
@@ -57,6 +57,7 @@
 import org.apache.directory.server.core.interceptor.context.SearchingOperationContext;
 import org.apache.directory.server.core.partition.ByPassConstants;
 import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -1038,7 +1039,7 @@
             }
             catch ( Exception e )
             {
-                String msg = "failed to parse the new subtreeSpecification";
+                String msg = Err.i18n( Err.ERR_71 );
                 LOG.error( msg, e );
                 throw new LdapInvalidAttributeValueException( msg, ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX );
             }

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java Thu Jan 21 02:59:05 2010
@@ -46,6 +46,7 @@
 import org.apache.directory.server.core.sp.StoredProcExecutionManager;
 import org.apache.directory.server.core.sp.java.JavaStoredProcEngineConfig;
 import org.apache.directory.server.core.subtree.SubentryInterceptor;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
@@ -177,7 +178,7 @@
             }
             catch ( ParseException e )
             {
-                String msg = "failed to parse entryTrigger: " + triggerString;
+                String msg = Err.i18n( Err.ERR_72, triggerString );
                 LOG.error( msg, e );
                 throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONS_ERROR );
             }

Modified: directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java Thu Jan 21 02:59:05 2010
@@ -43,6 +43,7 @@
 import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
 import org.apache.directory.server.core.interceptor.context.SearchOperationContext;
 import org.apache.directory.server.core.partition.PartitionNexus;
+import org.apache.directory.server.i18n.Err;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -184,7 +185,7 @@
             }
             catch ( ParseException e )
             {
-                String msg = "TriggerSpecification parser failure on '" + item + "'. Cannnot add Trigger Specificaitons to TriggerSpecCache.";
+                String msg = Err.i18n( Err.ERR_73, item );
                 LOG.error( msg, e );
             }
             

Modified: directory/sandbox/felixk/apacheds-i18n/i18n/src/main/java/org/apache/directory/server/i18n/Err.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/i18n/src/main/java/org/apache/directory/server/i18n/Err.java?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/i18n/src/main/java/org/apache/directory/server/i18n/Err.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/i18n/src/main/java/org/apache/directory/server/i18n/Err.java Thu Jan 21 02:59:05 2010
@@ -55,6 +55,86 @@
     public static String ERR_18 = "ERR 18";
     public static String ERR_19 = "ERR 19";
     public static String ERR_20 = "ERR 20";
+    public static String ERR_21 = "ERR 21";
+    public static String ERR_22 = "ERR 22";
+    public static String ERR_23 = "ERR 23";
+    public static String ERR_24 = "ERR 24";
+    public static String ERR_25 = "ERR 25";
+    public static String ERR_26 = "ERR 26";
+    public static String ERR_27 = "ERR 27";
+    public static String ERR_28 = "ERR 28";
+    public static String ERR_29 = "ERR 29";
+    public static String ERR_30 = "ERR 30";
+    public static String ERR_31 = "ERR 31";
+    public static String ERR_32 = "ERR 32";
+    public static String ERR_33 = "ERR 33";
+    public static String ERR_34 = "ERR 34";
+    public static String ERR_35 = "ERR 35";
+    public static String ERR_36 = "ERR 36";
+    public static String ERR_37 = "ERR 37";
+    public static String ERR_38 = "ERR 38";
+    public static String ERR_39 = "ERR 39";
+    public static String ERR_40 = "ERR 40";
+    public static String ERR_41 = "ERR 41";
+    public static String ERR_42 = "ERR 42";
+    public static String ERR_43 = "ERR 43";
+    public static String ERR_44 = "ERR 44";
+    public static String ERR_45 = "ERR 45";
+    public static String ERR_46 = "ERR 46";
+    public static String ERR_47 = "ERR 47";
+    public static String ERR_48 = "ERR 48";
+    public static String ERR_49 = "ERR 49";
+    public static String ERR_50 = "ERR 50";
+    public static String ERR_51 = "ERR 51";
+    public static String ERR_52 = "ERR 52";
+    public static String ERR_53 = "ERR 53";
+    public static String ERR_54 = "ERR 54";
+    public static String ERR_55 = "ERR 55";
+    public static String ERR_56 = "ERR 56";
+    public static String ERR_57 = "ERR 57";
+    public static String ERR_58 = "ERR 58";
+    public static String ERR_59 = "ERR 59";
+    public static String ERR_60 = "ERR 60";
+    public static String ERR_61 = "ERR 61";
+    public static String ERR_62 = "ERR 62";
+    public static String ERR_63 = "ERR 63";
+    public static String ERR_64 = "ERR 64";
+    public static String ERR_65 = "ERR 65";
+    public static String ERR_66 = "ERR 66";
+    public static String ERR_67 = "ERR 67";
+    public static String ERR_68 = "ERR 68";
+    public static String ERR_69 = "ERR 69";
+    public static String ERR_70 = "ERR 70";
+    public static String ERR_71 = "ERR 71";
+    public static String ERR_72 = "ERR 72";
+    public static String ERR_73 = "ERR 73";
+    public static String ERR_74 = "ERR 74";
+    public static String ERR_75 = "ERR 75";
+    public static String ERR_76 = "ERR 76";
+    public static String ERR_77 = "ERR 77";
+    public static String ERR_78 = "ERR 78";
+    public static String ERR_79 = "ERR 79";
+    public static String ERR_80 = "ERR 80";
+    public static String ERR_81 = "ERR 81";
+    public static String ERR_82 = "ERR 82";
+    public static String ERR_83 = "ERR 83";
+    public static String ERR_84 = "ERR 84";
+    public static String ERR_85 = "ERR 85";
+    public static String ERR_86 = "ERR 86";
+    public static String ERR_87 = "ERR 87";
+    public static String ERR_88 = "ERR 88";
+    public static String ERR_89 = "ERR 89";
+    public static String ERR_90 = "ERR 90";
+    public static String ERR_91 = "ERR 91";
+    public static String ERR_92 = "ERR 92";
+    public static String ERR_93 = "ERR 93";
+    public static String ERR_94 = "ERR 94";
+    public static String ERR_95 = "ERR 95";
+    public static String ERR_96 = "ERR 96";
+    public static String ERR_97 = "ERR 97";
+    public static String ERR_98 = "ERR 98";
+    public static String ERR_99 = "ERR 99";
+    public static String ERR_100 = "ERR 100";
 
 
     /**

Modified: directory/sandbox/felixk/apacheds-i18n/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties?rev=901508&r1=901507&r2=901508&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties (original)
+++ directory/sandbox/felixk/apacheds-i18n/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties Thu Jan 21 02:59:05 2010
@@ -22,3 +22,99 @@
 ERR\ 2=A system index on attribute {0} ({1}) does not exist!
 ERR\ 3=A user index on attribute {0} ({1}) does not exist!
 ERR\ 4=Cannot build an index for attribute '{0}', no EQUALITY MatchingRule defined
+ERR\ 5=Attempted operation {0} by unauthenticated caller.
+ERR\ 6=Authentication error : {0}
+ERR\ 7=Cannot create a digested password for algorithm '{0}'
+ERR\ 8=The rootDSE cannot be deleted, moved or renamed!
+ERR\ 9=User '{0}' does not have permission to move or rename the admin account.  No one not even the admin can del, move or rename {1}!
+ERR\ 10=failed to parse entryACI: {0}
+ERR\ 11=failed to parse subentryACI: {0}
+ERR\ 12=The rootDSE cannot be deleted!
+ERR\ 13=The Administrators group cannot be deleted!
+ERR\ 14=User {0} does not have permission to delete the admin account. No one not even the admin can delete this account!
+ERR\ 15=User {0} does not have permission to delete the user account: {1}. Only the admin can delete user accounts.
+ERR\ 16=User {0} does not have permission to delete the group entry: {1}. Only the admin can delete groups.
+ERR\ 17=The rootDSE cannot be modified!
+ERR\ 18=User {0} does not have permission to modify the account of the admin user.
+ERR\ 19=User {0} does not have permission to modify the account of the user {1}.\nEven the owner of an account cannot modify it.\nUser accounts can only be modified by the administrator.
+ERR\ 20=User {0} does not have permission to modify the group entry {1}.\nGroups can only be modified by the admin.
+ERR\ 21=The Administrators group cannot be moved or renamed!
+ERR\ 22=User '{0}' does not have permission to move or rename the admin account.  No one not even the admin can move or rename {1}!
+ERR\ 23=User '{0}' does not have permission to move or rename the user account: {1}. Only the admin can move or rename user accounts.
+ERR\ 24=User '{0}' does not have permission to move or rename the group entry {1}.\nGroups can only be moved or renamed by the admin.
+ERR\ 25=Access to user account '{0}' not permitted for user '{1}'.  Only the admin can access user account information
+ERR\ 26=Access to group '{0}' not permitted for user '{1}'.  Only the admin can access group information
+ERR\ 27=Access to admin account not permitted for user '{0}'.  Only the admin can access admin account information
+ERR\ 28=ACIItem parser failure on \n'{0}'\ndue to syntax error. Cannot add ACITuples to TupleCache.\nCheck that the syntax of the ACI item is correct. \nUntil this error is fixed your security settings will not be as expected.
+ERR\ 29=Cannot set a changeLog store when one is already active
+ERR\ 30=The {0} operational attribute cannot be modified by a user
+ERR\ 31=The ModifiersName operational attribute cannot be modified by a user
+ERR\ 32=The ModifyTimestamp operational attribute cannot be modified by a user
+ERR\ 33=failed to LOG version properties
+ERR\ 34=No partition with suffix: {0}
+ERR\ 35=No partition with suffix '{0}' can be found in the NamingContexts
+ERR\ 36=An LDAPURL should not contains a scope
+ERR\ 37=An LDAPURL should not contains filters
+ERR\ 38=An LDAPURL should not contains any description attribute list
+ERR\ 39=An LDAPURL should not contains any extension
+ERR\ 40=An LDAPURL should not contains any critical extension
+ERR\ 41=An LDAPURL should contains a non-empty DN
+ERR\ 42=An entry with a 'referral' ObjectClass must contains a 'ref' Attribute
+ERR\ 43=The id {0} does not have any OID. It should be a wrong AttributeType.
+ERR\ 44=Wrong AttributeType, does not have an associated OID : {0}
+ERR\ 45=The id {0} does not have any OID. It should be a wrong AttributeType.
+ERR\ 46=Wrong AttributeType, does not have an associated OID : {0}
+ERR\ 47=The value stored in an Human Readable attribute as a byte[] should be convertible to a String"
+ERR\ 48=The value stored in a non Human Readable attribute as a String should be convertible to a byte[]
+ERR\ 49=A filter should not be null
+ERR\ 50=A Substring filter should be used only on Human Readable attributes
+ERR\ 51=A Extensible filter should be used only on Human Readable attributes
+ERR\ 52=Cannot modify the attribute : {0}
+ERR\ 53=The new Attribute or one of its value is incorrect : {0}
+ERR\ 54=Cannot add a value which is already present : {0}
+ERR\ 55=Trying to remove an non-existant attribute: {0}
+ERR\ 56=Cannot remove an absent value from attribute : {0}
+ERR\ 57=An ABSTRACT ObjectClass cannot inherit from an objectClass which is not ABSTRACT
+ERR\ 58=An AUXILiARY ObjectClass cannot inherit from an objectClass which is not ABSTRACT or AUXILIARY
+ERR\ 59=Cannot have a superior which does not exist
+ERR\ 60=Entry {0} does not contain a STRUCTURAL ObjectClass
+ERR\ 61=Entry {0} contains more than one STRUCTURAL ObjectClass: {1}
+ERR\ 62=Entry {0} does not have the {1} attributeType, which is part of the RDN";
+ERR\ 63=The value stored in a not Human Readable attribute as a String should be convertible to a byte[]
+ERR\ 64=The value is not valid. It should be a String or a byte[]
+ERR\ 65=Failed to access certificate in DIT.
+ERR\ 66=Failed on attempt to compare certificate bytes to determine alias.
+ERR\ 67=Failed on attempt to compare certificate bytes to determine alias.
+ERR\ 68=Failed on attempt to extract key.
+ERR\ 69=Exception while searching the DIT for class: {0}
+ERR\ 70=Encountered failure while searching directory for class: {0}
+ERR\ 71=failed to parse the new subtreeSpecification
+ERR\ 72=failed to parse entryTrigger: {0}
+ERR\ 73=TriggerSpecification parser failure on '{0}'. Cannot add Trigger Specifications to TriggerSpecCache.
+ERR\ 74=SynchWorker failed to synch directory.
+ERR\ 75=ChangeType unknown
+ERR\ 76=Reverts of change type {0} has not yet been implemented!
+ERR\ 77=Encountered a failure while trying to revert to a previous revision: {0}
+ERR\ 78=Cannot build an entry for '{0}' and this DN :'{1}'
+ERR\ 79=The replicaId must be in [0, 999]
+ERR\ 80=Cannot inject the following entry : {0}. Error : {1}.
+ERR\ 81=
+ERR\ 82=
+ERR\ 83=
+ERR\ 84=
+ERR\ 85=
+ERR\ 86=
+ERR\ 87=
+ERR\ 88=
+ERR\ 89=
+ERR\ 90=
+ERR\ 91=
+ERR\ 92=
+ERR\ 93=
+ERR\ 94=
+ERR\ 95=
+ERR\ 96=
+ERR\ 97=
+ERR\ 98=
+ERR\ 99=
+ERR\ 100=



Mime
View raw message