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/core/EntryCacheConfigManager.java | 16 +-
opends/src/server/org/opends/server/extensions/FileSystemEntryCache.java | 2
opends/src/server/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java | 12
opends/src/server/org/opends/server/extensions/FileBasedTrustManagerProvider.java | 18 +-
opends/src/server/org/opends/server/extensions/FIFOEntryCache.java | 99 -------------
opends/src/server/org/opends/server/core/AccountStatusNotificationHandlerConfigManager.java | 4
opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java | 4
opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java | 4
opends/src/server/org/opends/server/plugins/profiler/ProfilerPlugin.java | 8
opends/src/server/org/opends/server/extensions/RandomPasswordGenerator.java | 61 --------
opends/src/server/org/opends/server/extensions/PKCS11KeyManagerProvider.java | 14 +-
opends/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandler.java | 4
opends/src/server/org/opends/server/core/AttributeSyntaxConfigManager.java | 2
opends/src/server/org/opends/server/extensions/FingerprintCertificateMapper.java | 4
opends/src/server/org/opends/server/extensions/GSSAPISASLMechanismHandler.java | 4
opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java | 4
opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java | 82 -----------
opends/src/server/org/opends/server/core/GroupManager.java | 2
opends/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java | 6
opends/src/server/org/opends/server/extensions/FileBasedKeyManagerProvider.java | 20 +-
20 files changed, 74 insertions(+), 296 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/AccountStatusNotificationHandlerConfigManager.java b/opends/src/server/org/opends/server/core/AccountStatusNotificationHandlerConfigManager.java
index 6d2fc87..a165f77 100644
--- a/opends/src/server/org/opends/server/core/AccountStatusNotificationHandlerConfigManager.java
+++ b/opends/src/server/org/opends/server/core/AccountStatusNotificationHandlerConfigManager.java
@@ -394,8 +394,8 @@
* class to load, instantiate, and initialize.
* @param configuration The configuration to use to initialize the
* notification handler. It must not be {@code null}.
- * @param initialize Indicates whether the key manager provider instance
- * should be initialized.
+ * @param initialize Indicates whether the account status notification
+ * handler instance should be initialized.
*
* @return The possibly initialized notification handler.
*
diff --git a/opends/src/server/org/opends/server/core/AttributeSyntaxConfigManager.java b/opends/src/server/org/opends/server/core/AttributeSyntaxConfigManager.java
index 19cf217..ac7714f 100644
--- a/opends/src/server/org/opends/server/core/AttributeSyntaxConfigManager.java
+++ b/opends/src/server/org/opends/server/core/AttributeSyntaxConfigManager.java
@@ -450,7 +450,7 @@
* class to load, instantiate, and initialize.
* @param configuration The configuration to use to initialize the attribute
* syntax. It should not be {@code null}.
- * @param initialize Indicates whether the key manager provider instance
+ * @param initialize Indicates whether the attribute syntax instance
* should be initialized.
*
* @return The possibly initialized attribute syntax.
diff --git a/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java b/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
index 8afd80e..f84b84b 100644
--- a/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
+++ b/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
@@ -436,15 +436,15 @@
/**
- * Loads the specified class, instantiates it as an entry cache,
- * and optionally initializes that instance.
+ * Loads the specified class, instantiates it as an entry cache, and
+ * optionally initializes that instance.
*
- * @param className The fully-qualified name of the entry cache
- * class to load, instantiate, and initialize.
- * @param configuration The configuration to use to initialize the
- * entry cache. It must not be {@code null}.
- * @param initialize Indicates whether the key manager provider instance
- * should be initialized.
+ * @param className The fully-qualified name of the entry cache class
+ * to load, instantiate, and initialize.
+ * @param configuration The configuration to use to initialize the entry
+ * cache. It must not be {@code null}.
+ * @param initialize Indicates whether the entry cache instance should be
+ * initialized.
*
* @return The possibly initialized entry cache.
*
diff --git a/opends/src/server/org/opends/server/core/GroupManager.java b/opends/src/server/org/opends/server/core/GroupManager.java
index 94bcf8a..cf84c84 100644
--- a/opends/src/server/org/opends/server/core/GroupManager.java
+++ b/opends/src/server/org/opends/server/core/GroupManager.java
@@ -431,7 +431,7 @@
* class to load, instantiate, and initialize.
* @param configuration The configuration to use to initialize the group
* implementation. It must not be {@code null}.
- * @param initialize Indicates whether the key manager provider instance
+ * @param initialize Indicates whether the group implementation instance
* should be initialized.
*
* @return The possibly initialized group implementation.
diff --git a/opends/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandler.java b/opends/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandler.java
index 6743a80..450a1a8 100644
--- a/opends/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandler.java
+++ b/opends/src/server/org/opends/server/extensions/CRAMMD5SASLMechanismHandler.java
@@ -638,7 +638,7 @@
List<String> unacceptableReasons)
{
boolean configAcceptable = true;
- DN configEntryDN = configuration.dn();
+ DN cfgEntryDN = configuration.dn();
// Get the identity mapper that should be used to find users.
DN identityMapperDN = configuration.getIdentityMapperDN();
@@ -649,7 +649,7 @@
int msgID = MSGID_SASLCRAMMD5_NO_SUCH_IDENTITY_MAPPER;
unacceptableReasons.add(getMessage(msgID,
String.valueOf(identityMapperDN),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
diff --git a/opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java b/opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java
index bbae357..e58ce75 100644
--- a/opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java
+++ b/opends/src/server/org/opends/server/extensions/DigestMD5SASLMechanismHandler.java
@@ -1629,7 +1629,7 @@
List<String> unacceptableReasons)
{
boolean configAcceptable = true;
- DN configEntryDN = configuration.dn();
+ DN cfgEntryDN = configuration.dn();
// Get the identity mapper that should be used to find users.
DN identityMapperDN = configuration.getIdentityMapperDN();
@@ -1640,7 +1640,7 @@
int msgID = MSGID_SASLDIGESTMD5_NO_SUCH_IDENTITY_MAPPER;
unacceptableReasons.add(getMessage(msgID,
String.valueOf(identityMapperDN),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
diff --git a/opends/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java b/opends/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java
index 7621e29..702e3c4 100644
--- a/opends/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java
+++ b/opends/src/server/org/opends/server/extensions/ExternalSASLMechanismHandler.java
@@ -487,7 +487,7 @@
List<String> unacceptableReasons)
{
boolean configAcceptable = true;
- DN configEntryDN = configuration.dn();
+ DN cfgEntryDN = configuration.dn();
// Get the attribute type to use for validating the certificates. If none
// is provided, then default to the userCertificate type.
@@ -502,7 +502,7 @@
{
int msgID = MSGID_SASLEXTERNAL_UNKNOWN_CERT_ATTR;
unacceptableReasons.add(getMessage(msgID, String.valueOf(attrTypeName),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
@@ -514,7 +514,7 @@
if (certificateMapper == null)
{
int msgID = MSGID_SASLEXTERNAL_INVALID_CERTIFICATE_MAPPER_DN;
- unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
+ unacceptableReasons.add(getMessage(msgID, String.valueOf(cfgEntryDN),
String.valueOf(configuration.getCertificateMapperDN())));
configAcceptable = false;
}
diff --git a/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java b/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
index 12c9551..03d6d76 100644
--- a/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
+++ b/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
@@ -33,7 +33,6 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
-import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@@ -45,11 +44,7 @@
import org.opends.server.admin.std.server.FIFOEntryCacheCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.EntryCache;
-import org.opends.server.config.ConfigAttribute;
import org.opends.server.config.ConfigException;
-import org.opends.server.config.IntegerConfigAttribute;
-import org.opends.server.config.IntegerWithUnitConfigAttribute;
-import org.opends.server.config.StringConfigAttribute;
import org.opends.server.core.DirectoryServer;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.CacheEntry;
@@ -1198,90 +1193,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>();
-
-
- int msgID = MSGID_FIFOCACHE_DESCRIPTION_MAX_MEMORY_PCT;
- IntegerConfigAttribute maxMemoryPctAttr =
- new IntegerConfigAttribute(ATTR_FIFOCACHE_MAX_MEMORY_PCT,
- getMessage(msgID), true, false, false, true,
- 1, true, 100, maxMemoryPercent);
- attrList.add(maxMemoryPctAttr);
-
-
- msgID = MSGID_FIFOCACHE_DESCRIPTION_MAX_ENTRIES;
- IntegerConfigAttribute maxEntriesAttr =
- new IntegerConfigAttribute(ATTR_FIFOCACHE_MAX_ENTRIES,
- getMessage(msgID), true, false, false,
- true, 0, false, 0, maxEntries);
- attrList.add(maxEntriesAttr);
-
-
- msgID = MSGID_FIFOCACHE_DESCRIPTION_LOCK_TIMEOUT;
- IntegerWithUnitConfigAttribute lockTimeoutAttr =
- new IntegerWithUnitConfigAttribute(ATTR_FIFOCACHE_LOCK_TIMEOUT,
- getMessage(msgID), false, timeUnits,
- true, 0, false, 0, lockTimeout,
- TIME_UNIT_MILLISECONDS_FULL);
- attrList.add(lockTimeoutAttr);
-
-
- msgID = MSGID_FIFOCACHE_DESCRIPTION_INCLUDE_FILTERS;
- ArrayList<String> includeStrings =
- new ArrayList<String>(includeFilters.size());
- for (SearchFilter f : includeFilters)
- {
- includeStrings.add(f.toString());
- }
- StringConfigAttribute includeAttr =
- new StringConfigAttribute(ATTR_FIFOCACHE_INCLUDE_FILTER,
- getMessage(msgID), false, true, false,
- includeStrings);
- attrList.add(includeAttr);
-
-
- msgID = MSGID_FIFOCACHE_DESCRIPTION_EXCLUDE_FILTERS;
- ArrayList<String> excludeStrings =
- new ArrayList<String>(excludeFilters.size());
- for (SearchFilter f : excludeFilters)
- {
- excludeStrings.add(f.toString());
- }
- StringConfigAttribute excludeAttr =
- new StringConfigAttribute(ATTR_FIFOCACHE_EXCLUDE_FILTER,
- getMessage(msgID), false, true, false,
- excludeStrings);
- attrList.add(excludeAttr);
-
-
- return attrList;
- }
-
-
-
- /**
* {@inheritDoc}
*/
@Override()
@@ -1449,8 +1360,6 @@
HashSet<SearchFilter> newIncludeFilters = null;
HashSet<SearchFilter> newExcludeFilters = null;
- DN configEntryDN = configuration.dn();
-
// Read configuration.
newConfigEntryDN = configuration.dn();
newLockTimeout = configuration.getLockTimeout();
@@ -1470,14 +1379,14 @@
MSGID_FIFOCACHE_INVALID_INCLUDE_FILTER,
MSGID_FIFOCACHE_CANNOT_DECODE_ANY_INCLUDE_FILTERS,
errorHandler,
- configEntryDN
+ newConfigEntryDN
);
newExcludeFilters = EntryCacheCommon.getFilters (
configuration.getExcludeFilter(),
MSGID_FIFOCACHE_CANNOT_DECODE_EXCLUDE_FILTER,
MSGID_FIFOCACHE_CANNOT_DECODE_ANY_EXCLUDE_FILTERS,
errorHandler,
- configEntryDN
+ newConfigEntryDN
);
break;
case PHASE_ACCEPTABLE: // acceptable and apply are using the same
@@ -1487,14 +1396,14 @@
MSGID_FIFOCACHE_INVALID_INCLUDE_FILTER,
0,
errorHandler,
- configEntryDN
+ newConfigEntryDN
);
newExcludeFilters = EntryCacheCommon.getFilters (
configuration.getExcludeFilter(),
MSGID_FIFOCACHE_INVALID_EXCLUDE_FILTER,
0,
errorHandler,
- configEntryDN
+ newConfigEntryDN
);
break;
}
diff --git a/opends/src/server/org/opends/server/extensions/FileBasedKeyManagerProvider.java b/opends/src/server/org/opends/server/extensions/FileBasedKeyManagerProvider.java
index 35ecdf3..456a289 100644
--- a/opends/src/server/org/opends/server/extensions/FileBasedKeyManagerProvider.java
+++ b/opends/src/server/org/opends/server/extensions/FileBasedKeyManagerProvider.java
@@ -340,7 +340,7 @@
List<String> unacceptableReasons)
{
boolean configAcceptable = true;
- DN configEntryDN = configuration.dn();
+ DN cfgEntryDN = configuration.dn();
// Get the path to the key store file.
@@ -353,7 +353,7 @@
int msgID = MSGID_FILE_KEYMANAGER_NO_SUCH_FILE;
unacceptableReasons.add(getMessage(msgID,
String.valueOf(newKeyStoreFile),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
}
@@ -365,7 +365,7 @@
}
int msgID = MSGID_FILE_KEYMANAGER_CANNOT_DETERMINE_FILE;
- unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
+ unacceptableReasons.add(getMessage(msgID, String.valueOf(cfgEntryDN),
getExceptionMessage(e)));
configAcceptable = false;
}
@@ -387,7 +387,7 @@
int msgID = MSGID_FILE_KEYMANAGER_INVALID_TYPE;
unacceptableReasons.add(getMessage(msgID,
String.valueOf(configuration.getKeyStoreType()),
- String.valueOf(configEntryDN), getExceptionMessage(kse)));
+ String.valueOf(cfgEntryDN), getExceptionMessage(kse)));
configAcceptable = false;
}
}
@@ -412,7 +412,7 @@
{
int msgID = MSGID_FILE_KEYMANAGER_PIN_PROPERTY_NOT_SET;
unacceptableReasons.add(getMessage(msgID, String.valueOf(propertyName),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
}
@@ -425,7 +425,7 @@
{
int msgID = MSGID_FILE_KEYMANAGER_PIN_ENVAR_NOT_SET;
unacceptableReasons.add(getMessage(msgID, String.valueOf(enVarName),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
}
@@ -438,7 +438,7 @@
{
int msgID = MSGID_FILE_KEYMANAGER_PIN_NO_SUCH_FILE;
unacceptableReasons.add(getMessage(msgID, String.valueOf(fileName),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
else
@@ -453,7 +453,7 @@
{
int msgID = MSGID_FILE_KEYMANAGER_PIN_FILE_CANNOT_READ;
unacceptableReasons.add(getMessage(msgID, String.valueOf(fileName),
- String.valueOf(configEntryDN),
+ String.valueOf(cfgEntryDN),
getExceptionMessage(ioe)));
configAcceptable = false;
}
@@ -469,7 +469,7 @@
{
int msgID = MSGID_FILE_KEYMANAGER_PIN_FILE_EMPTY;
unacceptableReasons.add(getMessage(msgID, String.valueOf(fileName),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
}
@@ -482,7 +482,7 @@
{
// Pin wasn't defined anywhere.
int msgID = MSGID_FILE_KEYMANAGER_NO_PIN;
- unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN)));
+ unacceptableReasons.add(getMessage(msgID, String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
diff --git a/opends/src/server/org/opends/server/extensions/FileBasedTrustManagerProvider.java b/opends/src/server/org/opends/server/extensions/FileBasedTrustManagerProvider.java
index ea9d79c..801a80b 100644
--- a/opends/src/server/org/opends/server/extensions/FileBasedTrustManagerProvider.java
+++ b/opends/src/server/org/opends/server/extensions/FileBasedTrustManagerProvider.java
@@ -376,7 +376,7 @@
List<String> unacceptableReasons)
{
boolean configAcceptable = true;
- DN configEntryDN = configuration.dn();
+ DN cfgEntryDN = configuration.dn();
// Get the path to the trust store file.
@@ -389,7 +389,7 @@
int msgID = MSGID_FILE_TRUSTMANAGER_NO_SUCH_FILE;
unacceptableReasons.add(getMessage(msgID,
String.valueOf(newTrustStoreFile),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
}
@@ -401,7 +401,7 @@
}
int msgID = MSGID_FILE_TRUSTMANAGER_CANNOT_DETERMINE_FILE;
- unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
+ unacceptableReasons.add(getMessage(msgID, String.valueOf(cfgEntryDN),
getExceptionMessage(e)));
configAcceptable = false;
}
@@ -424,7 +424,7 @@
int msgID = MSGID_FILE_TRUSTMANAGER_INVALID_TYPE;
String message = getMessage(msgID, String.valueOf(storeType),
- String.valueOf(configEntryDN),
+ String.valueOf(cfgEntryDN),
getExceptionMessage(kse));
unacceptableReasons.add(message);
configAcceptable = false;
@@ -441,7 +441,7 @@
{
int msgID = MSGID_FILE_TRUSTMANAGER_PIN_PROPERTY_NOT_SET;
String message = getMessage(msgID, String.valueOf(pinProp),
- String.valueOf(configEntryDN));
+ String.valueOf(cfgEntryDN));
unacceptableReasons.add(message);
configAcceptable = false;
}
@@ -457,7 +457,7 @@
{
int msgID = MSGID_FILE_TRUSTMANAGER_PIN_ENVAR_NOT_SET;
String message = getMessage(msgID, String.valueOf(pinEnVar),
- String.valueOf(configEntryDN));
+ String.valueOf(cfgEntryDN));
unacceptableReasons.add(message);
configAcceptable = false;
}
@@ -483,7 +483,7 @@
{
int msgID = MSGID_FILE_TRUSTMANAGER_PIN_FILE_CANNOT_READ;
String message = getMessage(msgID, String.valueOf(pinFile),
- String.valueOf(configEntryDN),
+ String.valueOf(cfgEntryDN),
getExceptionMessage(ioe));
unacceptableReasons.add(message);
configAcceptable = false;
@@ -500,7 +500,7 @@
{
int msgID = MSGID_FILE_TRUSTMANAGER_PIN_FILE_EMPTY;
String message = getMessage(msgID, String.valueOf(pinFile),
- String.valueOf(configEntryDN));
+ String.valueOf(cfgEntryDN));
unacceptableReasons.add(message);
configAcceptable = false;
}
@@ -509,7 +509,7 @@
{
int msgID = MSGID_FILE_TRUSTMANAGER_PIN_NO_SUCH_FILE;
String message = getMessage(msgID, String.valueOf(pinFile),
- String.valueOf(configEntryDN));
+ String.valueOf(cfgEntryDN));
unacceptableReasons.add(message);
configAcceptable = false;
}
diff --git a/opends/src/server/org/opends/server/extensions/FileSystemEntryCache.java b/opends/src/server/org/opends/server/extensions/FileSystemEntryCache.java
index f6b966a..cf50eb0 100644
--- a/opends/src/server/org/opends/server/extensions/FileSystemEntryCache.java
+++ b/opends/src/server/org/opends/server/extensions/FileSystemEntryCache.java
@@ -1527,8 +1527,6 @@
String newCacheType = DEFAULT_FSCACHE_TYPE;
String newCacheHome = DEFAULT_FSCACHE_HOME;
- DN configEntryDN = configuration.dn();
-
// Read configuration.
newConfigEntryDN = configuration.dn();
newLockTimeout = configuration.getLockTimeout();
diff --git a/opends/src/server/org/opends/server/extensions/FingerprintCertificateMapper.java b/opends/src/server/org/opends/server/extensions/FingerprintCertificateMapper.java
index 823cbe5..c32bb76 100644
--- a/opends/src/server/org/opends/server/extensions/FingerprintCertificateMapper.java
+++ b/opends/src/server/org/opends/server/extensions/FingerprintCertificateMapper.java
@@ -298,7 +298,7 @@
List<String> unacceptableReasons)
{
boolean configAcceptable = true;
- DN configEntryDN = configuration.dn();
+ DN cfgEntryDN = configuration.dn();
// Make sure that the fingerprint attribute is defined in the server schema.
String attrName = configuration.getFingerprintAttribute();
@@ -308,7 +308,7 @@
if (newFingerprintType == null)
{
unacceptableReasons.add(getMessage(MSGID_FCM_NO_SUCH_ATTR,
- String.valueOf(configEntryDN),
+ String.valueOf(cfgEntryDN),
attrName));
configAcceptable = false;
}
diff --git a/opends/src/server/org/opends/server/extensions/GSSAPISASLMechanismHandler.java b/opends/src/server/org/opends/server/extensions/GSSAPISASLMechanismHandler.java
index aecbd97..b9d8dde 100644
--- a/opends/src/server/org/opends/server/extensions/GSSAPISASLMechanismHandler.java
+++ b/opends/src/server/org/opends/server/extensions/GSSAPISASLMechanismHandler.java
@@ -397,7 +397,7 @@
List<String> unacceptableReasons)
{
boolean configAcceptable = true;
- DN configEntryDN = configuration.dn();
+ DN cfgEntryDN = configuration.dn();
// Get the identity mapper that should be used to find users.
DN identityMapperDN = configuration.getIdentityMapperDN();
@@ -408,7 +408,7 @@
int msgID = MSGID_SASLGSSAPI_NO_SUCH_IDENTITY_MAPPER;
unacceptableReasons.add(getMessage(msgID,
String.valueOf(identityMapperDN),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
diff --git a/opends/src/server/org/opends/server/extensions/PKCS11KeyManagerProvider.java b/opends/src/server/org/opends/server/extensions/PKCS11KeyManagerProvider.java
index 5e5308f..54a8616 100644
--- a/opends/src/server/org/opends/server/extensions/PKCS11KeyManagerProvider.java
+++ b/opends/src/server/org/opends/server/extensions/PKCS11KeyManagerProvider.java
@@ -294,7 +294,7 @@
List<String> unacceptableReasons)
{
boolean configAcceptable = true;
- DN configEntryDN = configuration.dn();
+ DN cfgEntryDN = configuration.dn();
// Get the PIN needed to access the contents of the keystore file.
@@ -317,7 +317,7 @@
{
int msgID = MSGID_PKCS11_KEYMANAGER_PIN_PROPERTY_NOT_SET;
unacceptableReasons.add(getMessage(msgID, String.valueOf(propertyName),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
}
@@ -330,7 +330,7 @@
{
int msgID = MSGID_PKCS11_KEYMANAGER_PIN_ENVAR_NOT_SET;
unacceptableReasons.add(getMessage(msgID, String.valueOf(enVarName),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
}
@@ -343,7 +343,7 @@
{
int msgID = MSGID_PKCS11_KEYMANAGER_PIN_NO_SUCH_FILE;
unacceptableReasons.add(getMessage(msgID, String.valueOf(fileName),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
else
@@ -358,7 +358,7 @@
{
int msgID = MSGID_PKCS11_KEYMANAGER_PIN_FILE_CANNOT_READ;
unacceptableReasons.add(getMessage(msgID, String.valueOf(fileName),
- String.valueOf(configEntryDN),
+ String.valueOf(cfgEntryDN),
getExceptionMessage(ioe)));
configAcceptable = false;
}
@@ -374,7 +374,7 @@
{
int msgID = MSGID_PKCS11_KEYMANAGER_PIN_FILE_EMPTY;
unacceptableReasons.add(getMessage(msgID, String.valueOf(fileName),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
}
@@ -387,7 +387,7 @@
{
// Pin wasn't defined anywhere.
int msgID = MSGID_PKCS11_KEYMANAGER_NO_PIN;
- unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN)));
+ unacceptableReasons.add(getMessage(msgID, String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
diff --git a/opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java b/opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java
index 3f1179d..2f0fb51 100644
--- a/opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java
+++ b/opends/src/server/org/opends/server/extensions/PlainSASLMechanismHandler.java
@@ -617,7 +617,7 @@
List<String> unacceptableReasons)
{
boolean configAcceptable = true;
- DN configEntryDN = configuration.dn();
+ DN cfgEntryDN = configuration.dn();
// Get the identity mapper that should be used to find users.
DN identityMapperDN = configuration.getIdentityMapperDN();
@@ -628,7 +628,7 @@
int msgID = MSGID_SASLPLAIN_NO_SUCH_IDENTITY_MAPPER;
unacceptableReasons.add(getMessage(msgID,
String.valueOf(identityMapperDN),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
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;
diff --git a/opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java b/opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java
index a2a2cd4..3f298b2 100644
--- a/opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java
+++ b/opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java
@@ -33,7 +33,6 @@
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedHashMap;
-import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.Lock;
@@ -43,10 +42,7 @@
import org.opends.server.admin.std.server.SoftReferenceEntryCacheCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.EntryCache;
-import org.opends.server.config.ConfigAttribute;
import org.opends.server.config.ConfigException;
-import org.opends.server.config.IntegerWithUnitConfigAttribute;
-import org.opends.server.config.StringConfigAttribute;
import org.opends.server.core.DirectoryServer;
import org.opends.server.loggers.debug.DebugTracer;
import org.opends.server.types.CacheEntry;
@@ -788,74 +784,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>();
-
-
- int msgID = MSGID_SOFTREFCACHE_DESCRIPTION_LOCK_TIMEOUT;
- IntegerWithUnitConfigAttribute lockTimeoutAttr =
- new IntegerWithUnitConfigAttribute(ATTR_SOFTREFCACHE_LOCK_TIMEOUT,
- getMessage(msgID), false, timeUnits,
- true, 0, false, 0, lockTimeout,
- TIME_UNIT_MILLISECONDS_FULL);
- attrList.add(lockTimeoutAttr);
-
-
- msgID = MSGID_SOFTREFCACHE_DESCRIPTION_INCLUDE_FILTERS;
- ArrayList<String> includeStrings =
- new ArrayList<String>(includeFilters.size());
- for (SearchFilter f : includeFilters)
- {
- includeStrings.add(f.toString());
- }
- StringConfigAttribute includeAttr =
- new StringConfigAttribute(ATTR_SOFTREFCACHE_INCLUDE_FILTER,
- getMessage(msgID), false, true, false,
- includeStrings);
- attrList.add(includeAttr);
-
-
- msgID = MSGID_SOFTREFCACHE_DESCRIPTION_EXCLUDE_FILTERS;
- ArrayList<String> excludeStrings =
- new ArrayList<String>(excludeFilters.size());
- for (SearchFilter f : excludeFilters)
- {
- excludeStrings.add(f.toString());
- }
- StringConfigAttribute excludeAttr =
- new StringConfigAttribute(ATTR_SOFTREFCACHE_EXCLUDE_FILTER,
- getMessage(msgID), false, true, false,
- excludeStrings);
- attrList.add(excludeAttr);
-
-
- return attrList;
- }
-
-
-
- /**
* {@inheritDoc}
*/
@Override()
@@ -942,8 +870,6 @@
HashSet<SearchFilter> newIncludeFilters = null;
HashSet<SearchFilter> newExcludeFilters = null;
- DN configEntryDN = configuration.dn();
-
// Read configuration.
newConfigEntryDN = configuration.dn();
newLockTimeout = configuration.getLockTimeout();
@@ -957,14 +883,14 @@
MSGID_SOFTREFCACHE_INVALID_INCLUDE_FILTER,
MSGID_SOFTREFCACHE_CANNOT_DECODE_ANY_INCLUDE_FILTERS,
errorHandler,
- configEntryDN
+ newConfigEntryDN
);
newExcludeFilters = EntryCacheCommon.getFilters (
configuration.getExcludeFilter(),
MSGID_SOFTREFCACHE_CANNOT_DECODE_EXCLUDE_FILTER,
MSGID_SOFTREFCACHE_CANNOT_DECODE_ANY_EXCLUDE_FILTERS,
errorHandler,
- configEntryDN
+ newConfigEntryDN
);
break;
case PHASE_ACCEPTABLE: // acceptable and apply are using the same
@@ -974,14 +900,14 @@
MSGID_SOFTREFCACHE_INVALID_INCLUDE_FILTER,
0,
errorHandler,
- configEntryDN
+ newConfigEntryDN
);
newExcludeFilters = EntryCacheCommon.getFilters (
configuration.getExcludeFilter(),
MSGID_SOFTREFCACHE_INVALID_EXCLUDE_FILTER,
0,
errorHandler,
- configEntryDN
+ newConfigEntryDN
);
break;
}
diff --git a/opends/src/server/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java b/opends/src/server/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java
index 4368122..8b49293 100644
--- a/opends/src/server/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java
+++ b/opends/src/server/org/opends/server/extensions/SubjectAttributeToUserAttributeCertificateMapper.java
@@ -347,7 +347,7 @@
List<String> unacceptableReasons)
{
boolean configAcceptable = true;
- DN configEntryDN = configuration.dn();
+ DN cfgEntryDN = configuration.dn();
// Get and validate the subject attribute to user attribute mappings.
LinkedHashMap<String,AttributeType> newAttributeMap =
@@ -360,7 +360,7 @@
if (colonPos <= 0)
{
int msgID = MSGID_SATUACM_INVALID_MAP_FORMAT;
- unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
+ unacceptableReasons.add(getMessage(msgID, String.valueOf(cfgEntryDN),
mapStr));
configAcceptable = false;
break;
@@ -371,7 +371,7 @@
if ((certAttrName.length() == 0) || (userAttrName.length() == 0))
{
int msgID = MSGID_SATUACM_INVALID_MAP_FORMAT;
- unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
+ unacceptableReasons.add(getMessage(msgID, String.valueOf(cfgEntryDN),
mapStr));
configAcceptable = false;
break;
@@ -380,7 +380,7 @@
if (newAttributeMap.containsKey(certAttrName))
{
int msgID = MSGID_SATUACM_DUPLICATE_CERT_ATTR;
- unacceptableReasons.add(getMessage(msgID, String.valueOf(configEntryDN),
+ unacceptableReasons.add(getMessage(msgID, String.valueOf(cfgEntryDN),
certAttrName));
configAcceptable = false;
break;
@@ -392,7 +392,7 @@
{
int msgID = MSGID_SATUACM_NO_SUCH_ATTR;
unacceptableReasons.add(getMessage(msgID, mapStr,
- String.valueOf(configEntryDN),
+ String.valueOf(cfgEntryDN),
userAttrName));
configAcceptable = false;
break;
@@ -404,7 +404,7 @@
{
int msgID = MSGID_SATUACM_DUPLICATE_USER_ATTR;
unacceptableReasons.add(getMessage(msgID,
- String.valueOf(configEntryDN),
+ String.valueOf(cfgEntryDN),
attrType.getNameOrOID()));
configAcceptable = false;
break mapLoop;
diff --git a/opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java b/opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java
index 4572c17..9c317ff 100644
--- a/opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java
+++ b/opends/src/server/org/opends/server/extensions/SubjectDNToUserAttributeCertificateMapper.java
@@ -262,7 +262,7 @@
List<String> unacceptableReasons)
{
boolean configAcceptable = true;
- DN configEntryDN = configuration.dn();
+ DN cfgEntryDN = configuration.dn();
// Make sure that the subject attribute is defined in the server schema.
String attrName = configuration.getSubjectAttribute();
@@ -272,7 +272,7 @@
if (newSubjectType == null)
{
unacceptableReasons.add(getMessage(MSGID_SDTUACM_NO_SUCH_ATTR,
- String.valueOf(configEntryDN),
+ String.valueOf(cfgEntryDN),
attrName));
configAcceptable = false;
}
diff --git a/opends/src/server/org/opends/server/plugins/profiler/ProfilerPlugin.java b/opends/src/server/org/opends/server/plugins/profiler/ProfilerPlugin.java
index 5496d47..af4fa00 100644
--- a/opends/src/server/org/opends/server/plugins/profiler/ProfilerPlugin.java
+++ b/opends/src/server/org/opends/server/plugins/profiler/ProfilerPlugin.java
@@ -265,13 +265,13 @@
List<String> unacceptableReasons)
{
boolean configAcceptable = true;
- DN configEntryDN = configuration.dn();
+ DN cfgEntryDN = configuration.dn();
// Make sure that the plugin is only registered as a startup plugin.
if (configuration.getPluginType().isEmpty())
{
int msgID = MSGID_PLUGIN_PROFILER_NO_PLUGIN_TYPES;
- String message = getMessage(msgID, String.valueOf(configEntryDN));
+ String message = getMessage(msgID, String.valueOf(cfgEntryDN));
unacceptableReasons.add(message);
configAcceptable = false;
}
@@ -282,7 +282,7 @@
if (t != PluginCfgDefn.PluginType.STARTUP)
{
int msgID = MSGID_PLUGIN_PROFILER_INVALID_PLUGIN_TYPE;
- String message = getMessage(msgID, String.valueOf(configEntryDN),
+ String message = getMessage(msgID, String.valueOf(cfgEntryDN),
String.valueOf(t));
unacceptableReasons.add(message);
configAcceptable = false;
@@ -299,7 +299,7 @@
int msgID = MSGID_PLUGIN_PROFILER_INVALID_PROFILE_DIR;
unacceptableReasons.add(getMessage(msgID,
profileDirectory.getAbsolutePath(),
- String.valueOf(configEntryDN)));
+ String.valueOf(cfgEntryDN)));
configAcceptable = false;
}
--
Gitblit v1.10.0