You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by fe...@apache.org on 2010/01/21 07:40:14 UTC
svn commit: r901563 - in /directory/sandbox/felixk/apacheds-i18n: core-api/
core-api/src/main/java/org/apache/directory/server/core/schema/
core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/
core-entry/ core-entry/...
Author: felixk
Date: Thu Jan 21 06:38:21 2010
New Revision: 901563
URL: http://svn.apache.org/viewvc?rev=901563&view=rev
Log:
Some i18n extractions ...
Modified:
directory/sandbox/felixk/apacheds-i18n/core-api/pom.xml
directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
directory/sandbox/felixk/apacheds-i18n/core-entry/pom.xml
directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java
directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java
directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java
directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerModification.java
directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java
directory/sandbox/felixk/apacheds-i18n/core-integ/pom.xml
directory/sandbox/felixk/apacheds-i18n/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
directory/sandbox/felixk/apacheds-i18n/core-jndi/pom.xml
directory/sandbox/felixk/apacheds-i18n/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java
directory/sandbox/felixk/apacheds-i18n/http-integration/pom.xml
directory/sandbox/felixk/apacheds-i18n/http-integration/src/main/java/org/apache/directory/server/integration/http/HttpServer.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
directory/sandbox/felixk/apacheds-i18n/interceptor-kerberos/pom.xml
directory/sandbox/felixk/apacheds-i18n/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java
directory/sandbox/felixk/apacheds-i18n/jdbm-store/pom.xml
directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializer.java
directory/sandbox/felixk/apacheds-i18n/kerberos-shared/pom.xml
directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java
directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationData.java
directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/Checksum.java
directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedData.java
directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKey.java
directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddress.java
directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddresses.java
directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PaData.java
directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalName.java
directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncoding.java
directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/StoreUtils.java
directory/sandbox/felixk/apacheds-i18n/ldif-partition/pom.xml
directory/sandbox/felixk/apacheds-i18n/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
Modified: directory/sandbox/felixk/apacheds-i18n/core-api/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-api/pom.xml?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-api/pom.xml (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-api/pom.xml Thu Jan 21 06:38:21 2010
@@ -37,6 +37,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-entry</artifactId>
<version>${pom.version}</version>
</dependency>
Modified: directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/PartitionSchemaLoader.java Thu Jan 21 06:38:21 2010
@@ -36,6 +36,7 @@
import org.apache.directory.server.core.interceptor.context.ListOperationContext;
import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
import org.apache.directory.server.core.partition.Partition;
+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.entry.Entry;
@@ -379,7 +380,7 @@
*/
public List<Entry> loadDitContentRules( Schema... schemas ) throws Exception
{
- LOG.error( "DitContentRule loading NYI" );
+ LOG.error( Err.i18n( Err.ERR_86 ) );
return null;
}
@@ -390,7 +391,7 @@
*/
public List<Entry> loadDitStructureRules( Schema... schemas ) throws Exception
{
- LOG.error( "DitStructureRule loading NYI" );
+ LOG.error( Err.i18n( Err.ERR_87 ) );
return null;
}
@@ -438,7 +439,7 @@
*/
public List<Entry> loadMatchingRuleUses( Schema... schemas ) throws Exception
{
- LOG.error( "MatchingRuleUse loading NYI" );
+ LOG.error( Err.i18n( Err.ERR_88 ) );
return null;
}
@@ -449,7 +450,7 @@
*/
public List<Entry> loadNameForms( Schema... schemas ) throws Exception
{
- LOG.error( "NameForm loading NYI" );
+ LOG.error( Err.i18n( Err.ERR_89 ) );
return null;
}
Modified: directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java Thu Jan 21 06:38:21 2010
@@ -50,6 +50,7 @@
import org.apache.directory.server.core.partition.NullPartition;
import org.apache.directory.server.core.partition.Partition;
import org.apache.directory.server.core.schema.registries.synchronizers.RegistrySynchronizerAdaptor;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.Modification;
import org.apache.directory.shared.ldap.entry.ModificationOperation;
@@ -240,7 +241,7 @@
}
catch ( Exception e )
{
- LOG.error( "Failed to initialize wrapped partition.", e );
+ LOG.error( Err.i18n( Err.ERR_90 ), e );
throw new RuntimeException( e );
}
@@ -258,7 +259,7 @@
}
catch ( Exception e )
{
- LOG.error( "Attempt to destroy wrapped partition failed.", e );
+ LOG.error( Err.i18n( Err.ERR_91 ), e );
throw new RuntimeException( e );
}
}
Modified: directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/RegistrySynchronizerAdaptor.java Thu Jan 21 06:38:21 2010
@@ -33,6 +33,7 @@
import org.apache.directory.server.core.interceptor.context.MoveAndRenameOperationContext;
import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
+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.entry.EntryAttribute;
@@ -186,7 +187,7 @@
{
if ( opContext.getDn().size() != 3 )
{
- String msg = "Schema entity containers of objectClass organizationalUnit should be 3 name components in length.";
+ String msg = Err.i18n( Err.ERR_81 );
LOG.error( msg );
throw new LdapInvalidNameException( msg, ResultCodeEnum.NAMING_VIOLATION );
}
@@ -196,14 +197,14 @@
if ( ! VALID_OU_VALUES.contains( ouValue ) )
{
- String msg = "Expecting organizationalUnit with one of the following names: " + VALID_OU_VALUES;
+ String msg = Err.i18n( Err.ERR_82, VALID_OU_VALUES );
LOG.error( msg );
throw new LdapInvalidNameException( msg, ResultCodeEnum.NAMING_VIOLATION );
}
}
- String msg = "Cannot add an entry on " + opContext.getDn();
+ String msg = Err.i18n( Err.ERR_83, opContext.getDn() );
LOG.error( msg );
throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM );
}
@@ -299,7 +300,7 @@
return false;
}
- LOG.error( String.format( "Unwilling to perform modify on %s:\n\nEntry:\n%s\n\nModifications:\n%s",
+ LOG.error( String.format( Err.i18n( Err.ERR_84 ),
opContext.getDn(), entry, opContext.getModItems() ) );
throw new LdapOperationNotSupportedException( ResultCodeEnum.UNWILLING_TO_PERFORM );
}
Modified: directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SchemaSynchronizer.java Thu Jan 21 06:38:21 2010
@@ -37,6 +37,7 @@
import org.apache.directory.server.core.entry.ServerModification;
import org.apache.directory.server.core.interceptor.context.ModifyOperationContext;
import org.apache.directory.server.core.partition.ByPassConstants;
+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.entry.EntryAttribute;
@@ -574,7 +575,7 @@
if ( schema == null )
{
// This is not possible. We can't enable a schema which is not loaded.
- String msg = "Unwilling to enable a not loaded schema: " + schemaName;
+ String msg = Err.i18n( Err.ERR_85, schemaName );
LOG.error( msg );
throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM );
}
Modified: directory/sandbox/felixk/apacheds-i18n/core-entry/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-entry/pom.xml?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-entry/pom.xml (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-entry/pom.xml Thu Jan 21 06:38:21 2010
@@ -35,6 +35,14 @@
<packaging>jar</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.directory.server</groupId>
+ <artifactId>apacheds-i18n</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ </dependencies>
+
<build>
<plugins>
<plugin>
Modified: directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerAttribute.java Thu Jan 21 06:38:21 2010
@@ -27,6 +27,7 @@
import javax.naming.NamingException;
import javax.naming.directory.InvalidAttributeValueException;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.shared.asn1.primitives.OID;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Value;
@@ -179,7 +180,7 @@
{
if ( attributeType == null )
{
- String message = "The AttributeType parameter should not be null";
+ String message = Err.i18n( Err.ERR_92 );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -337,7 +338,7 @@
catch( NamingException ne )
{
// The value can't be normalized : we don't add it.
- LOG.error( "The value '" + val + "' can't be normalized, it hasn't been added" );
+ LOG.error( Err.i18n( Err.ERR_93, val ) );
return 0;
}
@@ -347,7 +348,7 @@
}
else
{
- LOG.error( "The value '" + val + "' is incorrect, it hasn't been added" );
+ LOG.error( Err.i18n( Err.ERR_94, val ) );
}
}
@@ -396,7 +397,7 @@
}
else
{
- LOG.error( "The value '" + val + "' is incorrect, it hasn't been added" );
+ LOG.error( Err.i18n( Err.ERR_94, val ) );
}
}
}
@@ -459,7 +460,7 @@
}
else
{
- String message = "The value must be a String, as its AttributeType is H/R";
+ String message = Err.i18n( Err.ERR_95 );
LOG.error( message );
}
}
@@ -499,7 +500,7 @@
}
else
{
- String message = "The value must be a byte[], as its AttributeType is not H/R";
+ String message = Err.i18n( Err.ERR_96 );
LOG.error( message );
}
}
@@ -1115,8 +1116,7 @@
}
else
{
- String message = "The upID (" + upId + ") is not an OID or is different from the AttributeType OID (" +
- attributeType.getOid() + ")";
+ String message = Err.i18n( Err.ERR_97, upId, attributeType.getOid() );
// Not a valid OID : use the AttributeTypes OID name instead
LOG.error( message );
throw new IllegalArgumentException( message );
Modified: directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/DefaultServerEntry.java Thu Jan 21 06:38:21 2010
@@ -30,6 +30,7 @@
import javax.naming.NamingException;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.shared.ldap.NotImplementedException;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.AbstractEntry;
@@ -83,7 +84,7 @@
{
if ( StringTools.isEmpty( StringTools.trim( upId ) ) )
{
- String message = "The ID should not be null or empty";
+ String message = Err.i18n( Err.ERR_98 );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -103,7 +104,7 @@
{
if ( StringTools.isEmpty( normUpId ) )
{
- String message = "Cannot add an attribute without an ID";
+ String message = Err.i18n( Err.ERR_99 );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -422,7 +423,7 @@
catch ( NamingException ne )
{
// Just discard the AttributeType
- LOG.error( "We have had an error while adding the '{}' AttributeType : {}", upId, ne.getMessage() );
+ LOG.error( Err.i18n( Err.ERR_100, upId, ne.getMessage() ) );
}
}
@@ -527,7 +528,7 @@
{
if ( attributeType == null )
{
- String message = "The attributeType should not be null";
+ String message = Err.i18n( Err.ERR_101 );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -535,7 +536,7 @@
// ObjectClass with binary values are not allowed
if ( attributeType.equals( OBJECT_CLASS_AT ) )
{
- String message = "Only String values supported for objectClass attribute";
+ String message = Err.i18n( Err.ERR_102 );
LOG.error( message );
throw new UnsupportedOperationException( message );
}
@@ -580,7 +581,7 @@
{
if ( attributeType == null )
{
- String message = "The attributeType should not be null";
+ String message = Err.i18n( Err.ERR_101 );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -625,7 +626,7 @@
{
if ( attributeType == null )
{
- String message = "The attributeType should not be null";
+ String message = Err.i18n( Err.ERR_101 );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -708,7 +709,7 @@
// ObjectClass with binary values are not allowed
if ( attributeType.equals( OBJECT_CLASS_AT ) )
{
- String message = "Only String values supported for objectClass attribute";
+ String message = Err.i18n( Err.ERR_102 );
LOG.error( message );
throw new UnsupportedOperationException( message );
}
@@ -756,7 +757,7 @@
{
if ( attributeType == null )
{
- String message = "The attributeType should not be null";
+ String message = Err.i18n( Err.ERR_101 );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -792,7 +793,7 @@
{
if ( attributeType == null )
{
- String message = "The attributeType should not be null";
+ String message = Err.i18n( Err.ERR_101 );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -1401,7 +1402,7 @@
{
if ( serverAttribute == null )
{
- String message = "The ServerAttribute list should not contain null elements";
+ String message = Err.i18n( Err.ERR_103 );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -1445,7 +1446,7 @@
{
if ( attributeType == null )
{
- String message = "The attributeType should not be null";
+ String message = Err.i18n( Err.ERR_101 );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -1456,7 +1457,7 @@
if ( !tempAT.equals( attributeType ) )
{
- String message = "The '" + upId + "' id is not compatible with the '" + attributeType + "' attribute type";
+ String message = Err.i18n( Err.ERR_104, upId, attributeType );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -1468,7 +1469,7 @@
if ( attributeType.equals( OBJECT_CLASS_AT ) )
{
- String message = "Only String values supported for objectClass attribute";
+ String message = Err.i18n( Err.ERR_102 );
LOG.error( message );
throw new UnsupportedOperationException( message );
}
@@ -1511,7 +1512,7 @@
}
catch ( IllegalArgumentException iae )
{
- String message = "The attributeType should not be null";
+ String message = Err.i18n( Err.ERR_101 );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -1524,7 +1525,7 @@
if ( !tempAT.equals( attributeType ) )
{
- String message = "The '" + upId + "' id is not compatible with the '" + attributeType + "' attribute type";
+ String message = Err.i18n( Err.ERR_104, upId, attributeType );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -1567,7 +1568,7 @@
{
if ( attributeType == null )
{
- String message = "The attributeType should not be null";
+ String message = Err.i18n( Err.ERR_101 );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -1578,7 +1579,7 @@
if ( !tempAT.equals( attributeType ) )
{
- String message = "The '" + upId + "' id is not compatible with the '" + attributeType + "' attribute type";
+ String message = Err.i18n( Err.ERR_104, upId, attributeType );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -1617,8 +1618,7 @@
}
catch ( NamingException ne )
{
- String message = "Error while adding values into the '" + upId + "' attribute. Error : " +
- ne.getMessage();
+ String message = Err.i18n( Err.ERR_105, upId, ne.getMessage() );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -1650,8 +1650,7 @@
}
catch ( NamingException ne )
{
- String message = "Error while adding values into the '" + upId + "' attribute. Error : " +
- ne.getMessage();
+ String message = Err.i18n( Err.ERR_105, upId, ne.getMessage() );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -1682,8 +1681,7 @@
}
catch ( NamingException ne )
{
- String message = "Error while adding values into the '" + upId + "' attribute. Error : " +
- ne.getMessage();
+ String message = Err.i18n( Err.ERR_105, upId, ne.getMessage() );
LOG.error( message );
throw new IllegalArgumentException( message );
}
@@ -1749,7 +1747,7 @@
}
catch ( IllegalArgumentException iae )
{
- LOG.error( "The removal of values for the missing '{}' attribute is not possible", attributeType );
+ LOG.error( Err.i18n( Err.ERR_106, attributeType ) );
return false;
}
}
@@ -1814,7 +1812,7 @@
}
catch ( IllegalArgumentException iae )
{
- LOG.error( "The removal of values for the missing '{}' attribute is not possible", attributeType );
+ LOG.error( Err.i18n( Err.ERR_106, attributeType ) );
return false;
}
}
@@ -1879,7 +1877,7 @@
}
catch ( IllegalArgumentException iae )
{
- LOG.error( "The removal of values for the missing '{}' attribute is not possible", attributeType );
+ LOG.error( Err.i18n( Err.ERR_106, attributeType ) );
return false;
}
}
@@ -1933,12 +1931,12 @@
}
catch ( NamingException ne )
{
- LOG.error( "The removal of values for the missing '{}' attribute is not possible", upId );
+ LOG.error( Err.i18n( Err.ERR_106, upId ) );
return false;
}
catch ( IllegalArgumentException iae )
{
- LOG.error( "The removal of values for the bad '{}' attribute is not possible", upId );
+ LOG.error( Err.i18n( Err.ERR_107, upId ) );
return false;
}
}
@@ -1975,12 +1973,12 @@
}
catch ( NamingException ne )
{
- LOG.error( "The removal of values for the missing '{}' attribute is not possible", upId );
+ LOG.error( Err.i18n( Err.ERR_106, upId ) );
return false;
}
catch ( IllegalArgumentException iae )
{
- LOG.error( "The removal of values for the bad '{}' attribute is not possible", upId );
+ LOG.error( Err.i18n( Err.ERR_107, upId ) );
return false;
}
}
@@ -2017,12 +2015,12 @@
}
catch ( NamingException ne )
{
- LOG.error( "The removal of values for the missing '{}' attribute is not possible", upId );
+ LOG.error( Err.i18n( Err.ERR_106, upId ) );
return false;
}
catch ( IllegalArgumentException iae )
{
- LOG.error( "The removal of values for the bad '{}' attribute is not possible", upId );
+ LOG.error( Err.i18n( Err.ERR_107, upId ) );
return false;
}
}
@@ -2153,7 +2151,7 @@
{
if ( attributeType == null )
{
- String message = "The AttributeType list should not contain null values";
+ String message = Err.i18n( Err.ERR_108 );
LOG.error( message );
continue;
}
Modified: directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerBinaryValue.java Thu Jan 21 06:38:21 2010
@@ -28,6 +28,7 @@
import javax.naming.NamingException;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.shared.ldap.NotImplementedException;
import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
@@ -383,15 +384,13 @@
}
catch ( NamingException e )
{
- String msg = "Failed to compare normalized values for " + Arrays.toString( getReference() ) + " and "
- + value;
+ String msg = Err.i18n( Err.ERR_109, Arrays.toString( getReference() ), value );
LOG.error( msg, e );
throw new IllegalStateException( msg, e );
}
}
- String message = "I don't really know how to compare anything other "
- + "than ServerBinaryValues at this point in time.";
+ String message = Err.i18n( Err.ERR_110 );
LOG.error( message );
throw new NotImplementedException( message );
}
Modified: directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerModification.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerModification.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerModification.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerModification.java Thu Jan 21 06:38:21 2010
@@ -25,6 +25,7 @@
import javax.naming.NamingException;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.shared.ldap.entry.EntryAttribute;
import org.apache.directory.shared.ldap.entry.Modification;
import org.apache.directory.shared.ldap.entry.ModificationOperation;
@@ -103,7 +104,7 @@
catch ( NamingException ne )
{
// The attributeType is incorrect. Log, but do nothing otherwise.
- LOG.error( "The attribute '" + modAttribute.getId() + "' is incorrect" );
+ LOG.error( Err.i18n( Err.ERR_111, modAttribute.getId() ) );
}
}
Modified: directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-entry/src/main/java/org/apache/directory/server/core/entry/ServerStringValue.java Thu Jan 21 06:38:21 2010
@@ -26,6 +26,7 @@
import javax.naming.NamingException;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.shared.ldap.NotImplementedException;
import org.apache.directory.shared.ldap.entry.Value;
import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
@@ -295,7 +296,7 @@
}
catch ( NamingException ne )
{
- String message = "Cannot normalize the wrapped value " + stringValue;
+ String message = Err.i18n( Err.ERR_112, stringValue );
LOG.error( message );
}
@@ -306,7 +307,7 @@
}
catch ( NamingException ne )
{
- String message = "Cannot normalize the wrapped value " + this;
+ String message = Err.i18n( Err.ERR_112, this );
LOG.error( message );
}
@@ -317,13 +318,13 @@
}
catch ( NamingException e )
{
- String msg = "Failed to compare normalized values for " + this + " and " + value;
+ String msg = Err.i18n( Err.ERR_113, this, value );
LOG.error( msg, e );
throw new IllegalStateException( msg, e );
}
}
- String message = "I don't know what to do if value is not a ServerStringValue";
+ String message = Err.i18n( Err.ERR_114 );
LOG.error( message );
throw new NotImplementedException( message );
}
Modified: directory/sandbox/felixk/apacheds-i18n/core-integ/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-integ/pom.xml?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-integ/pom.xml (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-integ/pom.xml Thu Jan 21 06:38:21 2010
@@ -36,6 +36,12 @@
<dependencies>
<dependency>
+ <groupId>org.apache.directory.server</groupId>
+ <artifactId>apacheds-i18n</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>provided</scope>
Modified: directory/sandbox/felixk/apacheds-i18n/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java Thu Jan 21 06:38:21 2010
@@ -38,6 +38,7 @@
import org.apache.directory.server.core.LdapPrincipal;
import org.apache.directory.server.core.entry.DefaultServerEntry;
import org.apache.directory.server.core.jndi.ServerLdapContext;
+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;
@@ -80,12 +81,12 @@
}
catch ( IOException e )
{
- LOG.error( "Failed to delete the working directory.", e );
+ LOG.error( Err.i18n( Err.ERR_115 ), e );
}
}
if ( wkdir.exists() )
{
- throw new IOException( "Failed to delete: " + wkdir );
+ throw new IOException( Err.i18n( Err.ERR_116, wkdir ) );
}
}
@@ -117,8 +118,7 @@
}
else
{
- String message = "Unsupported changetype found in LDIF: " +
- entry.getChangeType();
+ String message = Err.i18n( Err.ERR_117, entry.getChangeType() );
LOG.error( message );
throw new NamingException( message );
}
Modified: directory/sandbox/felixk/apacheds-i18n/core-jndi/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-jndi/pom.xml?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-jndi/pom.xml (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-jndi/pom.xml Thu Jan 21 06:38:21 2010
@@ -41,6 +41,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</artifactId>
<version>${pom.version}</version>
</dependency>
Modified: directory/sandbox/felixk/apacheds-i18n/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/core-jndi/src/main/java/org/apache/directory/server/core/jndi/EventListenerAdapter.java Thu Jan 21 06:38:21 2010
@@ -38,6 +38,7 @@
import org.apache.directory.server.core.interceptor.context.MoveOperationContext;
import org.apache.directory.server.core.interceptor.context.OperationContext;
import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
+import org.apache.directory.server.i18n.Err;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -92,7 +93,7 @@
private void deliverNamingExceptionEvent( Exception e, OperationContext opContext )
{
- LOG.error( "Error encountered while delivering notifications.", e );
+ LOG.error( Err.i18n( Err.ERR_118 ), e );
NamingExceptionEvent evt = null;
if ( e instanceof NamingException )
@@ -101,7 +102,7 @@
}
else
{
- NamingException ne = new NamingException( "Encountered exception during event handling." );
+ NamingException ne = new NamingException( Err.i18n( Err.ERR_119 ) );
ne.setRootCause( e );
evt = new NamingExceptionEvent( source, ne );
}
Modified: directory/sandbox/felixk/apacheds-i18n/http-integration/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/http-integration/pom.xml?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/http-integration/pom.xml (original)
+++ directory/sandbox/felixk/apacheds-i18n/http-integration/pom.xml Thu Jan 21 06:38:21 2010
@@ -37,6 +37,11 @@
<dependencies>
<dependency>
+ <groupId>org.apache.directory.server</groupId>
+ <artifactId>apacheds-i18n</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<version>${jetty.version}</version>
Modified: directory/sandbox/felixk/apacheds-i18n/http-integration/src/main/java/org/apache/directory/server/integration/http/HttpServer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/http-integration/src/main/java/org/apache/directory/server/integration/http/HttpServer.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/http-integration/src/main/java/org/apache/directory/server/integration/http/HttpServer.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/http-integration/src/main/java/org/apache/directory/server/integration/http/HttpServer.java Thu Jan 21 06:38:21 2010
@@ -26,6 +26,7 @@
import java.util.List;
import java.util.Set;
+import org.apache.directory.server.i18n.Err;
import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Handler;
import org.mortbay.jetty.Server;
@@ -99,7 +100,7 @@
}
catch ( Exception e )
{
- LOG.error( "Failed to configure the jetty http server" );
+ LOG.error( Err.i18n( Err.ERR_120 ) );
throw e;
}
}
@@ -150,7 +151,7 @@
}
catch ( Exception e )
{
- LOG.error( "Failed to configure the web application(s)", e );
+ LOG.error( Err.i18n( Err.ERR_121 ), 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=901563&r1=901562&r2=901563&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 06:38:21 2010
@@ -135,6 +135,105 @@
public static String ERR_98 = "ERR 98";
public static String ERR_99 = "ERR 99";
public static String ERR_100 = "ERR 100";
+ public static String ERR_101 = "ERR 101";
+ public static String ERR_102 = "ERR 102";
+ public static String ERR_103 = "ERR 103";
+ public static String ERR_104 = "ERR 104";
+ public static String ERR_105 = "ERR 105";
+ public static String ERR_106 = "ERR 106";
+ public static String ERR_107 = "ERR 107";
+ public static String ERR_108 = "ERR 108";
+ public static String ERR_109 = "ERR 109";
+ public static String ERR_110 = "ERR 110";
+ public static String ERR_111 = "ERR 111";
+ public static String ERR_112 = "ERR 112";
+ public static String ERR_113 = "ERR 113";
+ public static String ERR_114 = "ERR 114";
+ public static String ERR_115 = "ERR 115";
+ public static String ERR_116 = "ERR 116";
+ public static String ERR_117 = "ERR 117";
+ public static String ERR_118 = "ERR 118";
+ public static String ERR_119 = "ERR 119";
+ public static String ERR_120 = "ERR 120";
+ public static String ERR_121 = "ERR 121";
+ public static String ERR_122 = "ERR 122";
+ public static String ERR_123 = "ERR 123";
+ public static String ERR_124 = "ERR 124";
+ public static String ERR_125 = "ERR 125";
+ public static String ERR_126 = "ERR 126";
+ public static String ERR_127 = "ERR 127";
+ public static String ERR_128 = "ERR 128";
+ public static String ERR_129 = "ERR 129";
+ public static String ERR_130 = "ERR 130";
+ public static String ERR_131 = "ERR 131";
+ public static String ERR_132 = "ERR 132";
+ public static String ERR_133 = "ERR 133";
+ public static String ERR_134 = "ERR 134";
+ public static String ERR_135 = "ERR 135";
+ public static String ERR_136 = "ERR 136";
+ public static String ERR_137 = "ERR 137";
+ public static String ERR_138 = "ERR 138";
+ public static String ERR_139 = "ERR 139";
+ public static String ERR_140 = "ERR 140";
+ public static String ERR_141 = "ERR 141";
+ public static String ERR_142 = "ERR 142";
+ public static String ERR_143 = "ERR 143";
+ public static String ERR_144 = "ERR 144";
+ public static String ERR_145 = "ERR 145";
+ public static String ERR_146 = "ERR 146";
+ public static String ERR_147 = "ERR 147";
+ public static String ERR_148 = "ERR 148";
+ public static String ERR_149 = "ERR 149";
+ public static String ERR_150 = "ERR 150";
+ public static String ERR_151 = "ERR 151";
+ public static String ERR_152 = "ERR 152";
+ public static String ERR_153 = "ERR 153";
+ public static String ERR_154 = "ERR 154";
+ public static String ERR_155 = "ERR 155";
+ public static String ERR_156 = "ERR 156";
+ public static String ERR_157 = "ERR 157";
+ public static String ERR_158 = "ERR 158";
+ public static String ERR_159 = "ERR 159";
+ public static String ERR_160 = "ERR 160";
+ public static String ERR_161 = "ERR 161";
+ public static String ERR_162 = "ERR 162";
+ public static String ERR_163 = "ERR 163";
+ public static String ERR_164 = "ERR 164";
+ public static String ERR_165 = "ERR 165";
+ public static String ERR_166 = "ERR 166";
+ public static String ERR_167 = "ERR 167";
+ public static String ERR_168 = "ERR 168";
+ public static String ERR_169 = "ERR 169";
+ public static String ERR_170 = "ERR 170";
+ public static String ERR_171 = "ERR 171";
+ public static String ERR_172 = "ERR 172";
+ public static String ERR_173 = "ERR 173";
+ public static String ERR_174 = "ERR 174";
+ public static String ERR_175 = "ERR 175";
+ public static String ERR_176 = "ERR 176";
+ public static String ERR_177 = "ERR 177";
+ public static String ERR_178 = "ERR 178";
+ public static String ERR_179 = "ERR 179";
+ public static String ERR_180 = "ERR 180";
+ public static String ERR_181 = "ERR 181";
+ public static String ERR_182 = "ERR 182";
+ public static String ERR_183 = "ERR 183";
+ public static String ERR_184 = "ERR 184";
+ public static String ERR_185 = "ERR 185";
+ public static String ERR_186 = "ERR 186";
+ public static String ERR_187 = "ERR 187";
+ public static String ERR_188 = "ERR 188";
+ public static String ERR_189 = "ERR 189";
+ public static String ERR_190 = "ERR 190";
+ public static String ERR_191 = "ERR 191";
+ public static String ERR_192 = "ERR 192";
+ public static String ERR_193 = "ERR 193";
+ public static String ERR_194 = "ERR 194";
+ public static String ERR_195 = "ERR 195";
+ public static String ERR_196 = "ERR 196";
+ public static String ERR_197 = "ERR 197";
+ public static String ERR_198 = "ERR 198";
+ public static String ERR_199 = "ERR 199";
/**
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=901563&r1=901562&r2=901563&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 06:38:21 2010
@@ -98,23 +98,122 @@
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=
+ERR\ 81=Schema entity containers of objectClass organizationalUnit should be 3 name components in length.
+ERR\ 82=Expecting organizationalUnit with one of the following names: {0}
+ERR\ 83=Cannot add an entry on {0}
+ERR\ 84=Unwilling to perform modify on %s:\n\nEntry:\n%s\n\nModifications:\n%s
+ERR\ 85=Unwilling to enable a not loaded schema: {0}
+ERR\ 86=DitContentRule loading NYI
+ERR\ 87=DitStructureRule loading NYI
+ERR\ 88=MatchingRuleUse loading NYI
+ERR\ 89=NameForm loading NYI
+ERR\ 90=Failed to initialize wrapped partition.
+ERR\ 91=Attempt to destroy wrapped partition failed.
+ERR\ 92=The AttributeType parameter should not be null
+ERR\ 93=The value '{0}' can't be normalized, it hasn't been added
+ERR\ 94=The value '{0}' is incorrect, it hasn't been added
+ERR\ 95=The value must be a String, as its AttributeType is H/R
+ERR\ 96=The value must be a byte[], as its AttributeType is not H/R
+ERR\ 97=The upID ({0}) is not an OID or is different from the AttributeType OID ({1})
+ERR\ 98=The ID should not be null or empty
+ERR\ 99=Cannot add an attribute without an ID
+ERR\ 100=We have had an error while adding the '{0}' AttributeType : {1}
+ERR\ 101=The attributeType should not be null
+ERR\ 102=Only String values supported for objectClass attribute
+ERR\ 103=The ServerAttribute list should not contain null elements
+ERR\ 104=The '{0}' id is not compatible with the '{1}' attribute type
+ERR\ 105=Error while adding values into the '{0}' attribute. Error : {1}
+ERR\ 106=The removal of values for the missing '{0}' attribute is not possible
+ERR\ 107=The removal of values for the bad '{0}' attribute is not possible
+ERR\ 108=The AttributeType list should not contain null values
+ERR\ 109=Failed to compare normalized values for {0} and {1}
+ERR\ 110=I don't really know how to compare anything other than ServerBinaryValues at this point in time.
+ERR\ 111=The attribute '{0}' is incorrect
+ERR\ 112=Cannot normalize the wrapped value {0}
+ERR\ 113=Failed to compare normalized values for {0} and {1}
+ERR\ 114=I don't know what to do if value is not a ServerStringValue
+ERR\ 115=Failed to delete the working directory.
+ERR\ 116=Failed to delete:
+ERR\ 117=Unsupported changetype found in LDIF: {0}
+ERR\ 118=Error encountered while delivering notifications.
+ERR\ 119=Encountered exception during event handling.
+ERR\ 120=Failed to configure the jetty http server
+ERR\ 121=Failed to configure the web application(s)
+ERR\ 122=Error encoding EncryptionKey.
+ERR\ 123=Cannot build an index for attribute '{0}', no EQUALITY MatchingRule defined
+ERR\ 124=Failed to close an index.
+ERR\ 125=Closed master table for {0} partition.
+ERR\ 126=Failed to close the master.
+ERR\ 127=Failed to close the record manager
+ERR\ 128=Failed to identify OID for:
+ERR\ 129=A user index on attribute {0} ({1}) does not exist!
+ERR\ 130=A system index on attribute {0} ({1}) does not exist!
+ERR\ 131=Error while adding {0} on table {1}
+ERR\ 132=Error while adding {0}, {1} on table {2}
+ERR\ 133=Exception while removing {0} from index {1}
+ERR\ 134=Cannot deserialize the entry : {0}
+ERR\ 135=Cannot create a ticket for the {0} KerberosPrincipal, error : {1}
+ERR\ 136=Cannot create a ticket : {0}
+ERR\ 137=Cannot encode the Ticket object, the PDU size is {0} when only {1} bytes has been allocated
+ERR\ 138=The PDU buffer size is too small !
+ERR\ 139=Cannot encode the AuthorizationData object, the PDU size is {0} when only {1} bytes has been allocated
+ERR\ 140=Cannot encode the Checksum object, the PDU size is {0} when only {1} bytes has been allocated
+ERR\ 141=Cannot encode the EncryptedData object, the PDU size is {0} when only {1} bytes has been allocated
+ERR\ 142=Cannot encode the EncryptionKey object, the PDU size is {0} when only {1} bytes has been allocated
+ERR\ 143=Cannot encode the HostAddress object, the PDU size is {0} when only {1} bytes has been allocated
+ERR\ 144=Cannot encode the HostAddresses object, the PDU size is {0} when only {1} bytes has been allocated
+ERR\ 145=Cannot encode the PreAuthenticationData object, the PDU size is {0} when only {1} bytes has been allocated
+ERR\ 146=Cannot encode the principalName object, the PDU size is {0} when only {1} bytes has been allocated
+ERR\ 147=Cannot encode the TransitedEncoding object, the PDU size is {0} when only {1} bytes has been allocated
+ERR\ 148=Cannot put a PDU in a null buffer !
+ERR\ 149=More than one server entry found for kerberos principal name {0}:
+ERR\ 150=Cannot initialize a partition without a valid suffix
+ERR\ 151=The {0} can't be created : {1}
+ERR\ 152=
+ERR\ 153=
+ERR\ 154=
+ERR\ 155=
+ERR\ 156=
+ERR\ 157=
+ERR\ 158=
+ERR\ 159=
+ERR\ 160=
+ERR\ 161=
+ERR\ 162=
+ERR\ 163=
+ERR\ 164=
+ERR\ 165=
+ERR\ 166=
+ERR\ 167=
+ERR\ 168=
+ERR\ 169=
+ERR\ 170=
+ERR\ 171=
+ERR\ 172=
+ERR\ 173=
+ERR\ 174=
+ERR\ 175=
+ERR\ 176=
+ERR\ 177=
+ERR\ 178=
+ERR\ 179=
+ERR\ 180=
+ERR\ 181=
+ERR\ 182=
+ERR\ 183=
+ERR\ 184=
+ERR\ 185=
+ERR\ 186=
+ERR\ 187=
+ERR\ 188=
+ERR\ 189=
+ERR\ 190=
+ERR\ 191=
+ERR\ 192=
+ERR\ 193=
+ERR\ 194=
+ERR\ 195=
+ERR\ 196=
+ERR\ 197=
+ERR\ 198=
+ERR\ 199=
Modified: directory/sandbox/felixk/apacheds-i18n/interceptor-kerberos/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/interceptor-kerberos/pom.xml?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/interceptor-kerberos/pom.xml (original)
+++ directory/sandbox/felixk/apacheds-i18n/interceptor-kerberos/pom.xml Thu Jan 21 06:38:21 2010
@@ -37,6 +37,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</artifactId>
<version>${pom.version}</version>
</dependency>
Modified: directory/sandbox/felixk/apacheds-i18n/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java Thu Jan 21 06:38:21 2010
@@ -57,6 +57,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.server.kerberos.shared.crypto.encryption.EncryptionType;
import org.apache.directory.server.kerberos.shared.crypto.encryption.KerberosKeyFactory;
import org.apache.directory.server.kerberos.shared.crypto.encryption.RandomKeyFactory;
@@ -411,7 +412,7 @@
}
catch ( IOException ioe )
{
- log.error( "Error encoding EncryptionKey.", ioe );
+ log.error( Err.i18n( Err.ERR_122 ), ioe );
}
}
Modified: directory/sandbox/felixk/apacheds-i18n/jdbm-store/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/jdbm-store/pom.xml?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/jdbm-store/pom.xml (original)
+++ directory/sandbox/felixk/apacheds-i18n/jdbm-store/pom.xml Thu Jan 21 06:38:21 2010
@@ -43,6 +43,12 @@
<dependencies>
<dependency>
<groupId>${pom.groupId}</groupId>
+ <artifactId>apacheds-i18n</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>${pom.groupId}</groupId>
<version>${pom.version}</version>
<artifactId>apacheds-jdbm</artifactId>
</dependency>
Modified: directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java Thu Jan 21 06:38:21 2010
@@ -40,6 +40,7 @@
import org.apache.directory.server.core.entry.ClonedServerEntry;
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.server.xdbm.Index;
import org.apache.directory.server.xdbm.IndexCursor;
import org.apache.directory.server.xdbm.IndexEntry;
@@ -429,8 +430,7 @@
}
else
{
- LOG.error( "Cannot build an index for attribute '{}', no EQUALITY MatchingRule defined",
- attributeType.getName() );
+ LOG.error( Err.i18n( Err.ERR_123, attributeType.getName() ) );
}
}
@@ -472,7 +472,7 @@
}
catch ( Throwable t )
{
- LOG.error( "Failed to close an index.", t );
+ LOG.error( Err.i18n( Err.ERR_124 ), t );
errors.addThrowable( t );
}
}
@@ -480,11 +480,11 @@
try
{
master.close();
- LOG.debug( "Closed master table for {} partition.", suffixDn );
+ LOG.debug( Err.i18n( Err.ERR_125, suffixDn ) );
}
catch ( Throwable t )
{
- LOG.error( "Failed to close the master.", t );
+ LOG.error( Err.i18n( Err.ERR_126 ), t );
errors.addThrowable( t );
}
@@ -495,7 +495,7 @@
}
catch ( Throwable t )
{
- LOG.error( "Failed to close the record manager", t );
+ LOG.error( Err.i18n( Err.ERR_127 ), t );
errors.addThrowable( t );
}
@@ -855,8 +855,9 @@
}
catch ( NamingException e )
{
- LOG.error( "Failed to identify OID for: " + id, e );
- throw new IndexNotFoundException( "Failed to identify OID for: " + id, id, e );
+ String msg = Err.i18n( Err.ERR_128, id );
+ LOG.error( msg, e );
+ throw new IndexNotFoundException( msg, id, e );
}
if ( userIndices.containsKey( id ) )
@@ -864,8 +865,7 @@
return userIndices.get( id );
}
- throw new IndexNotFoundException( "A user index on attribute " + id + " ("
- + name + ") does not exist!" );
+ throw new IndexNotFoundException( Err.i18n( Err.ERR_129, id, name ) );
}
@@ -877,8 +877,9 @@
}
catch ( NamingException e )
{
- LOG.error( "Failed to identify OID for: " + id, e );
- throw new IndexNotFoundException( "Failed to identify OID for: " + id, id, e );
+ String msg = Err.i18n( Err.ERR_128, id );
+ LOG.error( msg, e );
+ throw new IndexNotFoundException( msg, id, e );
}
if ( systemIndices.containsKey( id ) )
@@ -886,8 +887,7 @@
return systemIndices.get( id );
}
- throw new IndexNotFoundException( "A system index on attribute " + id + " ("
- + name + ") does not exist!" );
+ throw new IndexNotFoundException( Err.i18n( Err.ERR_130, id, name ) );
}
Modified: directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java Thu Jan 21 06:38:21 2010
@@ -33,6 +33,7 @@
import org.apache.directory.server.core.avltree.ArrayTree;
import org.apache.directory.server.core.avltree.ArrayTreeCursor;
import org.apache.directory.server.core.avltree.Marshaller;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.server.xdbm.Table;
import org.apache.directory.shared.ldap.cursor.Cursor;
import org.apache.directory.shared.ldap.cursor.EmptyCursor;
@@ -684,7 +685,7 @@
}
catch ( Exception e )
{
- LOG.error( "Error while adding " + key + " on table " + name, e );
+ LOG.error( Err.i18n( Err.ERR_131, key, name ), e );
throw e;
}
}
@@ -795,7 +796,7 @@
}
catch ( Exception e )
{
- LOG.error( "Error while adding " + key + ", " + value + " on table " + name, e );
+ LOG.error( Err.i18n( Err.ERR_132, key, value, name ), e );
}
}
@@ -870,7 +871,7 @@
}
catch ( Exception e )
{
- LOG.error( "Exception while removing " + key + " from index " + name, e );
+ LOG.error( Err.i18n( Err.ERR_133, key, name ), e );
if ( e instanceof IOException )
{
Modified: directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializer.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializer.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializer.java Thu Jan 21 06:38:21 2010
@@ -28,6 +28,7 @@
import jdbm.helper.Serializer;
import org.apache.directory.server.core.entry.DefaultServerEntry;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.shared.ldap.schema.SchemaManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -155,7 +156,7 @@
}
catch ( ClassNotFoundException cnfe )
{
- LOG.error( "Cannot deserialize the entry :" + cnfe.getMessage() );
+ LOG.error( Err.i18n( Err.ERR_134, cnfe.getMessage() ) );
return null;
}
}
Modified: directory/sandbox/felixk/apacheds-i18n/kerberos-shared/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/kerberos-shared/pom.xml?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/kerberos-shared/pom.xml (original)
+++ directory/sandbox/felixk/apacheds-i18n/kerberos-shared/pom.xml Thu Jan 21 06:38:21 2010
@@ -36,6 +36,12 @@
<packaging>jar</packaging>
<dependencies>
+ <dependency>
+ <groupId>org.apache.directory.server</groupId>
+ <artifactId>apacheds-i18n</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+
<!-- TODO remove dependency on JNDI core -->
<dependency>
<groupId>org.apache.directory.server</groupId>
Modified: directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java Thu Jan 21 06:38:21 2010
@@ -26,6 +26,7 @@
import javax.security.auth.kerberos.KerberosPrincipal;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.server.kerberos.shared.KerberosConstants;
import org.apache.directory.server.kerberos.shared.KerberosUtils;
import org.apache.directory.server.kerberos.shared.exceptions.ErrorType;
@@ -198,8 +199,8 @@
}
catch ( ParseException pe )
{
- LOG.error( "Cannot create a ticket for the {} KerberosPrincipal, error : {}", serverPrincipal, pe.getMessage() );
- throw new InvalidTicketException( ErrorType.KRB_ERR_GENERIC, "Cannot create a ticket : " + pe.getMessage() );
+ LOG.error( Err.i18n( Err.ERR_135, serverPrincipal, pe.getMessage() ) );
+ throw new InvalidTicketException( ErrorType.KRB_ERR_GENERIC, Err.i18n( Err.ERR_136, pe.getLocalizedMessage() ) );
}
}
@@ -520,9 +521,9 @@
}
catch ( BufferOverflowException boe )
{
- LOG.error( "Cannot encode the Ticket object, the PDU size is {} when only {} bytes has been allocated", 1
- + TLV.getNbBytes( ticketLength ) + ticketLength, buffer.capacity() );
- throw new EncoderException( "The PDU buffer size is too small !" );
+ LOG.error( Err.i18n( Err.ERR_137, 1 + TLV.getNbBytes( ticketLength ) + ticketLength,
+ buffer.capacity() ) );
+ throw new EncoderException( Err.i18n( Err.ERR_138 ) );
}
if ( IS_DEBUG )
Modified: directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationData.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationData.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationData.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationData.java Thu Jan 21 06:38:21 2010
@@ -25,6 +25,7 @@
import java.util.ArrayList;
import java.util.List;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.server.kerberos.shared.messages.Encodable;
import org.apache.directory.shared.asn1.AbstractAsn1Object;
import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -178,10 +179,9 @@
}
catch ( BufferOverflowException boe )
{
- log.error(
- "Cannot encode the AuthorizationData object, the PDU size is {} when only {} bytes has been allocated",
- 1 + TLV.getNbBytes( authorizationDataLength ) + authorizationDataLength, buffer.capacity() );
- throw new EncoderException( "The PDU buffer size is too small !" );
+ log.error( Err.i18n( Err.ERR_139, 1 + TLV.getNbBytes( authorizationDataLength ) +
+ authorizationDataLength, buffer.capacity() ) );
+ throw new EncoderException( Err.i18n( Err.ERR_138 ) );
}
if ( IS_DEBUG )
Modified: directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/Checksum.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/Checksum.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/Checksum.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/Checksum.java Thu Jan 21 06:38:21 2010
@@ -24,6 +24,7 @@
import java.nio.ByteBuffer;
import java.util.Arrays;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.server.kerberos.shared.crypto.checksum.ChecksumType;
import org.apache.directory.shared.asn1.AbstractAsn1Object;
import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -240,9 +241,9 @@
}
catch ( BufferOverflowException boe )
{
- log.error( "Cannot encode the Checksum object, the PDU size is {} when only {} bytes has been allocated", 1
- + TLV.getNbBytes( checksumLength ) + checksumLength, buffer.capacity() );
- throw new EncoderException( "The PDU buffer size is too small !" );
+ log.error( Err.i18n( Err.ERR_140, 1 + TLV.getNbBytes( checksumLength ) + checksumLength,
+ buffer.capacity() ) );
+ throw new EncoderException( Err.i18n( Err.ERR_138 ) );
}
if ( IS_DEBUG )
Modified: directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedData.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedData.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedData.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedData.java Thu Jan 21 06:38:21 2010
@@ -23,6 +23,7 @@
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
import org.apache.directory.shared.asn1.AbstractAsn1Object;
import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -295,10 +296,9 @@
}
catch ( BufferOverflowException boe )
{
- log.error(
- "Cannot encode the EncryptedData object, the PDU size is {} when only {} bytes has been allocated", 1
- + TLV.getNbBytes( encryptedDataSeqLength ) + encryptedDataSeqLength, buffer.capacity() );
- throw new EncoderException( "The PDU buffer size is too small !" );
+ log.error( Err.i18n( Err.ERR_141, 1 + TLV.getNbBytes( encryptedDataSeqLength )
+ + encryptedDataSeqLength, buffer.capacity() ) );
+ throw new EncoderException( Err.i18n( Err.ERR_138 ) );
}
if ( IS_DEBUG )
Modified: directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKey.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKey.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKey.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKey.java Thu Jan 21 06:38:21 2010
@@ -24,6 +24,7 @@
import java.nio.ByteBuffer;
import java.util.Arrays;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
import org.apache.directory.shared.asn1.AbstractAsn1Object;
import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -289,10 +290,9 @@
}
catch ( BufferOverflowException boe )
{
- log.error(
- "Cannot encode the EncryptionKey object, the PDU size is {} when only {} bytes has been allocated", 1
- + TLV.getNbBytes( encryptionKeyLength ) + encryptionKeyLength, buffer.capacity() );
- throw new EncoderException( "The PDU buffer size is too small !" );
+ log.error( Err.i18n( Err.ERR_142, 1 + TLV.getNbBytes( encryptionKeyLength )
+ + encryptionKeyLength, buffer.capacity() ) );
+ throw new EncoderException( Err.i18n( Err.ERR_138 ) );
}
if ( IS_DEBUG )
Modified: directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddress.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddress.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddress.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddress.java Thu Jan 21 06:38:21 2010
@@ -25,6 +25,7 @@
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.server.kerberos.shared.messages.value.types.HostAddrType;
import org.apache.directory.shared.asn1.AbstractAsn1Object;
import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -263,10 +264,9 @@
}
catch ( BufferOverflowException boe )
{
- LOG.error(
- "Cannot encode the HostAddress object, the PDU size is {} when only {} bytes has been allocated", 1
- + TLV.getNbBytes( hostAddressLength ) + hostAddressLength, buffer.capacity() );
- throw new EncoderException( "The PDU buffer size is too small !" );
+ LOG.error( Err.i18n( Err.ERR_143, 1 + TLV.getNbBytes( hostAddressLength )
+ + hostAddressLength, buffer.capacity() ) );
+ throw new EncoderException( Err.i18n( Err.ERR_138 ) );
}
if ( IS_DEBUG )
Modified: directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddresses.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddresses.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddresses.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddresses.java Thu Jan 21 06:38:21 2010
@@ -26,6 +26,7 @@
import java.util.Arrays;
import java.util.List;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.shared.asn1.AbstractAsn1Object;
import org.apache.directory.shared.asn1.ber.tlv.TLV;
import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
@@ -236,10 +237,9 @@
}
catch ( BufferOverflowException boe )
{
- LOG.error(
- "Cannot encode the HostAddresses object, the PDU size is {} when only {} bytes has been allocated", 1
- + TLV.getNbBytes( addressesLength ) + addressesLength, buffer.capacity() );
- throw new EncoderException( "The PDU buffer size is too small !" );
+ LOG.error( Err.i18n( Err.ERR_144, 1 + TLV.getNbBytes( addressesLength )
+ + addressesLength, buffer.capacity() ) );
+ throw new EncoderException( Err.i18n( Err.ERR_138 ) );
}
if ( IS_DEBUG )
Modified: directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PaData.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PaData.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PaData.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PaData.java Thu Jan 21 06:38:21 2010
@@ -23,6 +23,7 @@
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.server.kerberos.shared.messages.value.types.PaDataType;
import org.apache.directory.shared.asn1.AbstractAsn1Object;
import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -228,9 +229,9 @@
}
catch ( BufferOverflowException boe )
{
- log.error( "Cannot encode the PreAuthenticationData object, the PDU size is {} when only {} bytes has been allocated", 1
- + TLV.getNbBytes( preAuthenticationDataSeqLength ) + preAuthenticationDataSeqLength, buffer.capacity() );
- throw new EncoderException( "The PDU buffer size is too small !" );
+ log.error( Err.i18n( Err.ERR_145, 1 + TLV.getNbBytes( preAuthenticationDataSeqLength )
+ + preAuthenticationDataSeqLength, buffer.capacity() ) );
+ throw new EncoderException( Err.i18n( Err.ERR_138 ) );
}
if ( IS_DEBUG )
Modified: directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalName.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalName.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalName.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalName.java Thu Jan 21 06:38:21 2010
@@ -95,6 +95,7 @@
import javax.security.auth.kerberos.KerberosPrincipal;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.server.kerberos.shared.KerberosUtils;
import org.apache.directory.server.kerberos.shared.messages.value.types.PrincipalNameType;
import org.apache.directory.shared.asn1.AbstractAsn1Object;
@@ -423,10 +424,9 @@
}
catch ( BufferOverflowException boe )
{
- LOG.error(
- "Cannot encode the principalName object, the PDU size is {} when only {} bytes has been allocated", 1
- + TLV.getNbBytes( principalNameSeqLength ) + principalNameSeqLength, buffer.capacity() );
- throw new EncoderException( "The PDU buffer size is too small !" );
+ LOG.error( Err.i18n( Err.ERR_146, 1 + TLV.getNbBytes( principalNameSeqLength )
+ + principalNameSeqLength, buffer.capacity() ) );
+ throw new EncoderException( Err.i18n( Err.ERR_138 ) );
}
if ( IS_DEBUG )
Modified: directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncoding.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncoding.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncoding.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncoding.java Thu Jan 21 06:38:21 2010
@@ -23,6 +23,7 @@
import java.nio.BufferOverflowException;
import java.nio.ByteBuffer;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.server.kerberos.shared.messages.value.types.TransitedEncodingType;
import org.apache.directory.shared.asn1.AbstractAsn1Object;
import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -202,7 +203,7 @@
{
if ( buffer == null )
{
- throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+ throw new EncoderException( Err.i18n( Err.ERR_148 ) );
}
try
@@ -223,10 +224,9 @@
}
catch ( BufferOverflowException boe )
{
- log.error(
- "Cannot encode the TransitedEncoding object, the PDU size is {} when only {} bytes has been allocated",
- 1 + TLV.getNbBytes( transitedEncodingLength ) + transitedEncodingLength, buffer.capacity() );
- throw new EncoderException( "The PDU buffer size is too small !" );
+ log.error( Err.i18n( Err.ERR_147, 1 + TLV.getNbBytes( transitedEncodingLength )
+ + transitedEncodingLength, buffer.capacity() ) );
+ throw new EncoderException( Err.i18n( Err.ERR_138 ) );
}
if ( IS_DEBUG )
Modified: directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/StoreUtils.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/StoreUtils.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/StoreUtils.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/StoreUtils.java Thu Jan 21 06:38:21 2010
@@ -23,6 +23,7 @@
import org.apache.directory.server.core.entry.ServerEntry;
import org.apache.directory.server.core.entry.ServerStringValue;
import org.apache.directory.server.core.filtering.EntryFilteringCursor;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
import org.apache.directory.server.kerberos.shared.io.encoder.EncryptionKeyEncoder;
import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
@@ -137,8 +138,7 @@
while ( cursor.next() )
{
- LOG.error( "More than one server entry found for kerberos principal name {}: ",
- principal, cursor.next() );
+ LOG.error( Err.i18n( Err.ERR_149, principal, cursor.next() ) );
}
return entry;
Modified: directory/sandbox/felixk/apacheds-i18n/ldif-partition/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/ldif-partition/pom.xml?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/ldif-partition/pom.xml (original)
+++ directory/sandbox/felixk/apacheds-i18n/ldif-partition/pom.xml Thu Jan 21 06:38:21 2010
@@ -37,6 +37,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-avl-partition</artifactId>
<version>${pom.version}</version>
</dependency>
Modified: directory/sandbox/felixk/apacheds-i18n/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/apacheds-i18n/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java?rev=901563&r1=901562&r2=901563&view=diff
==============================================================================
--- directory/sandbox/felixk/apacheds-i18n/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java (original)
+++ directory/sandbox/felixk/apacheds-i18n/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java Thu Jan 21 06:38:21 2010
@@ -44,6 +44,7 @@
import org.apache.directory.server.core.partition.Partition;
import org.apache.directory.server.core.partition.avl.AvlPartition;
import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
+import org.apache.directory.server.i18n.Err;
import org.apache.directory.server.xdbm.Index;
import org.apache.directory.server.xdbm.IndexCursor;
import org.apache.directory.server.xdbm.IndexEntry;
@@ -178,7 +179,7 @@
// of the workingDirectory followed by the suffix
if ( ( suffix == null ) || ( suffix.isEmpty() ) )
{
- String msg = "Cannot initialize a partition without a valid suffix";
+ String msg = Err.i18n( Err.ERR_150 );
LOG.error( msg );
throw new InvalidNameException( msg );
}
@@ -206,7 +207,7 @@
}
catch ( SecurityException se )
{
- String msg = "The " + suffixDirectory.getAbsolutePath() + " can't be created : " + se.getMessage();
+ String msg = Err.i18n( Err.ERR_151, suffixDirectory.getAbsolutePath(), se.getLocalizedMessage() );
LOG.error( msg );
throw se;
}