directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r919841 - in /directory/shared/trunk: i18n/src/main/java/org/apache/directory/shared/i18n/ i18n/src/main/resources/org/apache/directory/shared/i18n/ ldap-ldif/ ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/ ldap-ldif/src/tes...
Date Sat, 06 Mar 2010 20:18:16 GMT
Author: felixk
Date: Sat Mar  6 20:18:15 2010
New Revision: 919841

URL: http://svn.apache.org/viewvc?rev=919841&view=rev
Log:
DIRSHARED-49 (i18n)

Last part / fixed

Modified:
    directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java
    directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties
    directory/shared/trunk/ldap-ldif/pom.xml
    directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/ChangeType.java
    directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java
    directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
    directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java
    directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java
    directory/shared/trunk/ldap-ldif/src/test/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReaderTest.java
    directory/shared/trunk/ldap-ldif/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java
    directory/shared/trunk/ldap-schema-manager/pom.xml
    directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java

Modified: directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java?rev=919841&r1=919840&r2=919841&view=diff
==============================================================================
--- directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java (original)
+++ directory/shared/trunk/i18n/src/main/java/org/apache/directory/shared/i18n/I18n.java Sat Mar  6 20:18:15 2010
@@ -167,7 +167,7 @@
 	public static final String ERR_04022 = "ERR_04022";
 	public static final String ERR_04023 = "ERR_04023";
 	public static final String ERR_04024 = "ERR_04024";
-	public static final String ERR_04025 = "ERR_00025";
+	public static final String ERR_04025 = "ERR_04025";
 	public static final String ERR_04026 = "ERR_04026";
 	public static final String ERR_04027 = "ERR_04027";
 	public static final String ERR_04028 = "ERR_04028";
@@ -267,7 +267,7 @@
 	public static final String ERR_04122 = "ERR_04122";
 	public static final String ERR_04123 = "ERR_04123";
 	public static final String ERR_04124 = "ERR_04124";
-	public static final String ERR_04125 = "ERR_00025";
+	public static final String ERR_04125 = "ERR_04125";
 	public static final String ERR_04126 = "ERR_04126";
 	public static final String ERR_04127 = "ERR_04127";
 	public static final String ERR_04128 = "ERR_04128";
@@ -367,7 +367,7 @@
 	public static final String ERR_04222 = "ERR_04222";
 	public static final String ERR_04223 = "ERR_04223";
 	public static final String ERR_04224 = "ERR_04224";
-	public static final String ERR_04225 = "ERR_00025";
+	public static final String ERR_04225 = "ERR_04225";
 	public static final String ERR_04226 = "ERR_04226";
 	public static final String ERR_04227 = "ERR_04227";
 	public static final String ERR_04228 = "ERR_04228";
@@ -467,7 +467,7 @@
 	public static final String ERR_04322 = "ERR_04322";
 	public static final String ERR_04323 = "ERR_04323";
 	public static final String ERR_04324 = "ERR_04324";
-	public static final String ERR_04325 = "ERR_00025";
+	public static final String ERR_04325 = "ERR_04325";
 	public static final String ERR_04326 = "ERR_04326";
 	public static final String ERR_04327 = "ERR_04327";
 	public static final String ERR_04328 = "ERR_04328";
@@ -567,7 +567,7 @@
 	public static final String ERR_04422 = "ERR_04422";
 	public static final String ERR_04423 = "ERR_04423";
 	public static final String ERR_04424 = "ERR_04424";
-	public static final String ERR_04425 = "ERR_00025";
+	public static final String ERR_04425 = "ERR_04425";
 	public static final String ERR_04426 = "ERR_04426";
 	public static final String ERR_04427 = "ERR_04427";
 	public static final String ERR_04428 = "ERR_04428";
@@ -634,12 +634,114 @@
 	public static final String ERR_10022 = "ERR_10022";
 	public static final String ERR_10023 = "ERR_10023";
 	public static final String ERR_10024 = "ERR_10024";
-	public static final String ERR_10025 = "ERR_00025";
+	public static final String ERR_10025 = "ERR_10025";
 	public static final String ERR_10026 = "ERR_10026";
 	public static final String ERR_10027 = "ERR_10027";
 	public static final String ERR_10028 = "ERR_10028";
 	
+	// ldap-schema-manager
+	public static final String ERR_11001 = "ERR_11001";
+	public static final String ERR_11002 = "ERR_11002";
+	public static final String ERR_11003 = "ERR_11003";
+	public static final String ERR_11004 = "ERR_11004";
+	public static final String ERR_11005 = "ERR_11005";
+	public static final String ERR_11006 = "ERR_11006";
+	public static final String ERR_11007 = "ERR_11007";
+	public static final String ERR_11008 = "ERR_11008";
+	public static final String ERR_11009 = "ERR_11009";
+	public static final String ERR_11010 = "ERR_11010";
+	public static final String ERR_11011 = "ERR_11011";
+	public static final String ERR_11012 = "ERR_11012";
+	public static final String ERR_11013 = "ERR_11013";
 	
