directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r901685 - in /directory/apacheds/trunk: avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/ i18n/src/main/resources/org/apache/directory/server/i18n/
Date Thu, 21 Jan 2010 12:50:51 GMT
Author: felixk
Date: Thu Jan 21 12:50:45 2010
New Revision: 901685

URL: http://svn.apache.org/viewvc?rev=901685&view=rev
Log:
I know there are still more I missed

Modified:
    directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java
    directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
    directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties

Modified: directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java?rev=901685&r1=901684&r2=901685&view=diff
==============================================================================
--- directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java
(original)
+++ directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlIndex.java
Thu Jan 21 12:50:45 2010
@@ -24,6 +24,7 @@
 
 import org.apache.directory.server.core.partition.impl.btree.IndexCursorAdaptor;
 import org.apache.directory.server.core.partition.impl.btree.LongComparator;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.IndexCursor;
 import org.apache.directory.server.xdbm.Tuple;
@@ -81,7 +82,7 @@
         
         if ( normalizer == null )
         {
-            throw new Exception( "No Normalizer present for attribute type " + attributeType
);
+            throw new Exception( I18n.err( I18n.ERR_212, attributeType ) );
         }
 
         LdapComparator comp = mr.getLdapComparator();
@@ -446,7 +447,7 @@
      */
     public void setWkDirPath( File wkDirPath )
     {
-        throw new UnsupportedOperationException( "in memory index cannot store the data on
disk" );
+        throw new UnsupportedOperationException( I18n.err( I18n.ERR_213 ) );
     }
 
     
@@ -464,7 +465,7 @@
      */
     public void setCacheSize( int cacheSize )
     {
-        throw new UnsupportedOperationException( "in memory index doesn't support explicit
caching" );
+        throw new UnsupportedOperationException( I18n.err( I18n.ERR_214 ) );
     }
 
     

Modified: directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java?rev=901685&r1=901684&r2=901685&view=diff
==============================================================================
--- directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
(original)
+++ directory/apacheds/trunk/avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/AvlStore.java
Thu Jan 21 12:50:45 2010
@@ -151,7 +151,7 @@
     {
         if ( entry instanceof ClonedServerEntry )
         {
-            throw new Exception( "Cannot store a ClonedServerEntry" );
+            throw new Exception( I18n.err( I18n.ERR_215 ) );
         }
 
         LdapDN normName = entry.getDn();
@@ -183,14 +183,14 @@
         // don't keep going if we cannot find the parent Id
         if ( parentId == null )
         {
-            throw new LdapNameNotFoundException( "Id for parent '" + parentDn + "' not found!"
);
+            throw new LdapNameNotFoundException( I18n.err( I18n.ERR_216, parentDn ) );
         }
 
         EntryAttribute objectClass = entry.get( OBJECT_CLASS_AT );
 
         if ( objectClass == null )
         {
-            String msg = "Entry " + normName.getName() + " contains no objectClass attribute:
" + entry;
+            String msg = I18n.err( I18n.ERR_217, normName.getName(), entry );
             throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECT_CLASS_VIOLATION
);
         }
 
@@ -210,7 +210,7 @@
 
         if ( !Character.isDigit( normName.toNormName().charAt( 0 ) ) )
         {
-            throw new IllegalStateException( "Not a normalized name: " + normName.toNormName()
);
+            throw new IllegalStateException( I18n.err( I18n.ERR_218, normName.toNormName()
) );
         }
 
         ndnIdx.add( normName.toNormName(), id );
@@ -222,7 +222,7 @@
 
         if ( entryCsn == null )
         {
-            String msg = "Entry " + normName.getName() + " contains no entryCsn attribute:
" + entry;
+            String msg = I18n.err( I18n.ERR_219, normName.getName(), entry );
             throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECT_CLASS_VIOLATION
);
         }
 
@@ -233,7 +233,7 @@
 
         if ( entryUuid == null )
         {
-            String msg = "Entry " + normName.getName() + " contains no entryUuid attribute:
" + entry;
+            String msg = I18n.err( I18n.ERR_220, normName.getName(), entry );
             throw new LdapSchemaViolationException( msg, ResultCodeEnum.OBJECT_CLASS_VIOLATION
);
         }
 
@@ -958,7 +958,7 @@
     {
         if ( entry instanceof ClonedServerEntry )
         {
-            throw new Exception( "Cannot store a ClonedServerEntry" );
+            throw new Exception( I18n.err( I18n.ERR_215 ) );
         }
 
         String modsOid = schemaManager.getAttributeTypeRegistry().getOidByName( mods.getId()
);
@@ -1021,7 +1021,7 @@
     {
         if ( entry instanceof ClonedServerEntry )
         {
-            throw new Exception( "Cannot store a ClonedServerEntry" );
+            throw new Exception( I18n.err( I18n.ERR_215 ) );
         }
 
         String modsOid = schemaManager.getAttributeTypeRegistry().getOidByName( mods.getId()
);
@@ -1112,7 +1112,7 @@
     {
         if ( entry instanceof ClonedServerEntry )
         {
-            throw new Exception( "Cannot store a ClonedServerEntry" );
+            throw new Exception( I18n.err( I18n.ERR_215 ) );
         }
 
         String modsOid = schemaManager.getAttributeTypeRegistry().getOidByName( mods.getId()
);
@@ -1187,7 +1187,7 @@
     {
         if ( mods instanceof ClonedServerEntry )
         {
-            throw new Exception( "Cannot store a ClonedServerEntry" );
+            throw new Exception( I18n.err( I18n.ERR_215 ) );
         }
 
         Long id = getEntryId( dn.toString() );
@@ -1213,7 +1213,7 @@
                     break;
 
                 default:
-                    throw new Exception( "Unidentified modification operation" );
+                    throw new Exception( I18n.err( I18n.ERR_221 ) );
             }
         }
 
@@ -1251,7 +1251,7 @@
                     break;
 
                 default:
-                    throw new Exception( "Unidentified modification operation" );
+                    throw new Exception( I18n.err( I18n.ERR_221 ) );
             }
         }
 
@@ -1704,7 +1704,7 @@
     {
         if ( initialized )
         {
-            throw new IllegalStateException( "Cannot call store method: " + method );
+            throw new IllegalStateException( I18n.err( I18n.ERR_222, method ) );
         }
     }
 
@@ -1763,12 +1763,10 @@
         {
             if ( aliasDn.equals( normalizedAliasTargetDn ) )
             {
-                throw new Exception( "[36] aliasDereferencingProblem - " + "attempt to create
alias to itself." );
+                throw new Exception( I18n.err( I18n.ERR_223 ) );
             }
 
-            throw new Exception( "[36] aliasDereferencingProblem - "
-                + "attempt to create alias with cycle to relative " + aliasTarget
-                + " not allowed from descendent alias " + aliasDn );
+            throw new Exception( I18n.err( I18n.ERR_224, aliasTarget, aliasDn ) );
         }
 
         /*
@@ -1782,8 +1780,7 @@
         if ( !normalizedAliasTargetDn.startsWith( suffixDn ) )
         {
             // Complain specifically about aliases to outside naming contexts
-            throw new Exception( "[36] aliasDereferencingProblem -" + " the alias points
to an entry outside of the "
-                + suffixDn.getName() + " namingContext to an object whose existance cannot
be" + " determined." );
+            throw new Exception( I18n.err( I18n.ERR_225, suffixDn.getName() ) );
         }
 
         // L O O K U P   T A R G E T   I D
@@ -1798,8 +1795,7 @@
         if ( null == targetId )
         {
             // Complain about target not existing
-            throw new Exception( "[33] aliasProblem - " + "the alias when dereferenced would
not name a known object "
-                + "the aliasedObjectName must be set to a valid existing " + "entry." );
+            throw new Exception( I18n.err( I18n.ERR_226 ) );
         }
 
         /*
@@ -1815,8 +1811,7 @@
         if ( null != aliasIdx.reverseLookup( targetId ) )
         {
             // Complain about illegal alias chain
-            throw new Exception( "[36] aliasDereferencingProblem -"
-                + " the alias points to another alias.  Alias chaining is" + " not supported
by this backend." );
+            throw new Exception( I18n.err( I18n.ERR_227 ) );
         }
 
         // Add the alias to the simple alias index

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=901685&r1=901684&r2=901685&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
Thu Jan 21 12:50:45 2010
@@ -233,20 +233,21 @@
 ERR_209=ldif file '{0}' does not exist
 ERR_210=ldif file '{0}' can't be read
 ERR_211=ldif file name must be provided
-ERR_212=
-ERR_213=
-ERR_214=
-ERR_215=
-ERR_216=
-ERR_217=
-ERR_218=
-ERR_219=
-ERR_221=
-ERR_222=
-ERR_223=
-ERR_224=
-ERR_225=
-ERR_226=
-ERR_227=
+ERR_212=No Normalizer present for attribute type {0}
+ERR_213=in memory index cannot store the data on disk
+ERR_214=in memory index doesn't support explicit caching
+ERR_215=Cannot store a ClonedServerEntry
+ERR_216=Id for parent '{0}' not found!
+ERR_217=Entry {0} contains no objectClass attribute: {1}
+ERR_218=Not a normalized name: {0}
+ERR_219=Entry {0} contains no entryCsn attribute: {1}
+ERR_220=Entry {0} contains no entryUuid attribute: {1}
+ERR_221=Unidentified modification operation
+ERR_222=Cannot call store method: {0}
+ERR_223=[36] aliasDereferencingProblem - attempt to create alias to itself.
+ERR_224=[36] aliasDereferencingProblem - attempt to create alias with cycle to relative {0}
not allowed from descendent alias {1}
+ERR_225=[36] aliasDereferencingProblem - the alias points to an entry outside of the {0}
namingContext to an object whose existance cannot be determined.
+ERR_226=[33] aliasProblem - the alias when dereferenced would not name a known object the
aliasedObjectName must be set to a valid existing entry.
+ERR_227=[36] aliasDereferencingProblem - the alias points to another alias.  Alias chaining
is not supported by this backend.
 ERR_228=
 ERR_229=



Mime
View raw message