From 80c58327faaa4873369f6bb949e62792c2f708e0 Mon Sep 17 00:00:00 2001
From: kenneth_suter <kenneth_suter@localhost>
Date: Wed, 15 Aug 2007 21:34:53 +0000
Subject: [PATCH] This commit is a step toward getting OpenDS internationalized. There are still issues to be resolved before we can declare that we are internationalized but this commit covers the bulk of changes needed at this time.
---
opends/src/server/org/opends/server/authorization/dseecompat/Permission.java | 21 ++++++++++-----------
1 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/opends/src/server/org/opends/server/authorization/dseecompat/Permission.java b/opends/src/server/org/opends/server/authorization/dseecompat/Permission.java
index 6cf9313..854ece7 100644
--- a/opends/src/server/org/opends/server/authorization/dseecompat/Permission.java
+++ b/opends/src/server/org/opends/server/authorization/dseecompat/Permission.java
@@ -26,9 +26,9 @@
*/
package org.opends.server.authorization.dseecompat;
+import org.opends.messages.Message;
-import static org.opends.server.messages.MessageHandler.getMessage;
-import static org.opends.server.messages.AciMessages.*;
+import static org.opends.messages.AccessControlMessages.*;
import static org.opends.server.authorization.dseecompat.Aci.*;
import java.util.regex.Pattern;
@@ -74,14 +74,13 @@
throws AciException {
if ((this.accessType =
EnumAccessType.decode(accessType)) == null){
- int msgID = MSGID_ACI_SYNTAX_INVALID_ACCESS_TYPE_VERSION;
- String message = getMessage(msgID, accessType);
- throw new AciException(msgID, message);
+ Message message =
+ WARN_ACI_SYNTAX_INVALID_ACCESS_TYPE_VERSION.get(accessType);
+ throw new AciException(message);
}
if (!Pattern.matches(rightsRegex, rights)){
- int msgID = MSGID_ACI_SYNTAX_INVALID_RIGHTS_SYNTAX;
- String message = getMessage(msgID, rights);
- throw new AciException(msgID, message);
+ Message message = WARN_ACI_SYNTAX_INVALID_RIGHTS_SYNTAX.get(rights);
+ throw new AciException(message);
}
else {
Pattern separatorPattern = Pattern.compile(separatorToken);
@@ -92,9 +91,9 @@
if (right != null)
this.rights|= EnumRight.getMask(right);
else {
- int msgID = MSGID_ACI_SYNTAX_INVALID_RIGHTS_KEYWORD;
- String message = getMessage(msgID, rights);
- throw new AciException(msgID, message);
+ Message message =
+ WARN_ACI_SYNTAX_INVALID_RIGHTS_KEYWORD.get(rights);
+ throw new AciException(message);
}
}
}
--
Gitblit v1.10.0