+	// ldap-schema-manager
+	public static final String ERR_12001 = "ERR_12001";
+	public static final String ERR_12002 = "ERR_12002";
+	public static final String ERR_12003 = "ERR_12003";
+	public static final String ERR_12004 = "ERR_12004";
+	public static final String ERR_12005 = "ERR_12005";
+	public static final String ERR_12006 = "ERR_12006";
+	public static final String ERR_12007 = "ERR_12007";
+	public static final String ERR_12008 = "ERR_12008";
+	public static final String ERR_12009 = "ERR_12009";
+	public static final String ERR_12010 = "ERR_12010";
+	public static final String ERR_12011 = "ERR_12011";
+	public static final String ERR_12012 = "ERR_12012";
+	public static final String ERR_12013 = "ERR_12013";
+	public static final String ERR_12014 = "ERR_12014";
+	public static final String ERR_12015 = "ERR_12015";
+	public static final String ERR_12016 = "ERR_12016";
+	public static final String ERR_12017 = "ERR_12017";
+	public static final String ERR_12018 = "ERR_12018";
+	public static final String ERR_12019 = "ERR_12019";
+	public static final String ERR_12020 = "ERR_12020";
+	public static final String ERR_12021 = "ERR_12021";
+	public static final String ERR_12022 = "ERR_12022";
+	public static final String ERR_12023 = "ERR_12023";
+	public static final String ERR_12024 = "ERR_12024";
+	public static final String ERR_12025 = "ERR_12025";
+	public static final String ERR_12026 = "ERR_12026";
+	public static final String ERR_12027 = "ERR_12027";
+	public static final String ERR_12028 = "ERR_12028";
+	public static final String ERR_12029 = "ERR_12029";
+	public static final String ERR_12030 = "ERR_12030";
+	public static final String ERR_12031 = "ERR_12031";
+	public static final String ERR_12032 = "ERR_12032";
+	public static final String ERR_12033 = "ERR_12033";
+	public static final String ERR_12034 = "ERR_12034";
+	public static final String ERR_12035 = "ERR_12035";
+	public static final String ERR_12036 = "ERR_12036";
+	public static final String ERR_12037 = "ERR_12037";
+	public static final String ERR_12038 = "ERR_12038";
+	public static final String ERR_12039 = "ERR_12039";
+	public static final String ERR_12040 = "ERR_12040";
+	public static final String ERR_12041 = "ERR_12041";
+	public static final String ERR_12042 = "ERR_12042";
+	public static final String ERR_12043 = "ERR_12043";
+	public static final String ERR_12044 = "ERR_12044";
+	public static final String ERR_12045 = "ERR_12045";
+	public static final String ERR_12046 = "ERR_12046";
+	public static final String ERR_12047 = "ERR_12047";
+	public static final String ERR_12048 = "ERR_12048";
+	public static final String ERR_12049 = "ERR_12049";
+	public static final String ERR_12050 = "ERR_12050";
+	public static final String ERR_12051 = "ERR_12051";
+	public static final String ERR_12052 = "ERR_12052";
+	public static final String ERR_12053 = "ERR_12053";
+	public static final String ERR_12054 = "ERR_12054";
+	public static final String ERR_12055 = "ERR_12055";
+	public static final String ERR_12056 = "ERR_12056";
+	public static final String ERR_12057 = "ERR_12057";
+	public static final String ERR_12058 = "ERR_12058";
+	public static final String ERR_12059 = "ERR_12059";
+	public static final String ERR_12060 = "ERR_12060";
+	public static final String ERR_12061 = "ERR_12061";
+	public static final String ERR_12062 = "ERR_12062";
+	public static final String ERR_12063 = "ERR_12063";
+	public static final String ERR_12064 = "ERR_12064";
+	public static final String ERR_12065 = "ERR_12065";
+	public static final String ERR_12066 = "ERR_12066";
+	public static final String ERR_12067 = "ERR_12067";
+	public static final String ERR_12068 = "ERR_12068";
+	public static final String ERR_12069 = "ERR_12069";
+	public static final String ERR_12070 = "ERR_12070";
+	public static final String ERR_12071 = "ERR_12071";
+	public static final String ERR_12072 = "ERR_12072";
+	public static final String ERR_12073 = "ERR_12073";
+	public static final String ERR_12074 = "ERR_12074";
+	public static final String ERR_12075 = "ERR_12075";
+	public static final String ERR_12076 = "ERR_12076";
+	public static final String ERR_12077 = "ERR_12077";
+	public static final String ERR_12078 = "ERR_12078";
+	public static final String ERR_12079 = "ERR_12079";
+	public static final String ERR_12080 = "ERR_12080";
+	public static final String ERR_12081 = "ERR_12081";
+	public static final String ERR_12082 = "ERR_12082";
+	public static final String ERR_12083 = "ERR_12083";
+	public static final String ERR_12084 = "ERR_12084";
+	public static final String ERR_12085 = "ERR_12085";
+	public static final String ERR_12086 = "ERR_12086";
+	public static final String ERR_12087 = "ERR_12087";
 	
     /**
      * 

Modified: directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties
URL: http://svn.apache.org/viewvc/directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties?rev=919841&r1=919840&r2=919841&view=diff
==============================================================================
--- directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties (original)
+++ directory/shared/trunk/i18n/src/main/resources/org/apache/directory/shared/i18n/errors.properties Sat Mar  6 20:18:15 2010
@@ -533,7 +533,7 @@
 ERR_04429=Regex was null
 ERR_04430=Ldap regex must have wild cards!
 ERR_04431=Expected string to start with a '#' character. Invalid hex encoded string for empty or null string.
-ERR_04432=Expected string to start with a '#' character. Invalid hex encoded string: {0} 
+ERR_04432=Expected string to start with a '\#' character. Invalid hex encoded string\: {0} 
 ERR_04433=Expected string to be non-null with valid index.
 ERR_04434=Expected string to be non-empty with valid index.
 ERR_04435=The DN must contain valid escaped characters.
@@ -548,7 +548,7 @@
 
 # ldap-converter
 ERR_06001=The schemaObject is either null or is empty!
-ERR_06002=Parser failure on:\n\t{0}\nAntlr exception trace:\n{1}
+ERR_06002=Parser failure on\:\n\t{0}\nAntlr exception trace\:\n{1}
 ERR_06003={0} the schema configuration element must specify a name.
 ERR_06004=Failed while generating sources for {0}
 ERR_06005=Can't generate a ldif for a null schema
@@ -595,3 +595,107 @@
 ERR_10026=Cannot add the AttributeType {0}, as the associated schema ({1}) is not loaded
 ERR_10027=Cannot add the AttributeType {0} into the registries, as the associated schema ({1}) is disabled
 ERR_10028={0} entry must have a valid {1} attribute
+
+# ldap-schema-manager
+ERR_11001=Cannot load the unknown schema {0}
+ERR_11002=Cannot load the Schema {0} as one of its dependencies has not been loaded
+ERR_11003=Need to implement factory method for creating a DitContentRule
+ERR_11004=Need to implement factory method for creating a DitStructureRule
+ERR_11005=Need to implement factory method for creating a MatchingRuleUse
+ERR_11006=Need to implement factory method for creating a NameForm
+ERR_11007=the SchemaObject {0} cannot be added, it's not a valid LoadableSchemaObject.
+ERR_11008=Oid {0} for new schema entity is not unique.
+ERR_11009=Cannot add the SchemaObject {0} into a non existing schema {1} 
+ERR_11010=Cannot inject the SchemaObject {0} as it's not associated with a schema
+ERR_11011=Oid {0} for new schema entity does not exist.
+ERR_11012=Cannot remove {0} for the registries, it would become inconsistent. The following SchemaOjects are referencing this SchemaObject : {1}
+ERR_11013=Cannot delete the SchemaObject {0} as it's not associated with a schema
+
+# ldif
+ERR_12001=Unknown change type value {0}
+ERR_12002=An entry must not have two DNs
+ERR_12003=A ldif entry should not have two DNs
+ERR_12004=We cannot have changes when reading a file which already contains entries
+ERR_12005=No changes within entries
+ERR_12006=Expecting an attribute type
+ERR_12007=Bad attribute
+ERR_12008=Cannot parse the ldif buffer : {0}
+ERR_12009=Error while parsing the ldif buffer
+ERR_12010=Cannot find file {0}
+ERR_12011=Cannot read file {0}
+ERR_12012=A ldif entry must have a non empty DN
+ERR_12013=No DN for entry
+ERR_12014=The ldif entry is supposed to have a base 64 encoded DN
+ERR_12015=Invalid base 64 encoded DN
+ERR_12016=A ldif entry must start with a DN
+ERR_12017=The DN {0} is not valid
+ERR_12018=File {0} not found
+ERR_12019=Bad URL, file not found
+ERR_12020=File {0} is too big
+ERR_12021=File too big
+ERR_12022=File {0} error reading
+ERR_12023=Bad URL, file can't be read
+ERR_12024=Error while closing the stream : {0}
+ERR_12025=Protocols other than file: are not supported
+ERR_12026=Unsupported URL protocol
+ERR_12027=Bad URL {0}
+ERR_12028=Bad URL
+ERR_12029=The control does not have an OID
+ERR_12030=Bad control, no oid
+ERR_12031=The OID {0} is not valid
+ERR_12032=Bad control oid
+ERR_12033=The control must have a valid criticality
+ERR_12034=Bad control criticality
+ERR_12035=A modrdn operation must start with a "newrdn\:"
+ERR_12036=Bad modrdn operation
+ERR_12037=Bad modrdn operation, no newrdn
+ERR_12038=A modrdn operation must contains a "deleteoldrdn\:"
+ERR_12039=Bad modrdn operation, no deleteoldrdn
+ERR_12040=Bad state : we should have come from an ATTRVAL_SPEC
+ERR_12041=Bad modify separator
+ERR_12042=Bad state : we should have come from a MOD_SPEC or an ATTRVAL_SPEC
+ERR_12043=Bad modify state
+ERR_12044=The modified attribute and the attribute value spec must be equal
+ERR_12045=Bad modify attribute
+ERR_12046=A moddn operation must contains a "newsuperior\:"
+ERR_12047=Bad moddn operation, no newsuperior
+ERR_12048=Unknown operation
+ERR_12049=Bad operation
+ERR_12050=We already have had a control
+ERR_12051=Control misplaced
+ERR_12052=We already have had a changeType
+ERR_12053=ChangeType misplaced
+ERR_12054=We can't have a Attribute/Value pair after a control or a changeType
+ERR_12055=AttributeType misplaced
+ERR_12056=Expecting an attribute type
+ERR_12057=Bad attribute
+ERR_12058=Unknown entry type
+ERR_12059=Unknown entry
+ERR_12060=The version is not a number
+ERR_12061=Ldif parsing error
+ERR_12062=Cannot have an empty continuation line
+ERR_12063=Error while reading ldif lines
+ERR_12064=Cannot parse an empty file name !
+ERR_12065=Empty filename
+ERR_12066=Cannot parse the file {0}, it does not exist
+ERR_12067=Filename {0} not found.
+ERR_12068=Cannot find file {0}
+ERR_12069=Cannot parse the ldif buffer : {0}
+ERR_12070=Error while parsing the ldif buffer
+ERR_12071=Premature termination of LDIF iterator
+ERR_12072=Error while parsing ldif : {0}
+ERR_12073=Could not deduce reverse modifications from provided modifications: {0}
+ERR_12074=newSuperiorDn must not be null
+ERR_12075=modifiedDn must not be null
+ERR_12076=Don't think about moving the rootDSE.
+ERR_12077=The newRdn must not be null
+ERR_12078=The modified Dn must not be null
+ERR_12079=Don't think about renaming the rootDSE.
+ERR_12080=Can't rename an entry using the same name ...
+ERR_12081=Invalid Entry : a deleted entry should not contain attributes
+ERR_12082=Invalid Entry : a added or modified entry should contain attributes
+ERR_12083=Invalid Entry : a modifyDN operation entry should not contain attributes
+ERR_12084=The length of each line must be at least 2 chars long
+ERR_12085=The Attribute ID #{0} must be a String
+ERR_12086=The Attribute value #{0} must be a String or a byte[]
+ERR_12087=A value is missing at the end

Modified: directory/shared/trunk/ldap-ldif/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-ldif/pom.xml?rev=919841&r1=919840&r2=919841&view=diff
==============================================================================
--- directory/shared/trunk/ldap-ldif/pom.xml (original)
+++ directory/shared/trunk/ldap-ldif/pom.xml Sat Mar  6 20:18:15 2010
@@ -60,6 +60,12 @@
     </dependency>
 
     <dependency>
+      <artifactId>shared-i18n</artifactId>
+      <groupId>${groupId}</groupId>
+      <version>${version}</version>
+    </dependency>  
+
+    <dependency>
       <artifactId>shared-ldap</artifactId>
       <groupId>${groupId}</groupId>
       <version>${version}</version>

Modified: directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/ChangeType.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/ChangeType.java?rev=919841&r1=919840&r2=919841&view=diff
==============================================================================
--- directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/ChangeType.java (original)
+++ directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/ChangeType.java Sat Mar  6 20:18:15 2010
@@ -19,6 +19,8 @@
  */
 package org.apache.directory.shared.ldap.ldif;
 
