From 5606f48359e5d381e80bc7bf8f42bcbdf2e19ec0 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Wed, 11 Jul 2007 05:32:57 +0000
Subject: [PATCH] Make a few generic fixes to various configuration classes, including:
---
opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java | 61 +-----------------------------
1 files changed, 3 insertions(+), 58 deletions(-)
diff --git a/opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java b/opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java
index 3f983fc..fb824cd 100644
--- a/opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java
+++ b/opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java
@@ -30,7 +30,6 @@
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.LinkedList;
import java.util.List;
import java.util.SortedSet;
import java.util.StringTokenizer;
@@ -40,9 +39,7 @@
import org.opends.server.admin.std.server.PasswordGeneratorCfg;
import org.opends.server.admin.std.server.RandomPasswordGeneratorCfg;
import org.opends.server.api.PasswordGenerator;
-import org.opends.server.config.ConfigAttribute;
import org.opends.server.config.ConfigException;
-import org.opends.server.config.StringConfigAttribute;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.ByteString;
import org.opends.server.types.ByteStringFactory;
@@ -300,58 +297,6 @@
/**
- * Retrieves the DN of the configuration entry with which this component is
- * associated.
- *
- * @return The DN of the configuration entry with which this component is
- * associated.
- */
- public DN getConfigurableComponentEntryDN()
- {
- return configEntryDN;
- }
-
-
-
- /**
- * Retrieves the set of configuration attributes that are associated with this
- * configurable component.
- *
- * @return The set of configuration attributes that are associated with this
- * configurable component.
- */
- public List<ConfigAttribute> getConfigurationAttributes()
- {
- LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>();
-
- ArrayList<String> charsetValues = new ArrayList<String>();
- for (int i=0; i < characterSets.length; i++)
- {
- String encodedValue = characterSets[i].encode();
- if (! charsetValues.contains(encodedValue))
- {
- charsetValues.add(encodedValue);
- }
- }
-
-
- int msgID = MSGID_RANDOMPWGEN_DESCRIPTION_CHARSET;
- attrList.add(new StringConfigAttribute(ATTR_PASSWORD_CHARSET,
- getMessage(msgID), true, true, false,
- charsetValues));
-
- msgID = MSGID_RANDOMPWGEN_DESCRIPTION_PWFORMAT;
- attrList.add(new StringConfigAttribute(ATTR_PASSWORD_FORMAT,
- getMessage(msgID), true, false,
- false, formatString));
-
-
- return attrList;
- }
-
-
-
- /**
* {@inheritDoc}
*/
@Override()
@@ -374,7 +319,7 @@
{
int msgID;
- DN configEntryDN = configuration.dn();
+ DN cfgEntryDN = configuration.dn();
// Get the character sets for use in generating the password. At
// least one
@@ -387,7 +332,7 @@
if (currentPasSet.size() == 0)
{
msgID = MSGID_RANDOMPWGEN_NO_CHARSETS;
- String message = getMessage(msgID, String.valueOf(configEntryDN));
+ String message = getMessage(msgID, String.valueOf(cfgEntryDN));
throw new ConfigException(msgID, message);
}
@@ -397,7 +342,7 @@
if (charsets.containsKey(s.getName()))
{
msgID = MSGID_RANDOMPWGEN_CHARSET_NAME_CONFLICT;
- String message = getMessage(msgID, String.valueOf(configEntryDN), s
+ String message = getMessage(msgID, String.valueOf(cfgEntryDN), s
.getName());
unacceptableReasons.add(message);
return false;
--
Gitblit v1.10.0