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/Target.java | 25 ++++++++++++-------------
1 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/opends/src/server/org/opends/server/authorization/dseecompat/Target.java b/opends/src/server/org/opends/server/authorization/dseecompat/Target.java
index 660d26a..58de5bb 100644
--- a/opends/src/server/org/opends/server/authorization/dseecompat/Target.java
+++ b/opends/src/server/org/opends/server/authorization/dseecompat/Target.java
@@ -26,10 +26,10 @@
*/
package org.opends.server.authorization.dseecompat;
+import org.opends.messages.Message;
-import static org.opends.server.messages.AciMessages.*;
+import static org.opends.messages.AccessControlMessages.*;
import static org.opends.server.authorization.dseecompat.Aci.*;
-import static org.opends.server.messages.MessageHandler.getMessage;
import java.util.regex.Pattern;
import org.opends.server.types.DN;
import org.opends.server.types.DirectoryException;
@@ -84,9 +84,9 @@
//The NULL_LDAP_URL corresponds to the root DSE.
if((!target.equals(NULL_LDAP_URL)) &&
(!Pattern.matches(LDAP_URL, target))) {
- int msgID = MSGID_ACI_SYNTAX_INVALID_TARGETKEYWORD_EXPRESSION;
- String message = getMessage(msgID, target);
- throw new AciException(msgID, message);
+ Message message =
+ WARN_ACI_SYNTAX_INVALID_TARGETKEYWORD_EXPRESSION.get(target);
+ throw new AciException(message);
}
LDAPURL targetURL = LDAPURL.decode(target, false);
if(targetURL.getRawBaseDN().indexOf("*") != -1) {
@@ -95,18 +95,17 @@
} else {
urlDN=targetURL.getBaseDN();
if(!urlDN.isDescendantOf(aciDN)) {
- int msgID = MSGID_ACI_SYNTAX_TARGET_DN_NOT_DESCENDENTOF;
- String message = getMessage(msgID,
- urlDN.toNormalizedString(),
- aciDN.toNormalizedString());
- throw new AciException(msgID, message);
+ Message message = WARN_ACI_SYNTAX_TARGET_DN_NOT_DESCENDENTOF.
+ get(urlDN.toNormalizedString(),
+ aciDN.toNormalizedString());
+ throw new AciException(message);
}
}
}
catch (DirectoryException e){
- int msgID = MSGID_ACI_SYNTAX_INVALID_TARGETKEYWORD_EXPRESSION;
- String message = getMessage(msgID, target);
- throw new AciException(msgID, message);
+ Message message =
+ WARN_ACI_SYNTAX_INVALID_TARGETKEYWORD_EXPRESSION.get(target);
+ throw new AciException(message);
}
}
--
Gitblit v1.10.0