+import org.apache.directory.shared.i18n.I18n;
+
 
 /**
  * A type safe enumeration for an LDIF record's change type.
@@ -89,7 +91,7 @@
             case 4: return Delete;
             
             default:
-                throw new IllegalArgumentException( "Unknown change type value " + val );
+                throw new IllegalArgumentException( I18n.err( I18n.ERR_12001, val ) );
         }
     }
 }

Modified: directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java?rev=919841&r1=919840&r2=919841&view=diff
==============================================================================
--- directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java (original)
+++ directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReader.java Sat Mar  6 20:18:15 2010
@@ -29,6 +29,7 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.BasicAttributes;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -173,8 +174,8 @@
         // We should *not* have a DN twice
         if ( attributeType.equals( "dn" ) )
         {
-            LOG.error( "An entry must not have two DNs" );
-            throw new NamingException( "A ldif entry should not have two DNs" );
+            LOG.error( I18n.err( I18n.ERR_12002 ) );
+            throw new NamingException( I18n.err( I18n.ERR_12003 ) );
         }
 
         Object attributeValue = parseValue( line, colonIndex );
@@ -228,13 +229,13 @@
             // 3) The first line after the DN is anything else
             if ( lowerLine.startsWith( "control:" ) )
             {
-                LOG.error( "We cannot have changes when reading a file which already contains entries" );
-                throw new NamingException( "No changes withing entries" );
+                LOG.error( I18n.err( I18n.ERR_12004 ) );
+                throw new NamingException( I18n.err( I18n.ERR_12005 ) );
             }
             else if ( lowerLine.startsWith( "changetype:" ) )
             {
-                LOG.error( "We cannot have changes when reading a file which already contains entries" );
-                throw new NamingException( "No changes withing entries" );
+                LOG.error( I18n.err( I18n.ERR_12004 ) );
+                throw new NamingException( I18n.err( I18n.ERR_12005 ) );
             }
             else if ( line.indexOf( ':' ) > 0 )
             {
@@ -243,8 +244,8 @@
             else
             {
                 // Invalid attribute Value
-                LOG.error( "Expecting an attribute type" );
-                throw new NamingException( "Bad attribute" );
+                LOG.error( I18n.err( I18n.ERR_12006 ) );
+                throw new NamingException( I18n.err( I18n.ERR_12007 ) );
             }
         }
 
@@ -292,8 +293,8 @@
         }
         catch (NamingException ne)
         {
-            LOG.error( "Cannot parse the ldif buffer : {}", ne.getMessage() );
-            throw new NamingException( "Error while parsing the ldif buffer" );
+            LOG.error( I18n.err( I18n.ERR_12008, ne.getLocalizedMessage() ) );
+            throw new NamingException( I18n.err( I18n.ERR_12009 ) );
         }
         finally
         {

Modified: directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java?rev=919841&r1=919840&r2=919841&view=diff
==============================================================================
--- directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java (original)
+++ directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifReader.java Sat Mar  6 20:18:15 2010
@@ -48,6 +48,7 @@
 
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.primitives.OID;
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
@@ -304,14 +305,14 @@
 
         if ( !file.exists() )
         {
-            LOG.error( "File {} cannot be found", file.getAbsoluteFile() );
-            throw new NamingException( "Cannot find file " + file.getAbsoluteFile() );
+            LOG.error( I18n.err( I18n.ERR_12010, file.getAbsoluteFile() ) );
+            throw new NamingException( I18n.err( I18n.ERR_12010, file.getAbsoluteFile() ) );
         }
 
         if ( !file.canRead() )
         {
-            LOG.error( "File {} cannot be read", file.getName() );
-            throw new NamingException( "Cannot read file " + file.getName() );
+            LOG.error( I18n.err( I18n.ERR_12011, file.getName() ) );
+            throw new NamingException( I18n.err( I18n.ERR_12011, file.getName() ) );
         }
 
         try
@@ -320,8 +321,8 @@
         }
         catch ( FileNotFoundException fnfe )
         {
-            LOG.error( "File {} cannot be found", file.getAbsoluteFile() );
-            throw new NamingException( "Cannot find file " + file.getAbsoluteFile() );
+            LOG.error( I18n.err( I18n.ERR_12010, file.getAbsoluteFile() ) );
+            throw new NamingException( I18n.err( I18n.ERR_12010, file.getAbsoluteFile() ) );
         }
     }
 
@@ -366,14 +367,14 @@
     {
         if ( !file.exists() )
         {
-            LOG.error( "File {} cannot be found", file.getAbsoluteFile() );
-            throw new NamingException( "Cannot find file " + file.getAbsoluteFile() );
+            LOG.error( I18n.err( I18n.ERR_12010, file.getAbsoluteFile() ) );
+            throw new NamingException( I18n.err( I18n.ERR_12010, file.getAbsoluteFile() ) );
         }
 
         if ( !file.canRead() )
         {
-            LOG.error( "File {} cannot be read", file.getName() );
-            throw new NamingException( "Cannot read file " + file.getName() );
+            LOG.error( I18n.err( I18n.ERR_12011, file.getName() ) );
+            throw new NamingException( I18n.err( I18n.ERR_12011, file.getName() ) );
         }
 
         try
@@ -382,8 +383,8 @@
         }
         catch ( FileNotFoundException fnfe )
         {
-            LOG.error( "File {} cannot be found", file.getAbsoluteFile() );
-            throw new NamingException( "Cannot find file " + file.getAbsoluteFile() );
+            LOG.error( I18n.err( I18n.ERR_12010, file.getAbsoluteFile() ) );
+            throw new NamingException( I18n.err( I18n.ERR_12010, file.getAbsoluteFile() ) );
         }
     }
 
@@ -418,7 +419,7 @@
     }
 
 
-    // <fill> ::= ' ' <fill> | �
+    // <fill> ::= ' ' <fill> | ���
     private static void parseFill( char[] document, Position position )
     {
 
@@ -529,8 +530,8 @@
             if ( length == 3 )
             {
                 // The DN is empty : error
-                LOG.error( "A ldif entry must have a non empty DN" );
-                throw new NamingException( "No DN for entry" );
+                LOG.error( I18n.err( I18n.ERR_12012 ) );
+                throw new NamingException( I18n.err( I18n.ERR_12013 ) );
             }
             else if ( line.charAt( 3 ) == ':' )
             {
@@ -546,15 +547,15 @@
                     catch ( UnsupportedEncodingException uee )
                     {
                         // The DN is not base 64 encoded
-                        LOG.error( "The ldif entry is supposed to have a base 64 encoded DN" );
-                        throw new NamingException( "Invalid base 64 encoded DN" );
+                        LOG.error( I18n.err( I18n.ERR_12014 ) );
+                        throw new NamingException( I18n.err( I18n.ERR_12015 ) );
                     }
                 }
                 else
                 {
                     // The DN is empty : error
-                    LOG.error( "A ldif entry must have a non empty DN" );
-                    throw new NamingException( "No DN for entry" );
+                    LOG.error( I18n.err( I18n.ERR_12012 ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12013 ) );
                 }
             }
             else
@@ -564,8 +565,8 @@
         }
         else
         {
-            LOG.error( "A ldif entry must start with a DN" );
-            throw new NamingException( "No DN for entry" );
+            LOG.error( I18n.err( I18n.ERR_12016 ) );
+            throw new NamingException( I18n.err( I18n.ERR_12013 ) );
         }
 
         // Check that the DN is valid. If not, an exception will be thrown
@@ -575,7 +576,7 @@
         }
         catch ( InvalidNameException ine )
         {
-            LOG.error( "The DN {} is not valid" );
+            LOG.error( I18n.err( I18n.ERR_12017, dn ) );
             throw ine;
         }
 
@@ -655,8 +656,8 @@
 
                         if ( !file.exists() )
                         {
-                            LOG.error( "File {} not found", fileName );
-                            throw new NamingException( "Bad URL, file not found" );
+                            LOG.error( I18n.err( I18n.ERR_12018, fileName ) );
+                            throw new NamingException( I18n.err( I18n.ERR_12019 ) );
                         }
                         else
                         {
@@ -664,8 +665,8 @@
 
                             if ( length > sizeLimit )
                             {
-                                LOG.error( "File {} is too big", fileName );
-                                throw new NamingException( "File too big" );
+                                LOG.error( I18n.err( I18n.ERR_12020, fileName ) );
+                                throw new NamingException( I18n.err( I18n.ERR_12021 ) );
                             }
                             else
                             {
@@ -684,13 +685,13 @@
                                     // We can't reach this point, the file
                                     // existence has already been
                                     // checked
-                                    LOG.error( "File {} not found", fileName );
-                                    throw new NamingException( "Bad URL, file not found" );
+                                    LOG.error( I18n.err( I18n.ERR_12018, fileName ) );
+                                    throw new NamingException( I18n.err( I18n.ERR_12019 ) );
                                 }
                                 catch ( IOException ioe )
                                 {
-                                    LOG.error( "File {} error reading", fileName );
-                                    throw new NamingException( "Bad URL, file can't be read" );
+                                    LOG.error( I18n.err( I18n.ERR_12022, fileName ) );
+                                    throw new NamingException( I18n.err( I18n.ERR_12023 ) );
                                 }
                                 finally
                                 {
@@ -700,7 +701,7 @@
                                     }
                                     catch ( IOException ioe )
                                     {
-                                        LOG.error( "Error while closing the stream : {}", ioe.getMessage() );
+                                        LOG.error( I18n.err( I18n.ERR_12024, ioe.getMessage() ) );
                                         // Just do nothing ...
                                     }
                                 }
@@ -709,14 +710,14 @@
                     }
                     else
                     {
-                        LOG.error( "Protocols other than file: are not supported" );
-                        throw new NamingException( "Unsupported URL protocol" );
+                        LOG.error( I18n.err( I18n.ERR_12025 ) );
+                        throw new NamingException( I18n.err( I18n.ERR_12026 ) );
                     }
                 }
                 catch ( MalformedURLException mue )
                 {
-                    LOG.error( "Bad URL {}", urlName );
-                    throw new NamingException( "Bad URL" );
+                    LOG.error( I18n.err( I18n.ERR_12027, urlName ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12028 ) );
                 }
             }
             else
@@ -758,8 +759,8 @@
         if ( pos > length )
         {
             // No OID : error !
-            LOG.error( "The control does not have an OID" );
-            throw new NamingException( "Bad control, no oid" );
+            LOG.error( I18n.err( I18n.ERR_12029 ) );
+            throw new NamingException( I18n.err( I18n.ERR_12030 ) );
         }
 
         int initPos = pos;
@@ -772,8 +773,8 @@
         if ( pos == initPos )
         {
             // Not a valid OID !
-            LOG.error( "The control does not have an OID" );
-            throw new NamingException( "Bad control, no oid" );
+            LOG.error( I18n.err( I18n.ERR_12029 ) );
+            throw new NamingException( I18n.err( I18n.ERR_12030 ) );
         }
 
         // Create and check the OID
@@ -787,8 +788,8 @@
         }
         catch ( DecoderException de )
         {
-            LOG.error( "The OID {} is not valid", oidString );
-            throw new NamingException( "Bad control oid" );
+            LOG.error( I18n.err( I18n.ERR_12031, oidString ) );
+            throw new NamingException( I18n.err( I18n.ERR_12032 ) );
         }
 
         LdifControl control = new LdifControl( oidString );
@@ -826,8 +827,8 @@
         {
             // If we have a criticality, it should be either "true" or "false",
             // nothing else
-            LOG.error( "The control muts have a valid criticality" );
-            throw new NamingException( "Bad control criticality" );
+            LOG.error( I18n.err( I18n.ERR_12033 ) );
+            throw new NamingException( I18n.err( I18n.ERR_12034 ) );
         }
 
         if ( criticalPos > 0 )
@@ -904,8 +905,8 @@
         // We should *not* have a DN twice
         if ( attributeType.equals( "dn" ) )
         {
-            LOG.error( "An entry must not have two DNs" );
-            throw new NamingException( "A ldif entry should not have two DN" );
+            LOG.error( I18n.err( I18n.ERR_12002 ) );
+            throw new NamingException( I18n.err( I18n.ERR_12003 ) );
         }
 
         Object attributeValue = parseValue( line, colonIndex );
@@ -943,15 +944,15 @@
             }
             else
             {
-                LOG.error( "A modrdn operation must start with a \"newrdn:\"" );
-                throw new NamingException( "Bad modrdn operation" );
+                LOG.error( I18n.err( I18n.ERR_12035 ) );
+                throw new NamingException( I18n.err( I18n.ERR_12036 ) );
             }
 
         }
         else
         {
-            LOG.error( "A modrdn operation must start with a \"newrdn:\"" );
-            throw new NamingException( "Bad modrdn operation, no newrdn" );
+            LOG.error( I18n.err( I18n.ERR_12035 ) );
+            throw new NamingException( I18n.err( I18n.ERR_12037 ) );
         }
 
         if ( iter.hasNext() )
@@ -967,14 +968,14 @@
             }
             else
             {
-                LOG.error( "A modrdn operation must contains a \"deleteoldrdn:\"" );
-                throw new NamingException( "Bad modrdn operation, no deleteoldrdn" );
+                LOG.error( I18n.err( I18n.ERR_12038 ) );
+                throw new NamingException( I18n.err( I18n.ERR_12039 ) );
             }
         }
         else
         {
-            LOG.error( "A modrdn operation must contains a \"deleteoldrdn:\"" );
-            throw new NamingException( "Bad modrdn operation, no deleteoldrdn" );
+            LOG.error( I18n.err( I18n.ERR_12038 ) );
+            throw new NamingException( I18n.err( I18n.ERR_12039 ) );
         }
 
         return;
@@ -1015,8 +1016,8 @@
             {
                 if ( state != ATTRVAL_SPEC_OR_SEP )
                 {
-                    LOG.error( "Bad state : we should have come from an ATTRVAL_SPEC" );
-                    throw new NamingException( "Bad modify separator" );
+                    LOG.error( I18n.err( I18n.ERR_12040 ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12041 ) );
                 }
                 else
                 {
@@ -1040,8 +1041,8 @@
             {
                 if ( ( state != MOD_SPEC ) && ( state != ATTRVAL_SPEC ) )
                 {
-                    LOG.error( "Bad state : we should have come from a MOD_SPEC or an ATTRVAL_SPEC" );
-                    throw new NamingException( "Bad modify state" );
+                    LOG.error( I18n.err( I18n.ERR_12042 ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12043 ) );
                 }
 
                 modified = StringTools.trim( line.substring( "add:".length() ) );
@@ -1054,8 +1055,8 @@
             {
                 if ( ( state != MOD_SPEC ) && ( state != ATTRVAL_SPEC ) )
                 {
-                    LOG.error( "Bad state : we should have come from a MOD_SPEC or an ATTRVAL_SPEC" );
-                    throw new NamingException( "Bad modify state" );
+                    LOG.error( I18n.err( I18n.ERR_12042 ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12043 ) );
                 }
 
                 modified = StringTools.trim( line.substring( "delete:".length() ) );
@@ -1068,8 +1069,8 @@
             {
                 if ( ( state != MOD_SPEC ) && ( state != ATTRVAL_SPEC ) )
                 {
-                    LOG.error( "Bad state : we should have come from a MOD_SPEC or an ATTRVAL_SPEC" );
-                    throw new NamingException( "Bad modify state" );
+                    LOG.error( I18n.err( I18n.ERR_12042 ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12043 ) );
                 }
 
                 modified = StringTools.trim( line.substring( "replace:".length() ) );
@@ -1082,8 +1083,8 @@
             {
                 if ( ( state != ATTRVAL_SPEC ) && ( state != ATTRVAL_SPEC_OR_SEP ) )
                 {
-                    LOG.error( "Bad state : we should have come from an ATTRVAL_SPEC" );
-                    throw new NamingException( "Bad modify state" );
+                    LOG.error( I18n.err( I18n.ERR_12040 ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12043 ) );
                 }
 
                 // A standard AttributeType/AttributeValue pair
@@ -1093,15 +1094,15 @@
 
                 if ( !attributeType.equalsIgnoreCase( modified ) )
                 {
-                    LOG.error( "The modified attribute and the attribute value spec must be equal" );
-                    throw new NamingException( "Bad modify attribute" );
+                    LOG.error( I18n.err( I18n.ERR_12044 ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12045 ) );
                 }
 
                 // We should *not* have a DN twice
                 if ( attributeType.equalsIgnoreCase( "dn" ) )
                 {
-                    LOG.error( "An entry must not have two DNs" );
-                    throw new NamingException( "A ldif entry should not have two DN" );
+                    LOG.error( I18n.err( I18n.ERR_12002 ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12003 ) );
                 }
 
                 Object attributeValue = parseValue( line, colonIndex );
@@ -1198,8 +1199,8 @@
                     {
                         if ( operation == ChangeType.ModDn )
                         {
-                            LOG.error( "A moddn operation must contains a \"newsuperior:\"" );
-                            throw new NamingException( "Bad moddn operation, no newsuperior" );
+                            LOG.error( I18n.err( I18n.ERR_12046 ) );
+                            throw new NamingException( I18n.err( I18n.ERR_12047 ) );
                         }
                     }
                 }
@@ -1207,8 +1208,8 @@
                 {
                     if ( operation == ChangeType.ModDn )
                     {
-                        LOG.error( "A moddn operation must contains a \"newsuperior:\"" );
-                        throw new NamingException( "Bad moddn operation, no newsuperior" );
+                        LOG.error( I18n.err( I18n.ERR_12046 ) );
+                        throw new NamingException( I18n.err( I18n.ERR_12047 ) );
                     }
                 }
 
@@ -1216,8 +1217,8 @@
 
             default:
                 // This is an error
-                LOG.error( "Unknown operation" );
-                throw new NamingException( "Bad operation" );
+                LOG.error( I18n.err( I18n.ERR_12048 ) );
+                throw new NamingException( I18n.err( I18n.ERR_12049 ) );
         }
     }
 
@@ -1290,16 +1291,16 @@
             {
                 if ( containsEntries )
                 {
-                    LOG.error( "We cannot have changes when reading a file which already contains entries" );
-                    throw new NamingException( "No changes withing entries" );
+                    LOG.error( I18n.err( I18n.ERR_12004 ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12005 ) );
                 }
 
                 containsChanges = true;
 
                 if ( controlSeen )
                 {
-                    LOG.error( "We already have had a control" );
-                    throw new NamingException( "Control misplaced" );
+                    LOG.error( I18n.err( I18n.ERR_12050 ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12051 ) );
                 }
 
                 // Parse the control
@@ -1310,16 +1311,16 @@
             {
                 if ( containsEntries )
                 {
-                    LOG.error( "We cannot have changes when reading a file which already contains entries" );
-                    throw new NamingException( "No changes withing entries" );
+                    LOG.error( I18n.err( I18n.ERR_12004 ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12005 ) );
                 }
 
                 containsChanges = true;
 
                 if ( changeTypeSeen )
                 {
-                    LOG.error( "We already have had a changeType" );
-                    throw new NamingException( "ChangeType misplaced" );
+                    LOG.error( I18n.err( I18n.ERR_12052 ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12053 ) );
                 }
 
                 // A change request
@@ -1336,16 +1337,16 @@
             {
                 if ( containsChanges )
                 {
-                    LOG.error( "We cannot have entries when reading a file which already contains changes" );
-                    throw new NamingException( "No entries within changes" );
+                    LOG.error( I18n.err( I18n.ERR_12004 ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12005 ) );
                 }
 
                 containsEntries = true;
 
                 if ( controlSeen || changeTypeSeen )
                 {
-                    LOG.error( "We can't have a Attribute/Value pair after a control or a changeType" );
-                    throw new NamingException( "AttributeType misplaced" );
+                    LOG.error( I18n.err( I18n.ERR_12054 ) );
+                    throw new NamingException( I18n.err( I18n.ERR_12055 ) );
                 }
 
                 parseAttributeValue( entry, line, lowerLine );
@@ -1354,8 +1355,8 @@
             else
             {
                 // Invalid attribute Value
-                LOG.error( "Expecting an attribute type" );
-                throw new NamingException( "Bad attribute" );
+                LOG.error( I18n.err( I18n.ERR_12056 ) );
+                throw new NamingException( I18n.err( I18n.ERR_12057 ) );
             }
         }
 
@@ -1370,8 +1371,8 @@
         }
         else
         {
-            LOG.error( "Unknown entry type" );
-            throw new NamingException( "Unknown entry" );
+            LOG.error( I18n.err( I18n.ERR_12058 ) );
+            throw new NamingException( I18n.err( I18n.ERR_12059 ) );
         }
 
         return entry;
@@ -1418,8 +1419,8 @@
             // We should not have any other chars after the number
             if ( position.pos != document.length )
             {
-                LOG.error( "The version is not a number" );
-                throw new NamingException( "Ldif parsing error" );
+                LOG.error( I18n.err( I18n.ERR_12060 ) );
+                throw new NamingException( I18n.err( I18n.ERR_12061 ) );
             }
 
             try
@@ -1428,8 +1429,8 @@
             }
             catch ( NumberFormatException nfe )
             {
-                LOG.error( "The version is not a number" );
-                throw new NamingException( "Ldif parsing error" );
+                LOG.error( I18n.err( I18n.ERR_12060 ) );
+                throw new NamingException( I18n.err( I18n.ERR_12061 ) );
             }
 
             LOG.debug( "Ldif version : {}", versionNumber );
@@ -1503,8 +1504,8 @@
                         }
                         else if ( sb.length() == 0 )
                         {
-                            LOG.error( "Cannot have an empty continuation line" );
-                            throw new NamingException( "Ldif Parsing error" );
+                            LOG.error( I18n.err( I18n.ERR_12062 ) );
+                            throw new NamingException( I18n.err( I18n.ERR_12061 ) );
                         }
                         else
                         {
@@ -1532,7 +1533,7 @@
         }
         catch ( IOException ioe )
         {
-            throw new NamingException( "Error while reading ldif lines" );
+            throw new NamingException( I18n.err( I18n.ERR_12063 ) );
         }
 
         // Stores the current line if necessary.
@@ -1575,16 +1576,16 @@
     {
         if ( StringTools.isEmpty( fileName ) )
         {
-            LOG.error( "Cannot parse an empty file name !" );
-            throw new NamingException( "Empty filename" );
+            LOG.error( I18n.err( I18n.ERR_12064 ) );
+            throw new NamingException( I18n.err( I18n.ERR_12065 ) );
         }
 
         File file = new File( fileName );
 
         if ( !file.exists() )
         {
-            LOG.error( "Cannot parse the file {}, it does not exist", fileName );
-            throw new NamingException( "Filename " + fileName + " not found." );
+            LOG.error( I18n.err( I18n.ERR_12066, fileName ) );
+            throw new NamingException( I18n.err( I18n.ERR_12067, fileName ) );
         }
 
         BufferedReader reader = null;
@@ -1600,8 +1601,8 @@
         }
         catch ( FileNotFoundException fnfe )
         {
-            LOG.error( "Cannot find file {}", fileName );
-            throw new NamingException( "Filename " + fileName + " not found." );
+            LOG.error( I18n.err( I18n.ERR_12068, fileName ) );
+            throw new NamingException( I18n.err( I18n.ERR_12067, fileName ) );
         }
         finally
         {
@@ -1656,8 +1657,8 @@
         }
         catch ( NamingException ne )
         {
-            LOG.error( "Cannot parse the ldif buffer : {}", ne.getMessage() );
-            throw new NamingException( "Error while parsing the ldif buffer" );
+            LOG.error( I18n.err( I18n.ERR_12069, ne.getLocalizedMessage() ) );
+            throw new NamingException( I18n.err( I18n.ERR_12070 ) );
         }
         finally
         {
@@ -1713,7 +1714,7 @@
         }
         catch ( NamingException ne )
         {
-            LOG.error( "Premature termination of LDIF iterator" );
+            LOG.error( I18n.err( I18n.ERR_12071 ) );
             error = ne;
             return null;
         }
@@ -1857,7 +1858,7 @@
         }
         catch ( NoSuchElementException nsee )
         {
-            throw new NamingException( "Error while parsing ldif : " + error.getMessage() );
+            throw new NamingException( I18n.err( I18n.ERR_12072, error.getLocalizedMessage() ) );
         }
 
         return entries;
@@ -1887,3 +1888,4 @@
     }
 }
 
+

Modified: directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java?rev=919841&r1=919840&r2=919841&view=diff
==============================================================================
--- directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java (original)
+++ directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifRevertor.java Sat Mar  6 20:18:15 2010
@@ -28,6 +28,7 @@
 import javax.naming.InvalidNameException;
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
@@ -223,8 +224,7 @@
         // Special case if we don't have any reverse modifications
         if ( reverseModifications.size() == 0 )
         {
-            throw new IllegalArgumentException( "Could not deduce reverse modifications from provided modifications: "
-                + forwardModifications );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_12073, forwardModifications ) );
         }
 
         // Now, push the reversed list into the entry
@@ -257,17 +257,17 @@
 
         if ( newSuperiorDn == null )
         {
-            throw new NullPointerException( "newSuperiorDn must not be null" );
+            throw new NullPointerException( I18n.err( I18n.ERR_12074 ) );
         }
 
         if ( modifiedDn == null )
         {
-            throw new NullPointerException( "modifiedDn must not be null" );
+            throw new NullPointerException( I18n.err( I18n.ERR_12075 ) );
         }
 
         if ( modifiedDn.size() == 0 )
         {
-            throw new IllegalArgumentException( "Don't think about moving the rootDSE." );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_12076 ) );
         }
 
         currentParent = ( DN ) modifiedDn.clone();
@@ -434,17 +434,17 @@
 
         if ( newRdn == null )
         {
-            throw new NullPointerException( "The newRdn must not be null" );
+            throw new NullPointerException( I18n.err( I18n.ERR_12077 ) );
         }
 
         if ( parentDn == null )
         {
-            throw new NullPointerException( "The modified Dn must not be null" );
+            throw new NullPointerException( I18n.err( I18n.ERR_12078 ) );
         }
 
         if ( parentDn.size() == 0 )
         {
-            throw new IllegalArgumentException( "Don't think about renaming the rootDSE." );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_12079 ) );
         }
 
         parentDn = ( DN ) entry.getDn().clone();
@@ -466,7 +466,7 @@
                 // We have a simple old RDN, something like A=a
                 // If the values overlap, we can't rename the entry, just get out
                 // with an error
-                throw new NamingException( "Can't rename an entry using the same name ..." ); 
+                throw new NamingException( I18n.err( I18n.ERR_12080 ) ); 
             }
 
             reverted =

Modified: directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java?rev=919841&r1=919840&r2=919841&view=diff
==============================================================================
--- directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java (original)
+++ directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/LdifUtils.java Sat Mar  6 20:18:15 2010
@@ -25,6 +25,7 @@
 import javax.naming.directory.Attributes;
 import javax.naming.directory.InvalidAttributeValueException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
@@ -332,7 +333,7 @@
             case Delete :
                 if ( entry.getEntry() != null )
                 {
-                    throw new NamingException( "Invalid Entry : a deleted entry should not contain attributes" );
+                    throw new NamingException( I18n.err( I18n.ERR_12081 ) );
                 }
                 
                 break;
@@ -340,7 +341,7 @@
             case Add :
                 if ( ( entry.getEntry() == null ) )
                 {
-                    throw new NamingException( "Invalid Entry : a added or modified entry should contain attributes" );
+                    throw new NamingException( I18n.err( I18n.ERR_12082 ) );
                 }
 
                 // Now, iterate through all the attributes
@@ -355,7 +356,7 @@
             case ModRdn :
                 if ( entry.getEntry() != null )
                 {
-                    throw new NamingException( "Invalid Entry : a modifyDN operation entry should not contain attributes" );
+                    throw new NamingException( I18n.err( I18n.ERR_12083 ) );
                 }
                 
                 
@@ -535,7 +536,7 @@
         
         if ( nbChars < 2 )
         {
-            throw new IllegalArgumentException( "The length of each line must be at least 2 chars long" );
+            throw new IllegalArgumentException( I18n.err( I18n.ERR_12084 ) );
         }
         
         // We will first compute the new size of the LDIF result
@@ -606,7 +607,7 @@
             {
                 if ( !(ava instanceof String) )
                 {
-                    throw new InvalidAttributeValueException( "The Attribute ID #" + (pos+1) + " must be a String" );
+                    throw new InvalidAttributeValueException( I18n.err( I18n.ERR_12085, (pos+1) ) );
                 }
                 
                 String attribute = (String)ava;
@@ -635,7 +636,7 @@
                 }
                 else
                 {
-                    throw new InvalidAttributeValueException( "The Attribute value #" + (pos+1) + " must be a String or a byte[]" );
+                    throw new InvalidAttributeValueException( I18n.err( I18n.ERR_12086, (pos+1) ) );
                 }
                 
                 valueExpected = false;
@@ -644,7 +645,7 @@
         
         if ( valueExpected )
         {
-            throw new InvalidAttributeValueException( "A value is missing at the end" );
+            throw new InvalidAttributeValueException( I18n.err( I18n.ERR_12087 ) );
         }
         
         LdifAttributesReader reader = new LdifAttributesReader();

Modified: directory/shared/trunk/ldap-ldif/src/test/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReaderTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-ldif/src/test/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReaderTest.java?rev=919841&r1=919840&r2=919841&view=diff
==============================================================================
--- directory/shared/trunk/ldap-ldif/src/test/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReaderTest.java (original)
+++ directory/shared/trunk/ldap-ldif/src/test/java/org/apache/directory/shared/ldap/ldif/LdifAttributesReaderTest.java Sat Mar  6 20:18:15 2010
@@ -30,6 +30,7 @@
 import javax.naming.directory.Attributes;
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.junit.Before;
@@ -546,15 +547,15 @@
     @Test public void testLdifParserRFC2849Sample4() throws NamingException, Exception
     {
         String ldif = 
-            "# dn:: ou=営業部,o=Airius\n" + 
+            "# dn:: ou=���������,o=Airius\n" + 
             "objectclass: top\n" + 
             "objectclass: organizationalUnit\n" + 
             "ou:: 5Za25qWt6YOo\n" + 
-            "# ou:: 営業部\n" + 
+            "# ou:: ���������\n" + 
             "ou;lang-ja:: 5Za25qWt6YOo\n" + 
-            "# ou;lang-ja:: 営業部\n" + 
+            "# ou;lang-ja:: ���������\n" + 
             "ou;lang-ja;phonetic:: 44GI44GE44GO44KH44GG44G2\n" + 
-            "# ou;lang-ja:: えいぎょうぶ\n" + 
+            "# ou;lang-ja:: ������������������\n" + 
             "ou;lang-en: Sales\n" + 
             "description: Japanese office\n";
 
@@ -567,8 +568,8 @@
                 { "objectclass", "organizationalUnit" },
                 { "ou", "\u55b6\u696d\u90e8" },
                 { "ou;lang-ja", "\u55b6\u696d\u90e8" },
-                { "ou;lang-ja;phonetic", "\u3048\u3044\u304e\u3087\u3046\u3076" }, // 3048 = え, 3044 = い, 304e = ぎ
-                                                                                // 3087 = ょ, 3046 = う, 3076 = ぶ
+                { "ou;lang-ja;phonetic", "\u3048\u3044\u304e\u3087\u3046\u3076" }, // 3048 = ���, 3044 = ���, 304e = ���
+                                                                                // 3087 = ���, 3046 = ���, 3076 = ���
                 { "ou;lang-en", "Sales" },
                 { "description", "Japanese office" }
             }; 
@@ -665,7 +666,7 @@
         }
         catch (NamingException ne)
         {
-            assertEquals( "Error while parsing the ldif buffer", ne.getMessage() );
+        	assertTrue(I18n.err(I18n.ERR_12009), ne.getMessage().startsWith(I18n.ERR_12009));
         }
     }
 

Modified: directory/shared/trunk/ldap-ldif/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-ldif/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java?rev=919841&r1=919840&r2=919841&view=diff
==============================================================================
--- directory/shared/trunk/ldap-ldif/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java (original)
+++ directory/shared/trunk/ldap-ldif/src/test/java/org/apache/directory/shared/ldap/ldif/LdifReaderTest.java Sat Mar  6 20:18:15 2010
@@ -34,6 +34,7 @@
 import java.io.UnsupportedEncodingException;
 import java.util.List;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
@@ -969,20 +970,20 @@
         String ldif = 
             "version: 1\n" + 
             "dn:: b3U95Za25qWt6YOoLG89QWlyaXVz\n" + 
-            "# dn:: ou=営業部,o=Airius\n" + 
+            "# dn:: ou=���������,o=Airius\n" + 
             "objectclass: top\n" + 
             "objectclass: organizationalUnit\n" + 
             "ou:: 5Za25qWt6YOo\n" + 
-            "# ou:: 営業部\n" + 
+            "# ou:: ���������\n" + 
             "ou;lang-ja:: 5Za25qWt6YOo\n" + 
-            "# ou;lang-ja:: 営業部\n" + 
+            "# ou;lang-ja:: ���������\n" + 
             "ou;lang-ja;phonetic:: 44GI44GE44GO44KH44GG44G2\n" + 
-            "# ou;lang-ja:: えいぎょうぶ\n" + 
+            "# ou;lang-ja:: ������������������\n" + 
             "ou;lang-en: Sales\n" + 
             "description: Japanese office\n" + 
             "\n" + 
             "dn:: dWlkPXJvZ2FzYXdhcmEsb3U95Za25qWt6YOoLG89QWlyaXVz\n" + 
-            "# dn:: uid=rogasawara,ou=営業部,o=Airius\n" + 
+            "# dn:: uid=rogasawara,ou=���������,o=Airius\n" + 
             "userpassword: {SHA}O3HSv1MusyL4kTjP+HKI5uxuNoM=\n" + 
             "objectclass: top\n" + 
             "objectclass: person\n" + 
@@ -991,31 +992,31 @@
             "uid: rogasawara\n" + 
             "mail: rogasawara@airius.co.jp\n" + 
             "givenname;lang-ja:: 44Ot44OJ44OL44O8\n" + 
-            "# givenname;lang-ja:: ロドニー\n" + 
+            "# givenname;lang-ja:: ������������\n" + 
             "sn;lang-ja:: 5bCP56yg5Y6f\n" + 
-            "# sn;lang-ja:: 小笠原\n" + 
+            "# sn;lang-ja:: ���������\n" + 
             "cn;lang-ja:: 5bCP56yg5Y6fIOODreODieODi+ODvA==\n" + 
-            "# cn;lang-ja:: 小笠原 ロドニー\n" + 
+            "# cn;lang-ja:: ��������� ������������\n" + 
             "title;lang-ja:: 5Za25qWt6YOoIOmDqOmVtw==\n" + 
-            "# title;lang-ja:: 営業部 部長\n" + 
+            "# title;lang-ja:: ��������� ������\n" + 
             "preferredlanguage: ja\n" + 
             "givenname:: 44Ot44OJ44OL44O8\n" + 
-            "# givenname:: ロドニー\n" + 
+            "# givenname:: ������������\n" + 
             "sn:: 5bCP56yg5Y6f\n" + 
-            "# sn:: 小笠原\n" + 
+            "# sn:: ���������\n" + 
             "cn:: 5bCP56yg5Y6fIOODreODieODi+ODvA==\n" + 
-            "# cn:: 小笠原 ロドニー\n" + 
+            "# cn:: ��������� ������������\n" + 
             "title:: 5Za25qWt6YOoIOmDqOmVtw==\n" + 
-            "# title:: 営業部 部長\n" + 
+            "# title:: ��������� ������\n" + 
             "givenname;lang-ja;phonetic:: 44KN44Gp44Gr44O8\n" + 
-            "# givenname;lang-ja;phonetic:: ろどにー\n" + 
+            "# givenname;lang-ja;phonetic:: ������������\n" + 
             "sn;lang-ja;phonetic:: 44GK44GM44GV44KP44KJ\n" + 
-            "# sn;lang-ja;phonetic:: おがさわら\n" + 
+            "# sn;lang-ja;phonetic:: ���������������\n" + 
             "cn;lang-ja;phonetic:: 44GK44GM44GV44KP44KJIOOCjeOBqeOBq+ODvA==\n" + 
-            "# cn;lang-ja;phonetic:: おがぎわら ろどにー\n" +
+            "# cn;lang-ja;phonetic:: ��������������� ������������\n" +
             "title;lang-ja;phonetic:: 44GI44GE44GO44KH44GG44G2IOOBtuOBoeOCh+OBhg==\n" + 
             "# title;lang-ja;phonetic::\n" + 
-              "# えいぎょうぶ ぶちょう\n" + 
+              "# ������������������ ������������\n" + 
             "givenname;lang-en: Rodney\n" + 
             "sn;lang-en: Ogasawara\n" + 
             "cn;lang-en: Rodney Ogasawara\n" + 
@@ -1028,13 +1029,13 @@
         String[][][] values =
             {
                 {
-                    { "dn", "ou=\u55b6\u696d\u90e8,o=Airius" }, // 55b6 = 営, 696d = 業, 90e8 = 部 
+                    { "dn", "ou=\u55b6\u696d\u90e8,o=Airius" }, // 55b6 = ���, 696d = ���, 90e8 = ��� 
                     { "objectclass", "top" },
                     { "objectclass", "organizationalUnit" },
                     { "ou", "\u55b6\u696d\u90e8" },
                     { "ou;lang-ja", "\u55b6\u696d\u90e8" },
-                    { "ou;lang-ja;phonetic", "\u3048\u3044\u304e\u3087\u3046\u3076" }, // 3048 = え, 3044 = い, 304e = ぎ
-                                                                                    // 3087 = ょ, 3046 = う, 3076 = ぶ
+                    { "ou;lang-ja;phonetic", "\u3048\u3044\u304e\u3087\u3046\u3076" }, // 3048 = ���, 3044 = ���, 304e = ���
+                                                                                    // 3087 = ���, 3046 = ���, 3076 = ���
                     { "ou;lang-en", "Sales" },
                     { "description", "Japanese office" } },
                     {
@@ -1046,19 +1047,19 @@
                     { "objectclass", "inetOrgPerson" },
                     { "uid", "rogasawara" },
                     { "mail", "rogasawara@airius.co.jp" },
-                    { "givenname;lang-ja", "\u30ed\u30c9\u30cb\u30fc" },    // 30ed = ロ, 30c9 = ド, 30cb = ニ, 30fc = ー   
-                    { "sn;lang-ja", "\u5c0f\u7b20\u539f" },    // 5c0f = 小, 7b20 = 笠, 539f = 原  
+                    { "givenname;lang-ja", "\u30ed\u30c9\u30cb\u30fc" },    // 30ed = ���, 30c9 = ���, 30cb = ���, 30fc = ���   
+                    { "sn;lang-ja", "\u5c0f\u7b20\u539f" },    // 5c0f = ���, 7b20 = ���, 539f = ���  
                     { "cn;lang-ja", "\u5c0f\u7b20\u539f \u30ed\u30c9\u30cb\u30fc" },
-                    { "title;lang-ja", "\u55b6\u696d\u90e8 \u90e8\u9577" },   // 9577 = 長
+                    { "title;lang-ja", "\u55b6\u696d\u90e8 \u90e8\u9577" },   // 9577 = ���
                     { "preferredlanguage", "ja" },
                     { "givenname", "\u30ed\u30c9\u30cb\u30fc" },
                     { "sn", "\u5c0f\u7b20\u539f" },
                     { "cn", "\u5c0f\u7b20\u539f \u30ed\u30c9\u30cb\u30fc" },
                     { "title", "\u55b6\u696d\u90e8 \u90e8\u9577" },
-                    { "givenname;lang-ja;phonetic", "\u308d\u3069\u306b\u30fc" },  // 308d = ろ,3069 = ど, 306b = に
-                    { "sn;lang-ja;phonetic", "\u304a\u304c\u3055\u308f\u3089" }, // 304a = お, 304c = が,3055 = さ,308f = わ, 3089 = ら    
+                    { "givenname;lang-ja;phonetic", "\u308d\u3069\u306b\u30fc" },  // 308d = ���,3069 = ���, 306b = ���
+                    { "sn;lang-ja;phonetic", "\u304a\u304c\u3055\u308f\u3089" }, // 304a = ���, 304c = ���,3055 = ���,308f = ���, 3089 = ���    
                     { "cn;lang-ja;phonetic", "\u304a\u304c\u3055\u308f\u3089 \u308d\u3069\u306b\u30fc" },
-                    { "title;lang-ja;phonetic", "\u3048\u3044\u304e\u3087\u3046\u3076 \u3076\u3061\u3087\u3046" }, // 304E = ぎ, 3061 = ち
+                    { "title;lang-ja;phonetic", "\u3048\u3044\u304e\u3087\u3046\u3076 \u3076\u3061\u3087\u3046" }, // 304E = ���, 3061 = ���
                     { "givenname;lang-en", "Rodney" },
                     { "sn;lang-en", "Ogasawara" },
                     { "cn;lang-en", "Rodney Ogasawara" },
@@ -1193,7 +1194,7 @@
         }
         catch (Exception ne)
         {
-            assertEquals( "Error while parsing the ldif buffer", ne.getMessage() );
+        	assertTrue(I18n.err(I18n.ERR_12070), ne.getMessage().startsWith(I18n.ERR_12070));
         }
     }
 

Modified: directory/shared/trunk/ldap-schema-manager/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-manager/pom.xml?rev=919841&r1=919840&r2=919841&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-manager/pom.xml (original)
+++ directory/shared/trunk/ldap-schema-manager/pom.xml Sat Mar  6 20:18:15 2010
@@ -44,6 +44,12 @@
     </dependency>
 
     <dependency>
+      <artifactId>shared-i18n</artifactId>
+      <groupId>${groupId}</groupId>
+      <version>${version}</version>
+    </dependency>  
+
+    <dependency>
       <artifactId>shared-ldap-schema-loader</artifactId>
       <groupId>${groupId}</groupId>
       <version>${version}</version>

Modified: directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java?rev=919841&r1=919840&r2=919841&view=diff
==============================================================================
--- directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java (original)
+++ directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java Sat Mar  6 20:18:15 2010
@@ -29,6 +29,7 @@
 
 import javax.naming.NamingException;
 
+import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.NotImplementedException;
 import org.apache.directory.shared.ldap.constants.MetaSchemaConstants;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
@@ -202,7 +203,7 @@
             }
             else
             {
-                throw new LdapOperationNotSupportedException( "Cannot load the unknown schema " + schemaName, ResultCodeEnum.UNWILLING_TO_PERFORM );
+                throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_11001, schemaName ), ResultCodeEnum.UNWILLING_TO_PERFORM );
             }
         }
 
@@ -668,8 +669,7 @@
                     if ( schemaLoader.getSchema( dependency ) == null )
                     {
                         // The dependency has not been loaded.
-                        String msg = "Cannot load the Schema " + schema.getSchemaName()
-                            + " as one of its dependencies has not been loaded";
+                        String msg = I18n.err( I18n.ERR_11002, schema.getSchemaName() );
                         LOG.info( msg );
                         Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.OTHER );
                         errors.add( error );
@@ -752,7 +752,7 @@
     {
         for ( Entry entry : schemaLoader.loadDitContentRules( schema ) )
         {
-            throw new NotImplementedException( "Need to implement factory " + "method for creating a DitContentRule" );
+            throw new NotImplementedException( I18n.err( I18n.ERR_11003 ) );
         }
     }
 
@@ -764,7 +764,7 @@
     {
         for ( Entry entry : schemaLoader.loadDitStructureRules( schema ) )
         {
-            throw new NotImplementedException( "Need to implement factory " + "method for creating a DitStructureRule" );
+            throw new NotImplementedException( I18n.err( I18n.ERR_11004 ) );
         }
     }
 
@@ -790,7 +790,7 @@
     {
         for ( Entry entry : schemaLoader.loadMatchingRuleUses( schema ) )
         {
-            throw new NotImplementedException( "Need to implement factory " + "method for creating a MatchingRuleUse" );
+            throw new NotImplementedException( I18n.err( I18n.ERR_11005 ) );
         }
     }
 
@@ -802,7 +802,7 @@
     {
         for ( Entry entry : schemaLoader.loadNameForms( schema ) )
         {
-            throw new NotImplementedException( "Need to implement factory " + "method for creating a NameForm" );
+            throw new NotImplementedException( I18n.err( I18n.ERR_11006 ) );
         }
     }
 
@@ -1597,8 +1597,8 @@
             else
             {
                 // We have an invalid SchemaObject, no need to go any further
-                Throwable error = new LdapOperationNotSupportedException( "the SchemaObject " + schemaObject.getOid()
-                    + " canot be added, it's not a valid LoadableSchemaObject.", ResultCodeEnum.UNWILLING_TO_PERFORM );
+                Throwable error = new LdapOperationNotSupportedException( I18n.err( I18n.ERR_11007, schemaObject.getOid() ),
+                		ResultCodeEnum.UNWILLING_TO_PERFORM );
                 errors.add( error );
             }
         }
@@ -1639,8 +1639,8 @@
             // The new schemaObject's OID must not already exist
             if ( checkOidExist( copy ) )
             {
-                Throwable error = new LdapSchemaViolationException( "Oid " + schemaObject.getOid()
-                    + " for new schema entity is not unique.", ResultCodeEnum.OTHER );
+                Throwable error = new LdapSchemaViolationException( I18n.err( I18n.ERR_11008, schemaObject.getOid() ),
+                		ResultCodeEnum.OTHER );
                 errors.add( error );
 
                 return false;
@@ -1652,9 +1652,8 @@
             if ( schemaName == null )
             {
                 // The schema associated with the SchemzaObject does not exist. This is not valid.
-                Throwable error = new LdapOperationNotSupportedException( "Cannot add the SchemaObject "
-                    + schemaObject.getOid() + " into a non existing schema " + copy.getSchemaName(),
-                    ResultCodeEnum.UNWILLING_TO_PERFORM );
+                Throwable error = new LdapOperationNotSupportedException( I18n.err( I18n.ERR_11009, schemaObject.getOid(),
+                		copy.getSchemaName() ), ResultCodeEnum.UNWILLING_TO_PERFORM );
                 errors.add( error );
 
                 return false;
@@ -1668,8 +1667,7 @@
             if ( schema == null )
             {
                 // The SchemaObject must be associated with an existing schema
-                String msg = "Cannot inject the SchemaObject " + copy.getOid()
-                    + " as it's not associated with a schema";
+                String msg = I18n.err( I18n.ERR_11010, copy.getOid() );
                 LOG.info( msg );
                 Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.OTHER );
                 errors.add( error );
@@ -1744,8 +1742,8 @@
             // The new schemaObject's OID must exist
             if ( !checkOidExist( schemaObject ) )
             {
-                Throwable error = new LdapSchemaViolationException( "Oid " + schemaObject.getOid()
-                    + " for new schema entity does not exist.", ResultCodeEnum.OTHER );
+                Throwable error = new LdapSchemaViolationException( I18n.err( I18n.ERR_11011, schemaObject.getOid() ),
+                		ResultCodeEnum.OTHER );
                 errors.add( error );
                 return false;
             }
@@ -1758,9 +1756,7 @@
 
             if ( ( referencing != null ) && !referencing.isEmpty() )
             {
-                String msg = "Cannot remove  " + schemaObject.getOid()
-                    + " for the registries, it would become inconsistent. The following SchemaOjects are "
-                    + "referencing this SchemaObject : " + StringTools.setToString( referencing );
+                String msg = I18n.err( I18n.ERR_11012, schemaObject.getOid(), StringTools.setToString( referencing ) );
 
                 Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.OTHER );
                 errors.add( error );
@@ -1776,8 +1772,7 @@
             if ( schema == null )
             {
                 // The SchemaObject must be associated with an existing schema
-                String msg = "Cannot delete the SchemaObject " + schemaObject.getOid()
-                    + " as it's not associated with a schema";
+                String msg = I18n.err( I18n.ERR_11013, schemaObject.getOid() );
                 LOG.info( msg );
                 Throwable error = new LdapSchemaViolationException( msg, ResultCodeEnum.OTHER );
                 errors.add( error );



Mime
View raw message