Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 68201 invoked from network); 22 Jan 2010 20:13:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Jan 2010 20:13:41 -0000 Received: (qmail 30263 invoked by uid 500); 22 Jan 2010 20:13:41 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 30193 invoked by uid 500); 22 Jan 2010 20:13:41 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 30183 invoked by uid 99); 22 Jan 2010 20:13:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jan 2010 20:13:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jan 2010 20:13:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BDA3D2388906; Fri, 22 Jan 2010 20:13:08 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r902251 - in /directory/apacheds/trunk: core-api/src/main/java/org/apache/directory/server/core/ core-api/src/main/java/org/apache/directory/server/core/schema/ core-api/src/main/java/org/apache/directory/server/core/schema/registries/synch... Date: Fri, 22 Jan 2010 20:13:08 -0000 To: commits@directory.apache.org From: felixk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100122201308.BDA3D2388906@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: felixk Date: Fri Jan 22 20:13:07 2010 New Revision: 902251 URL: http://svn.apache.org/viewvc?rev=902251&view=rev Log: I18n Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapPrincipal.java directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/ReferralHandlingMode.java directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java directory/apacheds/trunk/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapPrincipal.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapPrincipal.java?rev=902251&r1=902250&r2=902251&view=diff ============================================================================== --- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapPrincipal.java (original) +++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/LdapPrincipal.java Fri Jan 22 20:13:07 2010 @@ -26,6 +26,7 @@ import java.io.ObjectOutput; import java.security.Principal; +import org.apache.directory.server.i18n.I18n; import org.apache.directory.shared.ldap.constants.AuthenticationLevel; import org.apache.directory.shared.ldap.name.LdapDN; import org.apache.directory.shared.ldap.util.StringTools; @@ -72,7 +73,7 @@ if ( ! name.isNormalized() ) { - throw new IllegalStateException( "Names used for principals must be normalized!" ); + throw new IllegalStateException( I18n.err( I18n.ERR_436 ) ); } this.authenticationLevel = authenticationLevel; Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/ReferralHandlingMode.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/ReferralHandlingMode.java?rev=902251&r1=902250&r2=902251&view=diff ============================================================================== --- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/ReferralHandlingMode.java (original) +++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/ReferralHandlingMode.java Fri Jan 22 20:13:07 2010 @@ -22,6 +22,8 @@ import javax.naming.Context; +import org.apache.directory.server.i18n.I18n; + /** * Enumeration for referral handling modes. @@ -97,6 +99,6 @@ return THROW_FINDING_BASE; } - throw new IllegalArgumentException( "Unknown JNDI Context.REFERRAL value of " + jndiValue ); + throw new IllegalArgumentException( I18n.err( I18n.ERR_437, jndiValue ) ); } } Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java?rev=902251&r1=902250&r2=902251&view=diff ============================================================================== --- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java (original) +++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/DescriptionParsers.java Fri Jan 22 20:13:07 2010 @@ -26,6 +26,7 @@ import javax.naming.NamingException; +import org.apache.directory.server.i18n.I18n; import org.apache.directory.shared.ldap.constants.MetaSchemaConstants; import org.apache.directory.shared.ldap.constants.SchemaConstants; import org.apache.directory.shared.ldap.entry.EntryAttribute; @@ -135,9 +136,8 @@ } catch ( ParseException e ) { - LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( - "The following does not conform to the syntaxCheckerDescription syntax: " + value, - ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); + LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( I18n.err( I18n.ERR_405, + value ), ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); iave.setRootCause( e ); throw iave; } @@ -166,9 +166,8 @@ } catch ( ParseException e ) { - LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( - "The following does not conform to the normalizerDescription syntax: " + value.getString(), - ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); + LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( I18n.err( I18n.ERR_406, + value.getString() ), ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); iave.setRootCause( e ); throw iave; } @@ -197,9 +196,8 @@ } catch ( ParseException e ) { - LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( - "The following does not conform to the comparatorDescription syntax: " + value.getString(), - ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); + LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( I18n.err( I18n.ERR_407, + value.getString() ), ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); iave.setRootCause( e ); throw iave; } @@ -238,9 +236,8 @@ } catch ( ParseException e ) { - LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( - "The following does not conform to the attributeTypeDescription syntax: " + value.getString(), - ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); + LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( I18n.err( I18n.ERR_408, + value.getString() ), ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); iave.setRootCause( e ); throw iave; } @@ -248,41 +245,36 @@ // if the supertype is provided make sure it exists in some schema if ( ( attributeType.getSuperiorOid() != null ) && !schemaManager.getAttributeTypeRegistry().contains( attributeType.getSuperiorOid() ) ) { - throw new LdapOperationNotSupportedException( - "Cannot permit the addition of an attributeType with an invalid super type: " - + attributeType.getSuperiorOid(), ResultCodeEnum.UNWILLING_TO_PERFORM ); + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_409, attributeType.getSuperiorOid() ), + ResultCodeEnum.UNWILLING_TO_PERFORM ); } // if the syntax is provided by the description make sure it exists in some schema if ( attributeType.getSyntaxOid() != null && !schemaManager.getLdapSyntaxRegistry().contains( attributeType.getSyntaxOid() ) ) { - throw new LdapOperationNotSupportedException( - "Cannot permit the addition of an attributeType with an invalid syntax: " - + attributeType.getSyntaxOid(), ResultCodeEnum.UNWILLING_TO_PERFORM ); + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_410, attributeType.getSyntaxOid() ), + ResultCodeEnum.UNWILLING_TO_PERFORM ); } // if the matchingRule is provided make sure it exists in some schema if ( attributeType.getEqualityOid() != null && !schemaManager.getMatchingRuleRegistry().contains( attributeType.getEqualityOid() ) ) { - throw new LdapOperationNotSupportedException( - "Cannot permit the addition of an attributeType with an invalid EQUALITY matchingRule: " - + attributeType.getEqualityOid(), ResultCodeEnum.UNWILLING_TO_PERFORM ); + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_411, attributeType.getEqualityOid() ), + ResultCodeEnum.UNWILLING_TO_PERFORM ); } // if the matchingRule is provided make sure it exists in some schema if ( attributeType.getOrderingOid() != null && !schemaManager.getMatchingRuleRegistry().contains( attributeType.getOrderingOid() ) ) { - throw new LdapOperationNotSupportedException( - "Cannot permit the addition of an attributeType with an invalid ORDERING matchingRule: " - + attributeType.getOrderingOid(), ResultCodeEnum.UNWILLING_TO_PERFORM ); + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_412, attributeType.getOrderingOid() ), + ResultCodeEnum.UNWILLING_TO_PERFORM ); } // if the matchingRule is provided make sure it exists in some schema if ( attributeType.getSubstringOid() != null && !schemaManager.getMatchingRuleRegistry().contains( attributeType.getSubstringOid() ) ) { - throw new LdapOperationNotSupportedException( - "Cannot permit the addition of an attributeType with an invalid SUBSTRINGS matchingRule: " - + attributeType.getSubstringOid(), ResultCodeEnum.UNWILLING_TO_PERFORM ); + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_413, attributeType.getSubstringOid() ), + ResultCodeEnum.UNWILLING_TO_PERFORM ); } // if the equality matching rule is null and no super type is specified then there is @@ -292,10 +284,7 @@ { if ( attributeType.getSuperiorOid() == null ) { - throw new LdapOperationNotSupportedException( - "Cannot permit the addition of an attributeType with an no EQUALITY matchingRule " - + "\nand no super type from which to derive an EQUALITY matchingRule.", - ResultCodeEnum.UNWILLING_TO_PERFORM ); + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_414 ), ResultCodeEnum.UNWILLING_TO_PERFORM ); } else { @@ -304,9 +293,7 @@ if ( superType == null ) { - throw new LdapOperationNotSupportedException( - "Cannot permit the addition of an attributeType with which cannot resolve an " - + "EQUALITY matchingRule from it's super type.", ResultCodeEnum.UNWILLING_TO_PERFORM ); + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_415 ), ResultCodeEnum.UNWILLING_TO_PERFORM ); } } } @@ -317,9 +304,7 @@ // if a supertype exists then it must resolve a proper syntax somewhere in the hierarchy. if ( attributeType.getSyntaxOid() == null && attributeType.getSuperiorOid() == null ) { - throw new LdapOperationNotSupportedException( - "Cannot permit the addition of an attributeType with no syntax " - + "\nand no super type from which to derive a syntax.", ResultCodeEnum.UNWILLING_TO_PERFORM ); + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_416 ), ResultCodeEnum.UNWILLING_TO_PERFORM ); } List errors = new ArrayList(); @@ -377,9 +362,8 @@ } catch ( ParseException e ) { - LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( - "The following does not conform to the objectClassDescription syntax: " + value.getString(), - ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); + LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( I18n.err( I18n.ERR_417, + value.getString() ), ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); iave.setRootCause( e ); throw iave; } @@ -397,9 +381,8 @@ if ( !schemaManager.getObjectClassRegistry().contains( superiorOid ) ) { - throw new LdapOperationNotSupportedException( - "Cannot permit the addition of an objectClass with an invalid superior objectClass: " - + superiorOid, ResultCodeEnum.UNWILLING_TO_PERFORM ); + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_418, superiorOid ), + ResultCodeEnum.UNWILLING_TO_PERFORM ); } } } @@ -411,9 +394,8 @@ { if ( !schemaManager.getAttributeTypeRegistry().contains( mayAttrOid ) ) { - throw new LdapOperationNotSupportedException( - "Cannot permit the addition of an objectClass with an invalid " - + "attributeType in the mayList: " + mayAttrOid, ResultCodeEnum.UNWILLING_TO_PERFORM ); + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_419, mayAttrOid ), + ResultCodeEnum.UNWILLING_TO_PERFORM ); } } } @@ -425,9 +407,8 @@ { if ( !schemaManager.getAttributeTypeRegistry().contains( mustAttrOid ) ) { - throw new LdapOperationNotSupportedException( - "Cannot permit the addition of an objectClass with an invalid " - + "attributeType in the mustList: " + mustAttrOid, ResultCodeEnum.UNWILLING_TO_PERFORM ); + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_420, mustAttrOid ), + ResultCodeEnum.UNWILLING_TO_PERFORM ); } } } @@ -472,9 +453,8 @@ } catch ( ParseException e ) { - LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( - "The following does not conform to the matchingRuleUseDescription syntax: " + value.getString(), - ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); + LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( I18n.err( I18n.ERR_421, + value.getString() ), ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); iave.setRootCause( e ); throw iave; } @@ -516,19 +496,15 @@ } catch ( ParseException e ) { - LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( - "The following does not conform to the ldapSyntax description syntax: " + value.getString(), - ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); + LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( I18n.err( I18n.ERR_422, + value.getString() ), ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); iave.setRootCause( e ); throw iave; } if ( !schemaManager.getSyntaxCheckerRegistry().contains( ldapSyntax.getOid() ) ) { - throw new LdapOperationNotSupportedException( - "Cannot permit the addition of a syntax without the prior creation of a " - + "\nsyntaxChecker with the same object identifier of the syntax!", - ResultCodeEnum.UNWILLING_TO_PERFORM ); + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_423 ), ResultCodeEnum.UNWILLING_TO_PERFORM ); } ldapSyntax.setHumanReadable( isHumanReadable( ldapSyntax ) ); @@ -569,17 +545,15 @@ } catch ( ParseException e ) { - LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( - "The following does not conform to the matchingRuleDescription syntax: " + value.getString(), - ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); + LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( I18n.err( I18n.ERR_424, + value.getString() ), ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); iave.setRootCause( e ); throw iave; } if ( !schemaManager.getLdapSyntaxRegistry().contains( matchingRule.getSyntaxOid() ) ) { - throw new LdapOperationNotSupportedException( - "Cannot create a matchingRule that depends on non-existant syntax: " + matchingRule.getSyntaxOid(), + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_425, matchingRule.getSyntaxOid() ), ResultCodeEnum.UNWILLING_TO_PERFORM ); } @@ -620,9 +594,8 @@ } catch ( ParseException e ) { - LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( - "The following does not conform to the ditStructureRuleDescription syntax: " + value.getString(), - ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); + LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( I18n.err( I18n.ERR_426, + value.getString() ), ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); iave.setRootCause( e ); throw iave; } @@ -664,9 +637,8 @@ } catch ( ParseException e ) { - LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( - "The following does not conform to the ditContentRuleDescription syntax: " + value.getString(), - ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); + LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( I18n.err( I18n.ERR_427, + value.getString() ), ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); iave.setRootCause( e ); throw iave; } @@ -708,9 +680,8 @@ } catch ( ParseException e ) { - LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( - "The following does not conform to the nameFormDescription syntax: " + value.getString(), - ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); + LdapInvalidAttributeValueException iave = new LdapInvalidAttributeValueException( I18n.err( I18n.ERR_428, + value.getString() ), ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX ); iave.setRootCause( e ); throw iave; } Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java?rev=902251&r1=902250&r2=902251&view=diff ============================================================================== --- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java (original) +++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java Fri Jan 22 20:13:07 2010 @@ -135,7 +135,7 @@ { if ( this.isInitialized() ) { - throw new IllegalStateException( "Not allowed to set the wrappedPartition after initialization." ); + throw new IllegalStateException( I18n.err( I18n.ERR_429 ) ); } this.wrapped = wrapped; Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java?rev=902251&r1=902250&r2=902251&view=diff ============================================================================== --- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java (original) +++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDaoImpl.java Fri Jan 22 20:13:07 2010 @@ -39,6 +39,7 @@ import org.apache.directory.server.core.interceptor.context.ModifyOperationContext; import org.apache.directory.server.core.interceptor.context.SearchOperationContext; import org.apache.directory.server.core.partition.Partition; +import org.apache.directory.server.i18n.I18n; import org.apache.directory.shared.ldap.constants.MetaSchemaConstants; import org.apache.directory.shared.ldap.constants.SchemaConstants; import org.apache.directory.shared.ldap.entry.EntryAttribute; @@ -256,7 +257,7 @@ if ( cursor.next() ) { - throw new NamingException( "Got more than one matchingRule for oid of " + oid ); + throw new NamingException( I18n.err( I18n.ERR_430, oid ) ); } return true; @@ -305,7 +306,7 @@ if ( cursor.next() ) { - throw new NamingException( "Got more than one attributeType for oid of " + oid ); + throw new NamingException( I18n.err( I18n.ERR_431, oid ) ); } return true; @@ -354,7 +355,7 @@ if ( cursor.next() ) { - throw new NamingException( "Got more than one attributeType for oid of " + oid ); + throw new NamingException( I18n.err( I18n.ERR_431, oid ) ); } return true; @@ -403,7 +404,7 @@ if ( cursor.next() ) { - throw new NamingException( "Got more than one syntax for oid of " + oid ); + throw new NamingException( I18n.err( I18n.ERR_432, oid ) ); } return true; @@ -452,7 +453,7 @@ if ( cursor.next() ) { - throw new NamingException( "Got more than one syntaxChecker for oid of " + oid ); + throw new NamingException( I18n.err( I18n.ERR_433, oid ) ); } return true; @@ -482,8 +483,7 @@ if ( !rdn.getNormType().equalsIgnoreCase( CN_OID ) ) { - throw new NamingException( "Attribute of second rdn in dn '" + dn.toNormName() - + "' expected to be CN oid of " + CN_OID + " but was " + rdn.getNormType() ); + throw new NamingException( I18n.err( I18n.ERR_434, dn.toNormName(), CN_OID, rdn.getNormType() ) ); } return ( String ) rdn.getNormValue(); @@ -532,7 +532,7 @@ if ( cursor.next() ) { - throw new NamingException( "Got more than one result for the entity name: " + entityName ); + throw new NamingException( I18n.err( I18n.ERR_435, entityName ) ); } return sr; Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java?rev=902251&r1=902250&r2=902251&view=diff ============================================================================== --- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java (original) +++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/registries/synchronizers/SyntaxSynchronizer.java Fri Jan 22 20:13:07 2010 @@ -27,6 +27,7 @@ import org.apache.directory.server.core.entry.ServerEntry; import org.apache.directory.server.core.interceptor.context.ModifyOperationContext; +import org.apache.directory.server.i18n.I18n; import org.apache.directory.shared.ldap.constants.MetaSchemaConstants; import org.apache.directory.shared.ldap.constants.SchemaConstants; import org.apache.directory.shared.ldap.exception.LdapInvalidNameException; @@ -129,9 +130,8 @@ else { // We have some error : reject the addition and get out - String msg = "Cannot add the Syntax " + entry.getDn().getName() + " into the registries, " - + "the resulting registries would be inconsistent :" + - StringTools.listToString( schemaManager.getErrors() ); + String msg = I18n.err( I18n.ERR_399, entry.getDn().getName(), + StringTools.listToString( schemaManager.getErrors() ) ); LOG.info( msg ); throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM ); } @@ -237,8 +237,8 @@ else { // We have some error : reject the deletion and get out - String msg = "Cannot delete the Syntax " + entry.getDn().getName() + " into the registries, " - + "the resulting registries would be inconsistent :" + StringTools.listToString( errors ); + String msg = I18n.err( I18n.ERR_400, entry.getDn().getName(), + StringTools.listToString( errors ) ); LOG.info( msg ); throw new LdapOperationNotSupportedException( msg, ResultCodeEnum.UNWILLING_TO_PERFORM ); } @@ -263,10 +263,8 @@ if ( dependees.size() != 0 ) { - throw new LdapOperationNotSupportedException( - "The syntax with OID " + oldOid + " cannot be deleted until all entities" - + " using this syntax have also been deleted. The following dependees exist: " - + getNames( dependees ), ResultCodeEnum.UNWILLING_TO_PERFORM ); + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_401, oldOid, + getNames( dependees ) ), ResultCodeEnum.UNWILLING_TO_PERFORM ); } ServerEntry targetEntry = ( ServerEntry ) entry.clone(); @@ -305,10 +303,8 @@ if ( dependees.size() != 0 ) { - throw new LdapOperationNotSupportedException( - "The syntax with OID " + oldOid + " cannot be deleted until all entities" - + " using this syntax have also been deleted. The following dependees exist: " - + getNames( dependees ), ResultCodeEnum.UNWILLING_TO_PERFORM ); + throw new LdapOperationNotSupportedException( I18n.err( I18n.ERR_401, oldOid, getNames( dependees ) ), + ResultCodeEnum.UNWILLING_TO_PERFORM ); } ServerEntry targetEntry = ( ServerEntry ) entry.clone(); @@ -387,8 +383,7 @@ { if ( newParent.size() != 3 ) { - throw new LdapInvalidNameException( - "The parent dn of a syntax should be at most 3 name components in length.", + throw new LdapInvalidNameException( I18n.err( I18n.ERR_402 ), ResultCodeEnum.NAMING_VIOLATION ); } @@ -396,15 +391,12 @@ if ( !schemaManager.getAttributeTypeRegistry().getOidByName( rdn.getNormType() ).equals( SchemaConstants.OU_AT_OID ) ) { - throw new LdapInvalidNameException( "The parent entry of a syntax should be an organizationalUnit.", - ResultCodeEnum.NAMING_VIOLATION ); + throw new LdapInvalidNameException( I18n.err( I18n.ERR_403 ), ResultCodeEnum.NAMING_VIOLATION ); } if ( !( ( String ) rdn.getNormValue() ).equalsIgnoreCase( "syntaxes" ) ) { - throw new LdapInvalidNameException( - "The parent entry of a syntax should have a relative name of ou=syntaxes.", - ResultCodeEnum.NAMING_VIOLATION ); + throw new LdapInvalidNameException( I18n.err( I18n.ERR_404 ), ResultCodeEnum.NAMING_VIOLATION ); } } } Modified: directory/apacheds/trunk/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java?rev=902251&r1=902250&r2=902251&view=diff ============================================================================== --- directory/apacheds/trunk/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java (original) +++ directory/apacheds/trunk/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java Fri Jan 22 20:13:07 2010 @@ -438,6 +438,106 @@ public static String ERR_397 = "ERR_397"; public static String ERR_398 = "ERR_398"; public static String ERR_399 = "ERR_399"; + public static String ERR_400 = "ERR_400"; + public static String ERR_401 = "ERR_401"; + public static String ERR_402 = "ERR_402"; + public static String ERR_403 = "ERR_403"; + public static String ERR_404 = "ERR_404"; + public static String ERR_405 = "ERR_405"; + public static String ERR_406 = "ERR_406"; + public static String ERR_407 = "ERR_407"; + public static String ERR_408 = "ERR_408"; + public static String ERR_409 = "ERR_409"; + public static String ERR_410 = "ERR_410"; + public static String ERR_411 = "ERR_411"; + public static String ERR_412 = "ERR_412"; + public static String ERR_413 = "ERR_413"; + public static String ERR_414 = "ERR_414"; + public static String ERR_415 = "ERR_415"; + public static String ERR_416 = "ERR_416"; + public static String ERR_417 = "ERR_417"; + public static String ERR_418 = "ERR_418"; + public static String ERR_419 = "ERR_419"; + public static String ERR_420 = "ERR_420"; + public static String ERR_421 = "ERR_421"; + public static String ERR_422 = "ERR_422"; + public static String ERR_423 = "ERR_423"; + public static String ERR_424 = "ERR_424"; + public static String ERR_425 = "ERR_425"; + public static String ERR_426 = "ERR_426"; + public static String ERR_427 = "ERR_427"; + public static String ERR_428 = "ERR_428"; + public static String ERR_429 = "ERR_429"; + public static String ERR_430 = "ERR_430"; + public static String ERR_431 = "ERR_431"; + public static String ERR_432 = "ERR_432"; + public static String ERR_433 = "ERR_433"; + public static String ERR_434 = "ERR_434"; + public static String ERR_435 = "ERR_435"; + public static String ERR_436 = "ERR_436"; + public static String ERR_437 = "ERR_437"; + public static String ERR_438 = "ERR_438"; + public static String ERR_439 = "ERR_439"; + public static String ERR_440 = "ERR_440"; + public static String ERR_441 = "ERR_441"; + public static String ERR_442 = "ERR_442"; + public static String ERR_443 = "ERR_443"; + public static String ERR_444 = "ERR_444"; + public static String ERR_445 = "ERR_445"; + public static String ERR_446 = "ERR_446"; + public static String ERR_447 = "ERR_447"; + public static String ERR_448 = "ERR_448"; + public static String ERR_449 = "ERR_449"; + public static String ERR_450 = "ERR_450"; + public static String ERR_451 = "ERR_451"; + public static String ERR_452 = "ERR_452"; + public static String ERR_453 = "ERR_453"; + public static String ERR_454 = "ERR_454"; + public static String ERR_455 = "ERR_455"; + public static String ERR_456 = "ERR_456"; + public static String ERR_457 = "ERR_457"; + public static String ERR_458 = "ERR_458"; + public static String ERR_459 = "ERR_459"; + public static String ERR_460 = "ERR_460"; + public static String ERR_461 = "ERR_461"; + public static String ERR_462 = "ERR_462"; + public static String ERR_463 = "ERR_463"; + public static String ERR_464 = "ERR_464"; + public static String ERR_465 = "ERR_465"; + public static String ERR_466 = "ERR_466"; + public static String ERR_467 = "ERR_467"; + public static String ERR_468 = "ERR_468"; + public static String ERR_469 = "ERR_469"; + public static String ERR_470 = "ERR_470"; + public static String ERR_471 = "ERR_471"; + public static String ERR_472 = "ERR_472"; + public static String ERR_473 = "ERR_473"; + public static String ERR_474 = "ERR_474"; + public static String ERR_475 = "ERR_475"; + public static String ERR_476 = "ERR_476"; + public static String ERR_477 = "ERR_477"; + public static String ERR_478 = "ERR_478"; + public static String ERR_479 = "ERR_479"; + public static String ERR_480 = "ERR_480"; + public static String ERR_481 = "ERR_481"; + public static String ERR_482 = "ERR_482"; + public static String ERR_483 = "ERR_483"; + public static String ERR_484 = "ERR_484"; + public static String ERR_485 = "ERR_485"; + public static String ERR_486 = "ERR_486"; + public static String ERR_487 = "ERR_487"; + public static String ERR_488 = "ERR_488"; + public static String ERR_489 = "ERR_489"; + public static String ERR_490 = "ERR_490"; + public static String ERR_491 = "ERR_491"; + public static String ERR_492 = "ERR_492"; + public static String ERR_493 = "ERR_493"; + public static String ERR_494 = "ERR_494"; + public static String ERR_495 = "ERR_495"; + public static String ERR_496 = "ERR_496"; + public static String ERR_497 = "ERR_497"; + public static String ERR_498 = "ERR_498"; + public static String ERR_499 = "ERR_499"; /** Modified: directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties?rev=902251&r1=902250&r2=902251&view=diff ============================================================================== --- directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties (original) +++ directory/apacheds/trunk/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties Fri Jan 22 20:13:07 2010 @@ -387,7 +387,7 @@ ERR_363=The parent entry of a syntax should have a relative name of ou=matchingRules. ERR_364=Cannot delete the Normalizer {0} into the registries, the resulting registries would be inconsistent : {1} ERR_365=Cannot add the Normalizer {0} into the registries, we have got some errors : {1} -ERR_366=Cannot delete {0}, as there are some dependant SchemaObjects :\n{1} +ERR_366=Cannot delete {0}, as there are some dependant SchemaObjects \:\n{1} ERR_367=The normalizer with OID {0} cannot have it's OID changed until all matchingRules using that normalizer have been deleted. ERR_368=The normalizer with OID {0} cannot be moved to another schema until all matchingRules using that normalizer have been deleted. ERR_369=Oid {0} for new schema normalizer is not unique. @@ -420,4 +420,104 @@ ERR_396=The parent dn of a syntaxChecker should be at most 3 name components in length. ERR_397=The parent entry of a syntaxChecker should be an organizationalUnit. ERR_398=The parent entry of a normalizer should have a relative name of ou=syntaxCheckers. -ERR_399= +ERR_399=Cannot add the Syntax {0} into the registries, the resulting registries would be inconsistent : {1} +ERR_400=Cannot delete the Syntax {0} into the registries, the resulting registries would be inconsistent : {1} +ERR_401=The syntax with OID {0} cannot be deleted until all entities using this syntax have also been deleted. The following dependees exist: {1} +ERR_402=The parent dn of a syntax should be at most 3 name components in length. +ERR_403=The parent entry of a syntax should be an organizationalUnit. +ERR_404=The parent entry of a syntax should have a relative name of ou=syntaxes. +ERR_405=The following does not conform to the syntaxCheckerDescription syntax: {0} +ERR_406=The following does not conform to the normalizerDescription syntax: {0} +ERR_407=The following does not conform to the comparatorDescription syntax: {0} +ERR_408=The following does not conform to the attributeTypeDescription syntax: {0} +ERR_409=Cannot permit the addition of an attributeType with an invalid super type: {0} +ERR_410=Cannot permit the addition of an attributeType with an invalid syntax: {0} +ERR_411=Cannot permit the addition of an attributeType with an invalid EQUALITY matchingRule: {0} +ERR_412=Cannot permit the addition of an attributeType with an invalid ORDERING matchingRule: {0} +ERR_413=Cannot permit the addition of an attributeType with an invalid SUBSTRINGS matchingRule: {0} +ERR_414=Cannot permit the addition of an attributeType with an no EQUALITY matchingRule \nand no super type from which to derive an EQUALITY matchingRule. +ERR_415=Cannot permit the addition of an attributeType with which cannot resolve an EQUALITY matchingRule from it's super type. +ERR_416=Cannot permit the addition of an attributeType with no syntax \nand no super type from which to derive a syntax. +ERR_417=The following does not conform to the objectClassDescription syntax: {0} +ERR_418=Cannot permit the addition of an objectClass with an invalid superior objectClass: {0} +ERR_419=Cannot permit the addition of an objectClass with an invalid attributeType in the mayList: {0} +ERR_420=Cannot permit the addition of an objectClass with an invalid attributeType in the mustList: {0} +ERR_421=The following does not conform to the matchingRuleUseDescription syntax: {0} +ERR_422=The following does not conform to the ldapSyntax description syntax: {0} +ERR_423=Cannot permit the addition of a syntax without the prior creation of a \nsyntaxChecker with the same object identifier of the syntax! +ERR_424=The following does not conform to the matchingRuleDescription syntax: {0} +ERR_425=Cannot create a matchingRule that depends on non-existant syntax: {0} +ERR_426=The following does not conform to the ditStructureRuleDescription syntax: {0} +ERR_427=The following does not conform to the ditContentRuleDescription syntax: {0} +ERR_428=The following does not conform to the nameFormDescription syntax: {0} +ERR_429=Not allowed to set the wrappedPartition after initialization. +ERR_430=Got more than one matchingRule for oid of {0} +ERR_431=Got more than one attributeType for oid of {0} +ERR_432=Got more than one syntax for oid of {0} +ERR_433=Got more than one syntaxChecker for oid of {0} +ERR_434=Attribute of second rdn in dn '{0}' expected to be CN oid of {1} but was {2} +ERR_435=Got more than one result for the entity name: {0} +ERR_436=Names used for principals must be normalized! +ERR_437=Unknown JNDI Context.REFERRAL value of {0} +ERR_438= +ERR_439= +ERR_440= +ERR_441= +ERR_442= +ERR_443= +ERR_444= +ERR_445= +ERR_446= +ERR_447= +ERR_448= +ERR_449= +ERR_450= +ERR_451= +ERR_452= +ERR_453= +ERR_454= +ERR_455= +ERR_456= +ERR_457= +ERR_458= +ERR_459= +ERR_460= +ERR_461= +ERR_462= +ERR_463= +ERR_464= +ERR_465= +ERR_466= +ERR_467= +ERR_468= +ERR_469= +ERR_470= +ERR_471= +ERR_472= +ERR_473= +ERR_474= +ERR_475= +ERR_476= +ERR_477= +ERR_478= +ERR_479= +ERR_480= +ERR_481= +ERR_482= +ERR_483= +ERR_484= +ERR_485= +ERR_486= +ERR_487= +ERR_488= +ERR_489= +ERR_490= +ERR_491= +ERR_492= +ERR_493= +ERR_494= +ERR_495= +ERR_496= +ERR_497= +ERR_498= +ERR_499=