diff --git a/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java b/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java index 321d2e1c8b..f34c4345db 100644 --- a/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java +++ b/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java @@ -327,6 +327,12 @@ public enum I18n // No error // apacheds-interceptors-exception errors 19000 - 19999 + ERR_19000_PARENT_NOT_FOUND("ERR_19000_PARENT_NOT_FOUND"), + ERR_19001_ALIAS_WITH_CHILD_NOT_ALLOWED("ERR_19001_ALIAS_WITH_CHILD_NOT_ALLOWED"), + ERR_19002_CANNOT_ALLOW_SUBSCHEMA_SUBENTRY_DELETION("ERR_19002_CANNOT_ALLOW_SUBSCHEMA_SUBENTRY_DELETION"), + ERR_19003_CANNOT_ALLOW_SUBSCHEMA_SUBENTRY_RENAMING("ERR_19003_CANNOT_ALLOW_SUBSCHEMA_SUBENTRY_RENAMING"), + ERR_19004_CANNOT_ALLOW_SUBSCHEMA_SUBENTRY_MOVE("ERR_19004_CANNOT_ALLOW_SUBSCHEMA_SUBENTRY_MOVE"), + // apacheds-interceptors-hash errors 20000 - 20999 // No error @@ -618,12 +624,7 @@ public enum I18n ERR_224("ERR_224"), ERR_226("ERR_226"), ERR_249("ERR_249"), - ERR_251_PARENT_NOT_FOUND("ERR_251_PARENT_NOT_FOUND"), - ERR_252_ALIAS_WITH_CHILD_NOT_ALLOWED("ERR_252_ALIAS_WITH_CHILD_NOT_ALLOWED"), - ERR_253("ERR_253"), ERR_254_ADD_EXISTING_VALUE("ERR_254_ADD_EXISTING_VALUE"), - ERR_255("ERR_255"), - ERR_258("ERR_258"), ERR_259("ERR_259"), ERR_261("ERR_261"), ERR_262("ERR_262"), diff --git a/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties b/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties index 087039ba55..9c1a0e17a4 100644 --- a/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties +++ b/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties @@ -317,6 +317,12 @@ ERR_17002_COLLECTIVE_SUBENTRY_WITHOUT_COLLECTIVE_AT=A CollectiveAttribute Subent # --- no error --- # apacheds-interceptors-exception errors 19000 - 19999 +ERR_19000_PARENT_NOT_FOUND=Parent {0} not found +ERR_19001_ALIAS_WITH_CHILD_NOT_ALLOWED=Attempt to add entry ''{0}'' under alias ''{1}'' not allowed. +ERR_19002_CANNOT_ALLOW_SUBSCHEMA_SUBENTRY_DELETION=Can not allow the deletion of the subschemaSubentry ({0}) for the global schema. +ERR_19003_CANNOT_ALLOW_SUBSCHEMA_SUBENTRY_RENAMING=Can not allow the renaming of the subschemaSubentry ({0}) for the global schema: it is fixed at {1} +ERR_19004_CANNOT_ALLOW_SUBSCHEMA_SUBENTRY_MOVE=Can not allow the move of the subschemaSubentry ({0}) for the global schema\: it is fixed at {1} + # apacheds-interceptors-hash errors 20000 - 20999 # --- no error --- @@ -633,12 +639,7 @@ ERR_223=[36] aliasDereferencingProblem - attempt to create alias to itself. ERR_224=[36] aliasDereferencingProblem - attempt to create alias with cycle to relative {0} not allowed from descendent alias {1} ERR_226=[33] aliasProblem - the alias when dereferenced would not name a known object the aliasedObjectName must be set to a valid existing entry. ERR_249=The global schema subentry cannot be added since it exists by default. -ERR_251_PARENT_NOT_FOUND=Parent {0} not found -ERR_252_ALIAS_WITH_CHILD_NOT_ALLOWED=Attempt to add entry ''{0}'' under alias ''{1}'' not allowed. -ERR_253=Can not allow the deletion of the subschemaSubentry ({0}) for the global schema. ERR_254_ADD_EXISTING_VALUE=Trying to add existing value ''{0}'' to attribute {1} -ERR_255=Can not allow the renaming of the subschemaSubentry ({0}) for the global schema: it is fixed at {1} -ERR_258=Can not allow the move of the subschemaSubentry ({0}) for the global schema\: it is fixed at {1} ERR_259=Attempt to search under non-existant entry\: ERR_261=Failed to expand node ERR_262=System partition has wrong name: should be ''system'' not ''{0}''. diff --git a/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java b/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java index 1472e69c5d..4283e66390 100644 --- a/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java +++ b/interceptors/exception/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java @@ -162,7 +162,7 @@ public void add( AddOperationContext addContext ) throws LdapException } catch ( Exception e ) { - throw new LdapNoSuchObjectException( I18n.err( I18n.ERR_251_PARENT_NOT_FOUND, parentDn.getName() ) ); + throw new LdapNoSuchObjectException( I18n.err( I18n.ERR_19000_PARENT_NOT_FOUND, parentDn.getName() ) ); } Attribute objectClass = ( ( ClonedServerEntry ) attrs ).getOriginalEntry().get( @@ -170,7 +170,7 @@ public void add( AddOperationContext addContext ) throws LdapException if ( objectClass.contains( SchemaConstants.ALIAS_OC ) ) { - String msg = I18n.err( I18n.ERR_252_ALIAS_WITH_CHILD_NOT_ALLOWED, name.getName(), parentDn.getName() ); + String msg = I18n.err( I18n.ERR_19001_ALIAS_WITH_CHILD_NOT_ALLOWED, name.getName(), parentDn.getName() ); throw new LdapAliasException( msg ); } else @@ -197,7 +197,7 @@ public void delete( DeleteOperationContext deleteContext ) throws LdapException if ( dn.equals( subschemSubentryDn ) ) { - throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_253, + throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_19002_CANNOT_ALLOW_SUBSCHEMA_SUBENTRY_DELETION, subschemSubentryDn ) ); } @@ -282,7 +282,7 @@ public void move( MoveOperationContext moveContext ) throws LdapException if ( oriChildName.equals( subschemSubentryDn ) ) { - throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_258, + throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_19004_CANNOT_ALLOW_SUBSCHEMA_SUBENTRY_MOVE, subschemSubentryDn, subschemSubentryDn ) ); } @@ -313,7 +313,7 @@ public void moveAndRename( MoveAndRenameOperationContext moveAndRenameContext ) // Don't allow M&R in the SSSE if ( oldDn.getNormName().equals( subschemSubentryDn.getNormName() ) ) { - throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_258, + throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_19004_CANNOT_ALLOW_SUBSCHEMA_SUBENTRY_MOVE, subschemSubentryDn, subschemSubentryDn ) ); } @@ -343,7 +343,7 @@ public void rename( RenameOperationContext renameContext ) throws LdapException if ( dn.equals( subschemSubentryDn ) ) { - throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_255, + throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_19003_CANNOT_ALLOW_SUBSCHEMA_SUBENTRY_RENAMING, subschemSubentryDn, subschemSubentryDn ) ); }