| | |
| | | import org.opends.server.config.JMXMBean; |
| | | import org.opends.server.extensions.ConfigFileHandler; |
| | | import org.opends.server.extensions.JMXAlertHandler; |
| | | import org.opends.server.loggers.StartupDebugLogger; |
| | | import org.opends.server.loggers.StartupErrorLogger; |
| | | import org.opends.server.monitors.BackendMonitor; |
| | | import org.opends.server.monitors.ConnectionHandlerMonitor; |
| | |
| | | import org.opends.server.types.AttributeUsage; |
| | | import org.opends.server.types.AttributeValue; |
| | | import org.opends.server.types.CryptoManager; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DITContentRule; |
| | | import org.opends.server.types.DITStructureRule; |
| | |
| | | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.loggers.Access.*; |
| | | import static org.opends.server.loggers.Debug.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCought; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import static org.opends.server.loggers.Error.*; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements Thread.UncaughtExceptionHandler, AlertGenerator |
| | | { |
| | | /** |
| | | * The fully-qualified name of this class for debugging purposes. |
| | | * The fully-qualified name of this class. |
| | | */ |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.core.DirectoryServer"; |
| | |
| | | // The schema configuration manager for the Directory Server. |
| | | private SchemaConfigManager schemaConfigManager; |
| | | |
| | | // The debug logger that will be used during the Directory Server startup. |
| | | private StartupDebugLogger startupDebugLogger; |
| | | |
| | | // The error logger that will be used during the Directory Server startup. |
| | | private StartupErrorLogger startupErrorLogger; |
| | |
| | | |
| | | // Install default debug and error loggers for use until enough of the |
| | | // configuration has been read to allow the real loggers to be installed. |
| | | removeAllDebugLoggers(true); |
| | | startupDebugLogger = new StartupDebugLogger(); |
| | | startupDebugLogger.initializeDebugLogger(null); |
| | | addDebugLogger(startupDebugLogger); |
| | | |
| | | removeAllErrorLoggers(true); |
| | | startupErrorLogger = new StartupErrorLogger(); |
| | |
| | | public static void initializeJMX() |
| | | throws InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeJMX"); |
| | | |
| | | try |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapServer", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_CREATE_MBEAN_SERVER; |
| | | String message = getMessage(msgID, String.valueOf(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapServer", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_LOAD_CONFIG_HANDLER_CLASS; |
| | | String message = getMessage(msgID, configClass, e); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapServer", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_INSTANTIATE_CONFIG_HANDLER; |
| | | String message = getMessage(msgID, configClass, e); |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapServer", ie); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapServer", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_INITIALIZE_CONFIG_HANDLER; |
| | | String message = getMessage(msgID, configClass, configFile, e); |
| | |
| | | */ |
| | | public static String getConfigFile() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getConfigFile"); |
| | | |
| | | return directoryServer.configFile; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "startServer", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_ACQUIRE_EXCLUSIVE_SERVER_LOCK; |
| | | String message = getMessage(msgID, lockFile, |
| | |
| | | sendAlertNotification(this, ALERT_TYPE_SERVER_STARTED, msgID, message); |
| | | |
| | | |
| | | // Deregister the startup-specific debug and error loggers. |
| | | removeDebugLogger(startupDebugLogger); |
| | | removeErrorLogger(startupErrorLogger); |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapMatchingRules", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_MATCHING_RULE; |
| | | String message = |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | | String message = getMessage(msgID, AttributeTypeSyntax.class.getName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | | String message = getMessage(msgID, BinarySyntax.class.getName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | | String message = getMessage(msgID, BooleanSyntax.class.getName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | | String message = getMessage(msgID, DirectoryStringSyntax.class.getName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | | String message = getMessage(msgID, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | | String message = getMessage(msgID, IA5StringSyntax.class.getName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | | String message = getMessage(msgID, IntegerSyntax.class.getName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | | String message = getMessage(msgID, GeneralizedTimeSyntax.class.getName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | | String message = getMessage(msgID, ObjectClassSyntax.class.getName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | | String message = getMessage(msgID, OIDSyntax.class.getName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "bootstrapAttributeSyntaxes", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_BOOTSTRAP_SYNTAX; |
| | | String message = getMessage(msgID, TelephoneNumberSyntax.class.getName(), |
| | |
| | | */ |
| | | public static AuthenticatedUsers getAuthenticatedUsers() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAuthenticatedUsers"); |
| | | |
| | | return directoryServer.authenticatedUsers; |
| | | } |
| | |
| | | */ |
| | | public static CryptoManager getCryptoManager() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCryptoManager"); |
| | | |
| | | return directoryServer.cryptoManager; |
| | | } |
| | |
| | | public void initializeMailServerPropertySets() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeMailServerPropertySets"); |
| | | |
| | | mailServerPropertySets = new CopyOnWriteArrayList<Properties>(); |
| | | |
| | |
| | | */ |
| | | public static CopyOnWriteArrayList<Properties> getMailServerPropertySets() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMailServerPropertySets"); |
| | | |
| | | return directoryServer.mailServerPropertySets; |
| | | } |
| | |
| | | public void initializeSchema() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeSchema"); |
| | | |
| | | |
| | | // Create the schema configuration manager, and initialize the schema from |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "initializeSchema", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | | try |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | assert debugException(CLASS_NAME, "initializeSchema", ie); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | throw ie; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "initializeSchema", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_INITIALIZE_CONFIG_HANDLER; |
| | | String message = getMessage(msgID, configClass, configFile, e); |
| | |
| | | public static Set<BackendInitializationListener> |
| | | getBackendInitializationListeners() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getBackendInitializationListeners"); |
| | | |
| | | return directoryServer.backendInitializationListeners; |
| | | } |
| | |
| | | public static void registerBackendInitializationListener( |
| | | BackendInitializationListener listener) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerBackendInitializationListener", |
| | | String.valueOf(listener)); |
| | | |
| | | directoryServer.backendInitializationListeners.add(listener); |
| | | } |
| | |
| | | public static void deregisterBackendInitializationListener( |
| | | BackendInitializationListener listener) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterBackendInitializationListener", |
| | | String.valueOf(listener)); |
| | | |
| | | directoryServer.backendInitializationListeners.remove(listener); |
| | | } |
| | |
| | | private void initializeBackends() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeBackends"); |
| | | |
| | | backendConfigManager = new BackendConfigManager(); |
| | | backendConfigManager.initializeBackendConfig(); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "initializeBackends", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_GET_ROOT_DSE_CONFIG_ENTRY; |
| | | String message = getMessage(msgID, stackTraceToSingleLineString(e)); |
| | |
| | | public void initializeGroupManager() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeGroupManager"); |
| | | |
| | | groupManager = new GroupManager(); |
| | | groupManager.initializeGroupImplementations(); |
| | |
| | | */ |
| | | public static GroupManager getGroupManager() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getGroupManager"); |
| | | |
| | | return directoryServer.groupManager; |
| | | } |
| | |
| | | private void initializeSupportedControls() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeSupportedControls"); |
| | | |
| | | supportedControls.add(OID_LDAP_ASSERTION); |
| | | supportedControls.add(OID_LDAP_READENTRY_PREREAD); |
| | |
| | | private void initializeSupportedFeatures() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeSupportedFeatures"); |
| | | |
| | | supportedFeatures.add(OID_ALL_OPERATIONAL_ATTRS_FEATURE); |
| | | supportedFeatures.add(OID_MODIFY_INCREMENT_FEATURE); |
| | |
| | | private void initializeIdentityMappers() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeIdentityMappers"); |
| | | |
| | | identityMapperConfigManager = new IdentityMapperConfigManager(); |
| | | identityMapperConfigManager.initializeIdentityMappers(); |
| | |
| | | private void initializeExtendedOperations() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeExtendedOperations"); |
| | | |
| | | extendedOperationConfigManager = new ExtendedOperationConfigManager(); |
| | | extendedOperationConfigManager.initializeExtendedOperationHandlers(); |
| | |
| | | private void initializeSASLMechanisms() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeSASLMechanisms"); |
| | | |
| | | saslConfigManager = new SASLConfigManager(); |
| | | saslConfigManager.initializeSASLMechanismHandlers(); |
| | |
| | | private void initializeConnectionHandlers() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeConnectionHandlers"); |
| | | |
| | | connectionHandlerConfigManager = new ConnectionHandlerConfigManager(); |
| | | connectionHandlerConfigManager.initializeConnectionHandlerConfig(); |
| | |
| | | public void initializePasswordPolicyComponents() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializePasswordPolicyComponents"); |
| | | |
| | | |
| | | // Initialize all the password storage schemes. |
| | |
| | | */ |
| | | public static OperatingSystem getOperatingSystem() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getOperatingSystem"); |
| | | |
| | | return directoryServer.operatingSystem; |
| | | } |
| | |
| | | */ |
| | | public static ThreadGroup getDirectoryThreadGroup() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDirectoryThreadGroup"); |
| | | |
| | | return directoryServer.directoryThreadGroup; |
| | | } |
| | |
| | | */ |
| | | public static ConfigHandler getConfigHandler() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getConfigHandler"); |
| | | |
| | | return directoryServer.configHandler; |
| | | } |
| | |
| | | public void initializePlugins() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializePlugins"); |
| | | |
| | | pluginConfigManager.initializePluginConfig(null); |
| | | } |
| | |
| | | public void initializePlugins(Set<PluginType> pluginTypes) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializePlugins"); |
| | | |
| | | pluginConfigManager = new PluginConfigManager(); |
| | | pluginConfigManager.initializePluginConfig(pluginTypes); |
| | |
| | | */ |
| | | public static PluginConfigManager getPluginConfigManager() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPluginConfigManager"); |
| | | |
| | | return directoryServer.pluginConfigManager; |
| | | } |
| | |
| | | public static ConfigEntry getConfigEntry(DN entryDN) |
| | | throws ConfigException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getConfigEntry", String.valueOf(entryDN)); |
| | | |
| | | return directoryServer.configHandler.getConfigEntry(entryDN); |
| | | } |
| | |
| | | */ |
| | | public static String getServerRoot() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getServerRoot"); |
| | | |
| | | if (directoryServer.configHandler == null) |
| | | { |
| | |
| | | */ |
| | | public static long getStartTime() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getStartTime"); |
| | | |
| | | return directoryServer.startUpTime; |
| | | } |
| | |
| | | */ |
| | | public static String getStartTimeUTC() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getStartTimeUTC"); |
| | | |
| | | return directoryServer.startTimeUTC; |
| | | } |
| | |
| | | */ |
| | | public static Schema getSchema() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSchema"); |
| | | |
| | | return directoryServer.schema; |
| | | } |
| | |
| | | */ |
| | | public static void setSchema(Schema schema) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setSchema", String.valueOf(schema)); |
| | | |
| | | directoryServer.schema = schema; |
| | | } |
| | |
| | | */ |
| | | public static ConcurrentHashMap<String,MatchingRule> getMatchingRules() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchingRules"); |
| | | |
| | | return directoryServer.schema.getMatchingRules(); |
| | | } |
| | |
| | | */ |
| | | public static LinkedHashSet<AttributeValue> getMatchingRuleSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchingRuleSet"); |
| | | |
| | | return directoryServer.schema.getMatchingRuleSet(); |
| | | } |
| | |
| | | */ |
| | | public static MatchingRule getMatchingRule(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchingRule", String.valueOf(lowerName)); |
| | | |
| | | return directoryServer.schema.getMatchingRule(lowerName); |
| | | } |
| | |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerMatchingRule", |
| | | String.valueOf(matchingRule), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | directoryServer.schema.registerMatchingRule(matchingRule, |
| | | overwriteExisting); |
| | |
| | | */ |
| | | public static void deregisterMatchingRule(MatchingRule matchingRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterMatchingRule", |
| | | String.valueOf(matchingRule)); |
| | | |
| | | directoryServer.schema.deregisterMatchingRule(matchingRule); |
| | | } |
| | |
| | | public static ConcurrentHashMap<String,ApproximateMatchingRule> |
| | | getApproximateMatchingRules() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getApproximateMatchingRules"); |
| | | |
| | | return directoryServer.schema.getApproximateMatchingRules(); |
| | | } |
| | |
| | | public static ApproximateMatchingRule |
| | | getApproximateMatchingRule(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getApproximateMatchingRule", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return directoryServer.schema.getApproximateMatchingRule(lowerName); |
| | | } |
| | |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerApproximateMatchingRule", |
| | | String.valueOf(matchingRule), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | directoryServer.schema.registerApproximateMatchingRule(matchingRule, |
| | | overwriteExisting); |
| | |
| | | public static void deregisterApproximateMatchingRule(ApproximateMatchingRule |
| | | matchingRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterApproximateMatchingRule", |
| | | String.valueOf(matchingRule)); |
| | | |
| | | directoryServer.schema.deregisterApproximateMatchingRule(matchingRule); |
| | | } |
| | |
| | | public static ConcurrentHashMap<String,EqualityMatchingRule> |
| | | getEqualityMatchingRules() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEqualityMatchingRules"); |
| | | |
| | | return directoryServer.schema.getEqualityMatchingRules(); |
| | | } |
| | |
| | | */ |
| | | public static EqualityMatchingRule getEqualityMatchingRule(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEqualityMatchingRule", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return directoryServer.schema.getEqualityMatchingRule(lowerName); |
| | | } |
| | |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerEqualityMatchingRule", |
| | | String.valueOf(matchingRule), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | directoryServer.schema.registerEqualityMatchingRule(matchingRule, |
| | | overwriteExisting); |
| | |
| | | public static void deregisterEqualityMatchingRule(EqualityMatchingRule |
| | | matchingRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterEqualityMatchingRule", |
| | | String.valueOf(matchingRule)); |
| | | |
| | | directoryServer.schema.deregisterEqualityMatchingRule(matchingRule); |
| | | } |
| | |
| | | public static ConcurrentHashMap<String,OrderingMatchingRule> |
| | | getOrderingMatchingRules() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getOrderingMatchingRules"); |
| | | |
| | | return directoryServer.schema.getOrderingMatchingRules(); |
| | | } |
| | |
| | | */ |
| | | public static OrderingMatchingRule getOrderingMatchingRule(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getOrderingMatchingRule", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return directoryServer.schema.getOrderingMatchingRule(lowerName); |
| | | } |
| | |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerOrderingMatchingRule", |
| | | String.valueOf(matchingRule), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | directoryServer.schema.registerOrderingMatchingRule(matchingRule, |
| | | overwriteExisting); |
| | |
| | | public static void deregisterOrderingMatchingRule(OrderingMatchingRule |
| | | matchingRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterOrderingMatchingRule", |
| | | String.valueOf(matchingRule)); |
| | | |
| | | directoryServer.schema.deregisterOrderingMatchingRule(matchingRule); |
| | | } |
| | |
| | | public static ConcurrentHashMap<String,SubstringMatchingRule> |
| | | getSubstringMatchingRules() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSubstringMatchingRules"); |
| | | |
| | | return directoryServer.schema.getSubstringMatchingRules(); |
| | | } |
| | |
| | | */ |
| | | public static SubstringMatchingRule getSubstringMatchingRule(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSubstringMatchingRule", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return directoryServer.schema.getSubstringMatchingRule(lowerName); |
| | | } |
| | |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerSubstringMatchingRule", |
| | | String.valueOf(matchingRule), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | directoryServer.schema.registerSubstringMatchingRule(matchingRule, |
| | | overwriteExisting); |
| | |
| | | public static void deregisterSubstringMatchingRule(SubstringMatchingRule |
| | | matchingRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterSubstringMatchingRule", |
| | | String.valueOf(matchingRule)); |
| | | |
| | | directoryServer.schema.deregisterSubstringMatchingRule(matchingRule); |
| | | } |
| | |
| | | */ |
| | | public static ConcurrentHashMap<String,ObjectClass> getObjectClasses() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getObjectClasses"); |
| | | |
| | | return directoryServer.schema.getObjectClasses(); |
| | | } |
| | |
| | | */ |
| | | public static LinkedHashSet<AttributeValue> getObjectClassSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getObjectClassSet"); |
| | | |
| | | return directoryServer.schema.getObjectClassSet(); |
| | | } |
| | |
| | | */ |
| | | public static ObjectClass getObjectClass(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getObjectClass", String.valueOf(lowerName)); |
| | | |
| | | return directoryServer.schema.getObjectClass(lowerName); |
| | | } |
| | |
| | | public static ObjectClass getObjectClass(String lowerName, |
| | | boolean returnDefault) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getObjectClass", String.valueOf(lowerName), |
| | | String.valueOf(returnDefault)); |
| | | |
| | | ObjectClass oc = directoryServer.schema.getObjectClass(lowerName); |
| | | if (returnDefault && (oc == null)) |
| | |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerObjectClass", |
| | | String.valueOf(objectClass), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | directoryServer.schema.registerObjectClass(objectClass, overwriteExisting); |
| | | } |
| | |
| | | */ |
| | | public static void deregisterObjectClass(ObjectClass objectClass) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterObjectClass", |
| | | String.valueOf(objectClass)); |
| | | |
| | | directoryServer.schema.deregisterObjectClass(objectClass); |
| | | } |
| | |
| | | */ |
| | | public static ObjectClass getTopObjectClass() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getTopObjectClass"); |
| | | |
| | | ObjectClass objectClass = |
| | | directoryServer.schema.getObjectClass(TOP_OBJECTCLASS_NAME); |
| | |
| | | */ |
| | | public static ObjectClass getDefaultObjectClass(String name) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDefaultObjectClass", |
| | | String.valueOf(name)); |
| | | |
| | | String lowerName = toLowerCase(name); |
| | | ObjectClass objectClass = directoryServer.schema.getObjectClass(lowerName); |
| | |
| | | */ |
| | | public static ObjectClass getDefaultAuxiliaryObjectClass(String name) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDefaultObjectClass", |
| | | String.valueOf(name)); |
| | | |
| | | String lowerName = toLowerCase(name); |
| | | ObjectClass objectClass = directoryServer.schema.getObjectClass(lowerName); |
| | |
| | | */ |
| | | public static ConcurrentHashMap<String,AttributeType> getAttributeTypes() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttributeTypes"); |
| | | |
| | | return directoryServer.schema.getAttributeTypes(); |
| | | } |
| | |
| | | */ |
| | | public static LinkedHashSet<AttributeValue> getAttributeTypeSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttributeTypeSet"); |
| | | |
| | | return directoryServer.schema.getAttributeTypeSet(); |
| | | } |
| | |
| | | */ |
| | | public static AttributeType getAttributeType(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttributeType", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return directoryServer.schema.getAttributeType(lowerName); |
| | | } |
| | |
| | | public static AttributeType getAttributeType(String lowerName, |
| | | boolean returnDefault) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttributeType", |
| | | String.valueOf(lowerName), |
| | | String.valueOf(returnDefault)); |
| | | |
| | | AttributeType type = directoryServer.schema.getAttributeType(lowerName); |
| | | if (returnDefault && (type == null)) |
| | |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerAttributeType", |
| | | String.valueOf(attributeType), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | directoryServer.schema.registerAttributeType(attributeType, |
| | | overwriteExisting); |
| | |
| | | */ |
| | | public static void deregisterAttributeType(AttributeType attributeType) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterAttributeType", |
| | | String.valueOf(attributeType)); |
| | | |
| | | directoryServer.schema.deregisterAttributeType(attributeType); |
| | | } |
| | |
| | | */ |
| | | public static AttributeType getObjectClassAttributeType() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getObjectClassAttributeType"); |
| | | |
| | | if (directoryServer.objectClassAttributeType == null) |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "getObjectClassAttributeType", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | catch (Exception e) |
| | | { |
| | | // This should never happen. |
| | | assert debugException(CLASS_NAME, "getObjectClassAttributeType", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | */ |
| | | public static AttributeType getDefaultAttributeType(String name) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDefaultAttributeType", |
| | | String.valueOf(name)); |
| | | |
| | | |
| | | return getDefaultAttributeType(name, getDefaultAttributeSyntax()); |
| | |
| | | public static AttributeType getDefaultAttributeType(String name, |
| | | AttributeSyntax syntax) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDefaultAttributeType", |
| | | String.valueOf(name)); |
| | | |
| | | |
| | | String oid = toLowerCase(name) + "-oid"; |
| | |
| | | */ |
| | | public static ConcurrentHashMap<String,AttributeSyntax> getAttributeSyntaxes() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttributeSyntaxes"); |
| | | |
| | | return directoryServer.schema.getSyntaxes(); |
| | | } |
| | |
| | | */ |
| | | public static LinkedHashSet<AttributeValue> getAttributeSyntaxSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttributeSyntaxSet"); |
| | | |
| | | return directoryServer.schema.getSyntaxSet(); |
| | | } |
| | |
| | | public static AttributeSyntax getAttributeSyntax(String oid, |
| | | boolean allowDefault) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAttributeSyntax", String.valueOf(oid), |
| | | String.valueOf(allowDefault)); |
| | | |
| | | AttributeSyntax syntax = directoryServer.schema.getSyntax(oid); |
| | | if ((syntax == null) && allowDefault) |
| | |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerAttributeSyntax", |
| | | String.valueOf(syntax), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | directoryServer.schema.registerSyntax(syntax, overwriteExisting); |
| | | } |
| | |
| | | */ |
| | | public static void deregisterAttributeSyntax(AttributeSyntax syntax) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterAttributeSyntax", |
| | | String.valueOf(syntax)); |
| | | |
| | | directoryServer.schema.deregisterSyntax(syntax); |
| | | } |
| | |
| | | */ |
| | | public static AttributeSyntax getDefaultAttributeSyntax() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDefaultAttributeSyntax"); |
| | | |
| | | return directoryServer.defaultSyntax; |
| | | } |
| | |
| | | */ |
| | | public static AttributeSyntax getDefaultBinarySyntax() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDefaultBinarySyntax"); |
| | | |
| | | return directoryServer.defaultBinarySyntax; |
| | | } |
| | |
| | | */ |
| | | public static AttributeSyntax getDefaultBooleanSyntax() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDefaultBooleanSyntax"); |
| | | |
| | | return directoryServer.defaultBooleanSyntax; |
| | | } |
| | |
| | | */ |
| | | public static AttributeSyntax getDefaultDNSyntax() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDefaultDNSyntax"); |
| | | |
| | | return directoryServer.defaultDNSyntax; |
| | | } |
| | |
| | | */ |
| | | public static AttributeSyntax getDefaultIntegerSyntax() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDefaultIntegerSyntax"); |
| | | |
| | | return directoryServer.defaultIntegerSyntax; |
| | | } |
| | |
| | | */ |
| | | public static AttributeSyntax getDefaultStringSyntax() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDefaultStringSyntax"); |
| | | |
| | | return directoryServer.defaultStringSyntax; |
| | | } |
| | |
| | | public static ConcurrentHashMap<MatchingRule,MatchingRuleUse> |
| | | getMatchingRuleUses() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchingRuleUses"); |
| | | |
| | | return directoryServer.schema.getMatchingRuleUses(); |
| | | } |
| | |
| | | */ |
| | | public static LinkedHashSet<AttributeValue> getMatchingRuleUseSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchingRuleUseSet"); |
| | | |
| | | return directoryServer.schema.getMatchingRuleUseSet(); |
| | | } |
| | |
| | | */ |
| | | public static MatchingRuleUse getMatchingRuleUse(MatchingRule matchingRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMatchingRuleUse", |
| | | String.valueOf(matchingRule)); |
| | | |
| | | return directoryServer.schema.getMatchingRuleUse(matchingRule); |
| | | } |
| | |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerMatchingRuleUse", |
| | | String.valueOf(matchingRuleUse), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | directoryServer.schema.registerMatchingRuleUse(matchingRuleUse, |
| | | overwriteExisting); |
| | |
| | | */ |
| | | public static void deregisterMatchingRuleUse(MatchingRuleUse matchingRuleUse) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterMatchingRuleUse", |
| | | String.valueOf(matchingRuleUse)); |
| | | |
| | | directoryServer.schema.deregisterMatchingRuleUse(matchingRuleUse); |
| | | } |
| | |
| | | public static ConcurrentHashMap<ObjectClass,DITContentRule> |
| | | getDITContentRules() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITContentRules"); |
| | | |
| | | return directoryServer.schema.getDITContentRules(); |
| | | } |
| | |
| | | */ |
| | | public static LinkedHashSet<AttributeValue> getDITContentRuleSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITContentRuleSet"); |
| | | |
| | | return directoryServer.schema.getDITContentRuleSet(); |
| | | } |
| | |
| | | */ |
| | | public static DITContentRule getDITContentRule(ObjectClass objectClass) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITContentRule", |
| | | String.valueOf(objectClass)); |
| | | |
| | | return directoryServer.schema.getDITContentRule(objectClass); |
| | | } |
| | |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerDITContentRule", |
| | | String.valueOf(ditContentRule), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | directoryServer.schema.registerDITContentRule(ditContentRule, |
| | | overwriteExisting); |
| | |
| | | */ |
| | | public static void deregisterDITContentRule(DITContentRule ditContentRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterDITContentRule", |
| | | String.valueOf(ditContentRule)); |
| | | |
| | | directoryServer.schema.deregisterDITContentRule(ditContentRule); |
| | | } |
| | |
| | | public static ConcurrentHashMap<NameForm,DITStructureRule> |
| | | getDITStructureRules() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITStructureRules"); |
| | | |
| | | return directoryServer.schema.getDITStructureRulesByNameForm(); |
| | | } |
| | |
| | | */ |
| | | public static LinkedHashSet<AttributeValue> getDITStructureRuleSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITStructureRuleSet"); |
| | | |
| | | return directoryServer.schema.getDITStructureRuleSet(); |
| | | } |
| | |
| | | */ |
| | | public static DITStructureRule getDITStructureRule(int ruleID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITStructureRule", |
| | | String.valueOf(ruleID)); |
| | | |
| | | return directoryServer.schema.getDITStructureRule(ruleID); |
| | | } |
| | |
| | | */ |
| | | public static DITStructureRule getDITStructureRule(NameForm nameForm) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDITStructureRule", |
| | | String.valueOf(nameForm)); |
| | | |
| | | return directoryServer.schema.getDITStructureRule(nameForm); |
| | | } |
| | |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerDITStructureRule", |
| | | String.valueOf(ditStructureRule), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | directoryServer.schema.registerDITStructureRule(ditStructureRule, |
| | | overwriteExisting); |
| | |
| | | public static void deregisterDITStructureRule(DITStructureRule |
| | | ditStructureRule) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterDITStructureRule", |
| | | String.valueOf(ditStructureRule)); |
| | | |
| | | directoryServer.schema.deregisterDITStructureRule(ditStructureRule); |
| | | } |
| | |
| | | */ |
| | | public static ConcurrentHashMap<ObjectClass,NameForm> getNameForms() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getNameForms"); |
| | | |
| | | return directoryServer.schema.getNameFormsByObjectClass(); |
| | | } |
| | |
| | | */ |
| | | public static LinkedHashSet<AttributeValue> getNameFormSet() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getNameFormSet"); |
| | | |
| | | return directoryServer.schema.getNameFormSet(); |
| | | } |
| | |
| | | */ |
| | | public static NameForm getNameForm(ObjectClass objectClass) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getNameForm", String.valueOf(objectClass)); |
| | | |
| | | return directoryServer.schema.getNameForm(objectClass); |
| | | } |
| | |
| | | */ |
| | | public static NameForm getNameForm(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getNameForm", String.valueOf(lowerName)); |
| | | |
| | | return directoryServer.schema.getNameForm(lowerName); |
| | | } |
| | |
| | | boolean overwriteExisting) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerNameForm", String.valueOf(nameForm), |
| | | String.valueOf(overwriteExisting)); |
| | | |
| | | directoryServer.schema.registerNameForm(nameForm, overwriteExisting); |
| | | } |
| | |
| | | */ |
| | | public static void deregisterNameForm(NameForm nameForm) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterNameForm", |
| | | String.valueOf(nameForm)); |
| | | |
| | | directoryServer.schema.deregisterNameForm(nameForm); |
| | | } |
| | |
| | | */ |
| | | public static MBeanServer getJMXMBeanServer() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getJMXMBeanServer"); |
| | | |
| | | return directoryServer.mBeanServer; |
| | | } |
| | |
| | | */ |
| | | public static ConcurrentHashMap<DN,JMXMBean> getJMXMBeans() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getJMXMBeans"); |
| | | |
| | | return directoryServer.mBeans; |
| | | } |
| | |
| | | */ |
| | | public static JMXMBean getJMXMBean(DN configEntryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getJMXMBean", String.valueOf(configEntryDN)); |
| | | |
| | | return directoryServer.mBeans.get(configEntryDN); |
| | | } |
| | |
| | | public static void registerConfigurableComponent(ConfigurableComponent |
| | | component) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerConfigurableComponent", |
| | | String.valueOf(component)); |
| | | |
| | | DN componentDN = component.getConfigurableComponentEntryDN(); |
| | | JMXMBean mBean = directoryServer.mBeans.get(componentDN); |
| | |
| | | public static void deregisterConfigurableComponent(ConfigurableComponent |
| | | component) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterConfigurableComponent", |
| | | String.valueOf(component)); |
| | | |
| | | DN componentDN = component.getConfigurableComponentEntryDN(); |
| | | JMXMBean mBean = directoryServer.mBeans.get(componentDN); |
| | |
| | | */ |
| | | public static void registerInvokableComponent(InvokableComponent component) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerInvokableComponent", |
| | | String.valueOf(component)); |
| | | |
| | | DN componentDN = component.getInvokableComponentEntryDN(); |
| | | JMXMBean mBean = directoryServer.mBeans.get(componentDN); |
| | |
| | | */ |
| | | public static void deregisterInvokableComponent(InvokableComponent component) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterInvokableComponent", |
| | | String.valueOf(component)); |
| | | |
| | | DN componentDN = component.getInvokableComponentEntryDN(); |
| | | JMXMBean mBean = directoryServer.mBeans.get(componentDN); |
| | |
| | | */ |
| | | public static void registerAlertGenerator(AlertGenerator alertGenerator) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerAlertGenerator"); |
| | | |
| | | DN componentDN = alertGenerator.getComponentEntryDN(); |
| | | JMXMBean mBean = directoryServer.mBeans.get(componentDN); |
| | |
| | | */ |
| | | public static void deregisterAlertGenerator(AlertGenerator alertGenerator) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterAlertGenerator"); |
| | | |
| | | DN componentDN = alertGenerator.getComponentEntryDN(); |
| | | JMXMBean mBean = directoryServer.mBeans.get(componentDN); |
| | |
| | | */ |
| | | public static CopyOnWriteArrayList<AlertHandler> getAlertHandlers() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAlertHandlers"); |
| | | |
| | | return directoryServer.alertHandlers; |
| | | } |
| | |
| | | */ |
| | | public static void registerAlertHandler(AlertHandler alertHandler) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerAlertHandler", |
| | | String.valueOf(alertHandler)); |
| | | |
| | | directoryServer.alertHandlers.add(alertHandler); |
| | | } |
| | |
| | | */ |
| | | public static void deregisterAlertHandler(AlertHandler alertHandler) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterAlertHandler", |
| | | String.valueOf(alertHandler)); |
| | | |
| | | directoryServer.alertHandlers.remove(alertHandler); |
| | | } |
| | |
| | | String alertType, int alertID, |
| | | String alertMessage) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "sendAlertNotification", |
| | | String.valueOf(generator), String.valueOf(alertType), |
| | | String.valueOf(alertID), String.valueOf(alertMessage)); |
| | | |
| | | |
| | | if ((directoryServer.alertHandlers == null) || |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "sendAlertNotification", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | public static ConcurrentHashMap<String,PasswordStorageScheme> |
| | | getPasswordStorageSchemes() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPasswordStorageSchemes"); |
| | | |
| | | return directoryServer.passwordStorageSchemes; |
| | | } |
| | |
| | | */ |
| | | public static PasswordStorageScheme getPasswordStorageScheme(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPasswordStorageScheme", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return directoryServer.passwordStorageSchemes.get(lowerName); |
| | | } |
| | |
| | | public static ConcurrentHashMap<String,PasswordStorageScheme> |
| | | getAuthPasswordStorageSchemes() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAuthPasswordStorageSchemes"); |
| | | |
| | | return directoryServer.authPasswordStorageSchemes; |
| | | } |
| | |
| | | */ |
| | | public static PasswordStorageScheme getAuthPasswordStorageScheme(String name) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAuthPasswordStorageScheme", |
| | | String.valueOf(name)); |
| | | |
| | | return directoryServer.authPasswordStorageSchemes.get(name); |
| | | } |
| | |
| | | */ |
| | | public static void registerPasswordStorageScheme(PasswordStorageScheme scheme) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerPasswordStorageScheme", |
| | | String.valueOf(scheme)); |
| | | |
| | | String name = toLowerCase(scheme.getStorageSchemeName()); |
| | | directoryServer.passwordStorageSchemes.put(name, scheme); |
| | |
| | | */ |
| | | public static void deregisterPasswordStorageScheme(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterPasswordStorageScheme", |
| | | String.valueOf(lowerName)); |
| | | |
| | | PasswordStorageScheme scheme = |
| | | directoryServer.passwordStorageSchemes.remove(lowerName); |
| | |
| | | */ |
| | | public static ConcurrentHashMap<DN,PasswordValidator> getPasswordValidators() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPasswordValidators"); |
| | | |
| | | return directoryServer.passwordValidators; |
| | | } |
| | |
| | | */ |
| | | public static PasswordValidator getPasswordValidator(DN configEntryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPasswordValidator", |
| | | String.valueOf(configEntryDN)); |
| | | |
| | | return directoryServer.passwordValidators.get(configEntryDN); |
| | | } |
| | |
| | | public static void registerPasswordValidator(DN configEntryDN, |
| | | PasswordValidator validator) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerPasswordValidator", |
| | | String.valueOf(configEntryDN), String.valueOf(validator)); |
| | | |
| | | directoryServer.passwordValidators.put(configEntryDN, validator); |
| | | } |
| | |
| | | */ |
| | | public static void deregisterPasswordValidator(DN configEntryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterPasswordValidator", |
| | | String.valueOf(configEntryDN)); |
| | | |
| | | directoryServer.passwordValidators.remove(configEntryDN); |
| | | } |
| | |
| | | public static ConcurrentHashMap<DN,AccountStatusNotificationHandler> |
| | | getAccountStatusNotificationHandlers() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAccountStatusNotificationHandlers"); |
| | | |
| | | return directoryServer.accountStatusNotificationHandlers; |
| | | } |
| | |
| | | public static AccountStatusNotificationHandler |
| | | getAccountStatusNotificationHandler(DN handlerDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAccountStatusNotificationHandler", |
| | | String.valueOf(handlerDN)); |
| | | |
| | | return directoryServer.accountStatusNotificationHandlers.get(handlerDN); |
| | | } |
| | |
| | | public static void registerAccountStatusNotificationHandler(DN handlerDN, |
| | | AccountStatusNotificationHandler handler) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerAccountStatusNotificationHandler", |
| | | String.valueOf(handlerDN), String.valueOf(handler)); |
| | | |
| | | directoryServer.accountStatusNotificationHandlers.put(handlerDN, handler); |
| | | } |
| | |
| | | */ |
| | | public static void deregisterAccountStatusNotificationHandler(DN handlerDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterAccountStatusNotificationHandler", |
| | | String.valueOf(handlerDN)); |
| | | |
| | | directoryServer.accountStatusNotificationHandlers.remove(handlerDN); |
| | | } |
| | |
| | | */ |
| | | public static ConcurrentHashMap<DN,PasswordGenerator> getPasswordGenerators() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPasswordGenerators"); |
| | | |
| | | return directoryServer.passwordGenerators; |
| | | } |
| | |
| | | */ |
| | | public static PasswordGenerator getPasswordGenerator(DN configEntryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPasswordGenerator", |
| | | String.valueOf(configEntryDN)); |
| | | |
| | | return directoryServer.passwordGenerators.get(configEntryDN); |
| | | } |
| | |
| | | public static void registerPasswordGenerator(DN configEntryDN, |
| | | PasswordGenerator generator) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerPasswordGenerator", |
| | | String.valueOf(configEntryDN), String.valueOf(generator)); |
| | | |
| | | directoryServer.passwordGenerators.put(configEntryDN, generator); |
| | | } |
| | |
| | | */ |
| | | public static void deregisterPasswordGenerator(DN configEntryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterPasswordGenerator", |
| | | String.valueOf(configEntryDN)); |
| | | |
| | | directoryServer.passwordGenerators.remove(configEntryDN); |
| | | } |
| | |
| | | */ |
| | | public static PasswordPolicy[] getPasswordPolicies() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPasswordPolicies"); |
| | | |
| | | // The password policy objects are returned in an array to prevent the |
| | | // caller from modifying the map structure. |
| | |
| | | */ |
| | | public static PasswordPolicy getPasswordPolicy(DN configEntryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPasswordPolicy", |
| | | String.valueOf(configEntryDN)); |
| | | Validator.ensureNotNull(configEntryDN); |
| | | |
| | | PasswordPolicyConfig config |
| | |
| | | public static void registerPasswordPolicy(DN configEntryDN, |
| | | PasswordPolicy policy) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerPasswordPolicy", |
| | | String.valueOf(configEntryDN), String.valueOf(policy)); |
| | | Validator.ensureNotNull(configEntryDN, policy); |
| | | |
| | | PasswordPolicyConfig config = new PasswordPolicyConfig(policy); |
| | |
| | | */ |
| | | public static void deregisterPasswordPolicy(DN configEntryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterPasswordPolicy", |
| | | String.valueOf(configEntryDN)); |
| | | Validator.ensureNotNull(configEntryDN); |
| | | |
| | | if (directoryServer.defaultPasswordPolicyDN.equals(configEntryDN)) |
| | |
| | | */ |
| | | public static DN getDefaultPasswordPolicyDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDefaultPasswordPolicyDN"); |
| | | |
| | | return directoryServer.defaultPasswordPolicyDN; |
| | | } |
| | |
| | | */ |
| | | public static void setDefaultPasswordPolicyDN(DN defaultPasswordPolicyDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setDefaultPasswordPolicyDN", |
| | | String.valueOf(defaultPasswordPolicyDN)); |
| | | |
| | | directoryServer.defaultPasswordPolicyDN = defaultPasswordPolicyDN; |
| | | directoryServer.defaultPasswordPolicyConfig = null; |
| | |
| | | */ |
| | | public static PasswordPolicy getDefaultPasswordPolicy() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getDefaultPasswordPolicy"); |
| | | assert null != directoryServer.passwordPolicies.get( |
| | | directoryServer.defaultPasswordPolicyDN) |
| | | : "Internal Error: no default password policy defined." ; |
| | |
| | | */ |
| | | public static ConcurrentHashMap<String,MonitorProvider> getMonitorProviders() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMonitorProviders"); |
| | | |
| | | return directoryServer.monitorProviders; |
| | | } |
| | |
| | | */ |
| | | public static MonitorProvider getMonitorProvider(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMonitorProvider", |
| | | String.valueOf(lowerName)); |
| | | |
| | | return directoryServer.monitorProviders.get(lowerName); |
| | | } |
| | |
| | | */ |
| | | public static void registerMonitorProvider(MonitorProvider monitorProvider) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerMonitorProvider", |
| | | String.valueOf(monitorProvider)); |
| | | |
| | | String lowerName = toLowerCase(monitorProvider.getMonitorInstanceName()); |
| | | directoryServer.monitorProviders.put(lowerName, monitorProvider); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "registerMonitorProvider", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | public static void deregisterMonitorProvider(String lowerName) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterMonitorProvider", |
| | | String.valueOf(lowerName)); |
| | | |
| | | MonitorProvider provider = |
| | | directoryServer.monitorProviders.remove(toLowerCase(lowerName)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "deregisterMonitorProvider", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | */ |
| | | public static EntryCache getEntryCache() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEntryCache"); |
| | | |
| | | return directoryServer.entryCache; |
| | | } |
| | |
| | | */ |
| | | public static void setEntryCache(EntryCache entryCache) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setEntryCache"); |
| | | |
| | | synchronized (directoryServer) |
| | | { |
| | |
| | | */ |
| | | public static Map<DN,KeyManagerProvider> getKeyManagerProviders() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getKeyManagerProviders"); |
| | | |
| | | return directoryServer.keyManagerProviders; |
| | | } |
| | |
| | | */ |
| | | public static KeyManagerProvider getKeyManagerProvider(DN providerDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getKeyManagerProvider", |
| | | String.valueOf(providerDN)); |
| | | |
| | | return directoryServer.keyManagerProviders.get(providerDN); |
| | | } |
| | |
| | | public static void registerKeyManagerProvider(DN providerDN, |
| | | KeyManagerProvider provider) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerKeyManagerProvider", |
| | | String.valueOf(providerDN), String.valueOf(provider)); |
| | | |
| | | directoryServer.keyManagerProviders.put(providerDN, provider); |
| | | } |
| | |
| | | */ |
| | | public static void deregisterKeyManagerProvider(DN providerDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterKeyManagerProvider", |
| | | String.valueOf(providerDN)); |
| | | |
| | | directoryServer.keyManagerProviders.remove(providerDN); |
| | | } |
| | |
| | | */ |
| | | public static Map<DN,TrustManagerProvider> getTrustManagerProviders() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getTrustManagerProviders"); |
| | | |
| | | return directoryServer.trustManagerProviders; |
| | | } |
| | |
| | | */ |
| | | public static TrustManagerProvider getTrustManagerProvider(DN providerDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getTrustManagerProvider", |
| | | String.valueOf(providerDN)); |
| | | |
| | | return directoryServer.trustManagerProviders.get(providerDN); |
| | | } |
| | |
| | | public static void registerTrustManagerProvider(DN providerDN, |
| | | TrustManagerProvider provider) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerTrustManagerProvider", |
| | | String.valueOf(providerDN), String.valueOf(provider)); |
| | | |
| | | directoryServer.trustManagerProviders.put(providerDN, provider); |
| | | } |
| | |
| | | */ |
| | | public static void deregisterTrustManagerProvider(DN providerDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterTrustManagerProvider", |
| | | String.valueOf(providerDN)); |
| | | |
| | | directoryServer.trustManagerProviders.remove(providerDN); |
| | | } |
| | |
| | | */ |
| | | public static Map<DN,CertificateMapper> getCertificateMappers() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCertificateMappers"); |
| | | |
| | | return directoryServer.certificateMappers; |
| | | } |
| | |
| | | */ |
| | | public static CertificateMapper getCertificateMapper(DN mapperDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCertificateMapper", |
| | | String.valueOf(mapperDN)); |
| | | |
| | | return directoryServer.certificateMappers.get(mapperDN); |
| | | } |
| | |
| | | public static void registerCertificateMapper(DN mapperDN, |
| | | CertificateMapper mapper) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerCertificateMapper", |
| | | String.valueOf(mapperDN), String.valueOf(mapper)); |
| | | |
| | | directoryServer.certificateMappers.put(mapperDN, mapper); |
| | | } |
| | |
| | | */ |
| | | public static void deregisterCertificateMapper(DN mapperDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterCertificateMapper", |
| | | String.valueOf(mapperDN)); |
| | | |
| | | directoryServer.certificateMappers.remove(mapperDN); |
| | | } |
| | |
| | | */ |
| | | public static Set<Privilege> getRootPrivileges() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRootPrivileges"); |
| | | |
| | | return directoryServer.rootDNConfigManager.getRootPrivileges(); |
| | | } |
| | |
| | | */ |
| | | public static CopyOnWriteArraySet<DN> getRootDNs() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRootDNs"); |
| | | |
| | | return directoryServer.rootDNs; |
| | | } |
| | |
| | | */ |
| | | public static boolean isRootDN(DN userDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "isRootDN", String.valueOf(userDN)); |
| | | |
| | | return directoryServer.rootDNs.contains(userDN); |
| | | } |
| | |
| | | */ |
| | | public static void registerRootDN(DN rootDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerRootDN", String.valueOf(rootDN)); |
| | | |
| | | directoryServer.rootDNs.add(rootDN); |
| | | } |
| | |
| | | */ |
| | | public static void deregisterRootDN(DN rootDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterRootDN", String.valueOf(rootDN)); |
| | | |
| | | directoryServer.rootDNs.remove(rootDN); |
| | | } |
| | |
| | | */ |
| | | public static ConcurrentHashMap<DN,DN> getAlternateRootBindDNs() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getAlternateRootBindDNs"); |
| | | |
| | | return directoryServer.alternateRootBindDNs; |
| | | } |
| | |
| | | */ |
| | | public static DN getActualRootBindDN(DN alternateRootBindDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getActualRootBindDN", |
| | | String.valueOf(alternateRootBindDN)); |
| | | |
| | | return directoryServer.alternateRootBindDNs.get(alternateRootBindDN); |
| | | } |
| | |
| | | DN alternateRootBindDN) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerAlternateRootDN", |
| | | String.valueOf(actualRootEntryDN), |
| | | String.valueOf(alternateRootBindDN)); |
| | | |
| | | DN existingRootEntryDN = |
| | | directoryServer.alternateRootBindDNs.putIfAbsent(alternateRootBindDN, |
| | |
| | | */ |
| | | public static DN deregisterAlternateRootBindDN(DN alternateRootBindDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterAlternateRootBindDN", |
| | | String.valueOf(alternateRootBindDN)); |
| | | |
| | | return directoryServer.alternateRootBindDNs.remove(alternateRootBindDN); |
| | | } |
| | |
| | | */ |
| | | public static ResultCode getServerErrorResultCode() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getServerErrorResultCode"); |
| | | |
| | | return directoryServer.serverErrorResultCode; |
| | | } |
| | |
| | | */ |
| | | public static void setServerErrorResultCode(ResultCode serverErrorResultCode) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setServerErrorResultCode", |
| | | String.valueOf(serverErrorResultCode)); |
| | | |
| | | directoryServer.serverErrorResultCode = serverErrorResultCode; |
| | | } |
| | |
| | | */ |
| | | public static boolean addMissingRDNAttributes() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "addMissingRDNAttributes"); |
| | | |
| | | return directoryServer.addMissingRDNAttributes; |
| | | } |
| | |
| | | */ |
| | | public static void setAddMissingRDNAttributes(boolean addMissingRDNAttributes) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setAddMissingRDNAttributes", |
| | | String.valueOf(addMissingRDNAttributes)); |
| | | |
| | | directoryServer.addMissingRDNAttributes = addMissingRDNAttributes; |
| | | } |
| | |
| | | */ |
| | | public static boolean allowAttributeNameExceptions() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "allowAttributeNameExceptions"); |
| | | |
| | | return directoryServer.allowAttributeNameExceptions; |
| | | } |
| | |
| | | public static void setAllowAttributeNameExceptions( |
| | | boolean allowAttributeNameExceptions) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setAllowAttributeNameExceptions", |
| | | String.valueOf(allowAttributeNameExceptions)); |
| | | |
| | | directoryServer.allowAttributeNameExceptions = allowAttributeNameExceptions; |
| | | } |
| | |
| | | */ |
| | | public static boolean checkSchema() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "checkSchema"); |
| | | |
| | | return directoryServer.checkSchema; |
| | | } |
| | |
| | | */ |
| | | public static void setCheckSchema(boolean checkSchema) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setCheckSchema", |
| | | String.valueOf(checkSchema)); |
| | | |
| | | directoryServer.checkSchema = checkSchema; |
| | | } |
| | |
| | | */ |
| | | public static AcceptRejectWarn getSingleStructuralObjectClassPolicy() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSingleStructuralObjectClassPolicy"); |
| | | |
| | | return directoryServer.singleStructuralClassPolicy; |
| | | } |
| | |
| | | public static void setSingleStructuralObjectClassPolicy( |
| | | AcceptRejectWarn singleStructuralClassPolicy) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSingleStructuralObjectClassPolicy"); |
| | | |
| | | directoryServer.singleStructuralClassPolicy = singleStructuralClassPolicy; |
| | | } |
| | |
| | | */ |
| | | public static AcceptRejectWarn getSyntaxEnforcementPolicy() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSyntaxEnforcementPolicy"); |
| | | |
| | | return directoryServer.syntaxEnforcementPolicy; |
| | | } |
| | |
| | | public static void setSyntaxEnforcementPolicy( |
| | | AcceptRejectWarn syntaxEnforcementPolicy) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSyntaxEnforcementPolicy"); |
| | | |
| | | directoryServer.syntaxEnforcementPolicy = syntaxEnforcementPolicy; |
| | | } |
| | |
| | | */ |
| | | public static boolean notifyAbandonedOperations() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "notifyAbandonedOperations"); |
| | | |
| | | return directoryServer.notifyAbandonedOperations; |
| | | } |
| | |
| | | public static void setNotifyAbandonedOperations( |
| | | boolean notifyAbandonedOperations) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setNotifyAbandonedOperations", |
| | | String.valueOf(notifyAbandonedOperations)); |
| | | |
| | | directoryServer.notifyAbandonedOperations = notifyAbandonedOperations; |
| | | } |
| | |
| | | */ |
| | | public static Map<String,Backend> getBackends() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getBackends"); |
| | | |
| | | return directoryServer.backends; |
| | | } |
| | |
| | | */ |
| | | public static Backend getBackend(String backendID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getBackend", String.valueOf(backendID)); |
| | | |
| | | return directoryServer.backends.get(backendID); |
| | | } |
| | |
| | | */ |
| | | public static boolean hasBackend(String backendID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "hasBackend", String.valueOf(backendID)); |
| | | |
| | | return directoryServer.backends.containsKey(backendID); |
| | | } |
| | |
| | | public static void registerBackend(Backend backend) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerBackend", String.valueOf(backend)); |
| | | |
| | | ensureNotNull(backend); |
| | | |
| | |
| | | |
| | | synchronized (directoryServer) |
| | | { |
| | | TreeMap<String,Backend> newBackends = |
| | | new TreeMap<String,Backend>(directoryServer.backends); |
| | | TreeMap<String, Backend> newBackends = |
| | | new TreeMap<String, Backend>(directoryServer.backends); |
| | | if (newBackends.containsKey(backendID)) |
| | | { |
| | | int msgID = MSGID_REGISTER_BACKEND_ALREADY_EXISTS; |
| | | int msgID = MSGID_REGISTER_BACKEND_ALREADY_EXISTS; |
| | | String message = getMessage(msgID, backendID); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message, |
| | | msgID); |
| | |
| | | */ |
| | | public static void deregisterBackend(Backend backend) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterBackend", String.valueOf(backend)); |
| | | |
| | | ensureNotNull(backend); |
| | | |
| | |
| | | */ |
| | | public static Map<DN,Backend> getBaseDNs() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getBaseDNs"); |
| | | |
| | | return directoryServer.baseDNs; |
| | | } |
| | |
| | | */ |
| | | public static Backend getBackendWithBaseDN(DN baseDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getBackendWithBaseDN", |
| | | String.valueOf(baseDN)); |
| | | |
| | | return directoryServer.baseDNs.get(baseDN); |
| | | } |
| | |
| | | */ |
| | | public static Backend getBackend(DN entryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getBackendForEntry", |
| | | String.valueOf(entryDN)); |
| | | |
| | | if (entryDN.isNullDN()) |
| | | { |
| | |
| | | boolean isPrivate, boolean testOnly) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerBaseDN", String.valueOf(baseDN), |
| | | String.valueOf(backend), String.valueOf(isPrivate), |
| | | String.valueOf(testOnly)); |
| | | |
| | | ensureNotNull(baseDN, backend); |
| | | |
| | |
| | | public static void deregisterBaseDN(DN baseDN, boolean testOnly) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterBaseDN", String.valueOf(baseDN)); |
| | | |
| | | ensureNotNull(baseDN); |
| | | |
| | |
| | | */ |
| | | public static Map<DN,Backend> getPublicNamingContexts() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPublicNamingContexts"); |
| | | |
| | | return directoryServer.publicNamingContexts; |
| | | } |
| | |
| | | */ |
| | | public static Map<DN,Backend> getPrivateNamingContexts() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPrivateNamingContexts"); |
| | | |
| | | return directoryServer.privateNamingContexts; |
| | | } |
| | |
| | | */ |
| | | public static boolean isNamingContext(DN dn) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "isNamingContext"); |
| | | |
| | | return (directoryServer.publicNamingContexts.containsKey(dn) || |
| | | directoryServer.privateNamingContexts.containsKey(dn)); |
| | |
| | | */ |
| | | public static Entry getRootDSE() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRootDSE"); |
| | | |
| | | return directoryServer.rootDSEBackend.getRootDSE(); |
| | | } |
| | |
| | | */ |
| | | public static RootDSEBackend getRootDSEBackend() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getRootDSEBackend"); |
| | | |
| | | return directoryServer.rootDSEBackend; |
| | | } |
| | |
| | | */ |
| | | public static DN getSchemaDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSchemaDN"); |
| | | |
| | | return directoryServer.schemaDN; |
| | | } |
| | |
| | | */ |
| | | public static void setSchemaDN(DN schemaDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setSchemaDN", String.valueOf(schemaDN)); |
| | | |
| | | directoryServer.schemaDN = schemaDN; |
| | | } |
| | |
| | | public static Entry getEntry(DN entryDN) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getEntry", String.valueOf(entryDN)); |
| | | |
| | | |
| | | // If the entry is the root DSE, then get and return that. |
| | |
| | | return directoryServer.rootDSEBackend.getRootDSE(); |
| | | } |
| | | |
| | | |
| | | // Figure out which backend should be used for the entry. If it isn't |
| | | // appropriate for any backend, then return null. |
| | | Backend backend = getBackend(entryDN); |
| | |
| | | return null; |
| | | } |
| | | |
| | | |
| | | // Retrieve the requested entry from the backend. |
| | | return backend.getEntry(entryDN); |
| | | } |
| | |
| | | public static boolean entryExists(DN entryDN) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "entryExists", String.valueOf(entryDN)); |
| | | |
| | | |
| | | // If the entry is the root DSE, then it will always exist. |
| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | // Figure out which backend should be used for the entry. If it isn't |
| | | // appropriate for any backend, then return false. |
| | | Backend backend = getBackend(entryDN); |
| | |
| | | return false; |
| | | } |
| | | |
| | | |
| | | // Ask the appropriate backend if the entry exists. |
| | | return backend.entryExists(entryDN); |
| | | } |
| | |
| | | */ |
| | | public static TreeSet<String> getSupportedControls() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSupportedControls"); |
| | | |
| | | return directoryServer.supportedControls; |
| | | } |
| | |
| | | */ |
| | | public static boolean isSupportedControl(String controlOID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "isSupportedControl", |
| | | String.valueOf(controlOID)); |
| | | |
| | | return directoryServer.supportedControls.contains(controlOID); |
| | | } |
| | |
| | | */ |
| | | public static void registerSupportedControl(String controlOID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerSupportedControl", |
| | | String.valueOf(controlOID)); |
| | | |
| | | synchronized (directoryServer.supportedControls) |
| | | { |
| | |
| | | */ |
| | | public static void deregisterSupportedControl(String controlOID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterSupportedControl", |
| | | String.valueOf(controlOID)); |
| | | |
| | | synchronized (directoryServer.supportedControls) |
| | | { |
| | |
| | | */ |
| | | public static TreeSet<String> getSupportedFeatures() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSupportedFeatures"); |
| | | |
| | | return directoryServer.supportedFeatures; |
| | | } |
| | |
| | | */ |
| | | public static boolean isSupportedFeature(String featureOID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "isSupportedFeature", |
| | | String.valueOf(featureOID)); |
| | | |
| | | return directoryServer.supportedFeatures.contains(featureOID); |
| | | } |
| | |
| | | */ |
| | | public static void registerSupportedFeature(String featureOID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerSupportedFeature", |
| | | String.valueOf(featureOID)); |
| | | |
| | | synchronized (directoryServer.supportedFeatures) |
| | | { |
| | |
| | | */ |
| | | public static void deregisterSupportedFeature(String featureOID) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterSupportedFeature", |
| | | String.valueOf(featureOID)); |
| | | |
| | | synchronized (directoryServer.supportedFeatures) |
| | | { |
| | |
| | | public static ConcurrentHashMap<String,ExtendedOperationHandler> |
| | | getSupportedExtensions() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSupportedExtensions"); |
| | | |
| | | return directoryServer.extendedOperationHandlers; |
| | | } |
| | |
| | | */ |
| | | public static ExtendedOperationHandler getExtendedOperationHandler(String oid) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getExtendedOperationHandler", |
| | | String.valueOf(oid)); |
| | | |
| | | return directoryServer.extendedOperationHandlers.get(oid); |
| | | } |
| | |
| | | public static void registerSupportedExtension(String oid, |
| | | ExtendedOperationHandler handler) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerSupportedExtension", |
| | | String.valueOf(oid), String.valueOf(handler)); |
| | | |
| | | directoryServer.extendedOperationHandlers.put(toLowerCase(oid), handler); |
| | | } |
| | |
| | | */ |
| | | public static void deregisterSupportedExtension(String oid) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterSupportedExtension", |
| | | String.valueOf(oid)); |
| | | |
| | | directoryServer.extendedOperationHandlers.remove(toLowerCase(oid)); |
| | | } |
| | |
| | | public static ConcurrentHashMap<String,SASLMechanismHandler> |
| | | getSupportedSASLMechanisms() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSupportedSASLMechanisms"); |
| | | |
| | | return directoryServer.saslMechanismHandlers; |
| | | } |
| | |
| | | */ |
| | | public static SASLMechanismHandler getSASLMechanismHandler(String name) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSASLMechanismHandler", |
| | | String.valueOf(name)); |
| | | |
| | | return directoryServer.saslMechanismHandlers.get(name); |
| | | } |
| | |
| | | public static void registerSASLMechanismHandler(String name, |
| | | SASLMechanismHandler handler) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerSASLMechanismHandler", |
| | | String.valueOf(name), String.valueOf(handler)); |
| | | |
| | | // FIXME -- Should we force this name to be lowercase? If so, then will |
| | | // that cause the lower name to be used in the root DSE? |
| | |
| | | */ |
| | | public static void deregisterSASLMechanismHandler(String name) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterSASLMechanismHandler", |
| | | String.valueOf(name)); |
| | | |
| | | // FIXME -- Should we force this name to be lowercase? |
| | | directoryServer.saslMechanismHandlers.remove(name); |
| | |
| | | */ |
| | | public static ConcurrentHashMap<DN,IdentityMapper> getIdentityMappers() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getIdentityMappers"); |
| | | |
| | | return directoryServer.identityMappers; |
| | | } |
| | |
| | | */ |
| | | public static IdentityMapper getIdentityMapper(DN configEntryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getIdentityMapper", |
| | | String.valueOf(configEntryDN)); |
| | | |
| | | return directoryServer.identityMappers.get(configEntryDN); |
| | | } |
| | |
| | | public static void registerIdentityMapper(DN configEntryDN, |
| | | IdentityMapper identityMapper) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerIdentityMapper", |
| | | String.valueOf(configEntryDN), |
| | | String.valueOf(identityMapper)); |
| | | |
| | | directoryServer.identityMappers.put(configEntryDN, identityMapper); |
| | | } |
| | |
| | | */ |
| | | public static void deregisterIdentityMapper(DN configEntryDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterIdentityMapper", |
| | | String.valueOf(configEntryDN)); |
| | | |
| | | directoryServer.identityMappers.remove(configEntryDN); |
| | | } |
| | |
| | | */ |
| | | public static DN getProxiedAuthorizationIdentityMapperDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProxiedAuthorizationIdentityMapperDN"); |
| | | |
| | | return directoryServer.proxiedAuthorizationIdentityMapperDN; |
| | | } |
| | |
| | | public static void setProxiedAuthorizationIdentityMapperDN( |
| | | DN proxiedAuthorizationIdentityMapperDN) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setProxiedAuthorizationIdentityMapperDN", |
| | | String.valueOf(proxiedAuthorizationIdentityMapperDN)); |
| | | |
| | | directoryServer.proxiedAuthorizationIdentityMapperDN = |
| | | proxiedAuthorizationIdentityMapperDN; |
| | |
| | | */ |
| | | public static IdentityMapper getProxiedAuthorizationIdentityMapper() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getProxiedAuthorizationIdentityMapper"); |
| | | |
| | | if (directoryServer.proxiedAuthorizationIdentityMapperDN == null) |
| | | { |
| | |
| | | */ |
| | | public static CopyOnWriteArrayList<ConnectionHandler> getConnectionHandlers() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getConnectionHandlers"); |
| | | |
| | | return directoryServer.connectionHandlers; |
| | | } |
| | |
| | | */ |
| | | public static void registerConnectionHandler(ConnectionHandler handler) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerConnectionHandler", |
| | | String.valueOf(handler)); |
| | | |
| | | synchronized (directoryServer.connectionHandlers) |
| | | { |
| | |
| | | */ |
| | | public static void deregisterConnectionHandler(ConnectionHandler handler) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterConnectionHandler", |
| | | String.valueOf(handler)); |
| | | |
| | | synchronized (directoryServer.connectionHandlers) |
| | | { |
| | |
| | | private void initializeWorkQueue() |
| | | throws ConfigException, InitializationException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "initializeWorkQueue"); |
| | | |
| | | DN configEntryDN; |
| | | try |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "initializeWorkQueue", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_WORKQ_CANNOT_PARSE_DN; |
| | | String message = getMessage(msgID, DN_WORK_QUEUE_CONFIG, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "initializeWorkQueue", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_WORKQ_CANNOT_LOAD; |
| | | String message = getMessage(msgID, classAttr.activeValue(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "initializeWorkQueue", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_WORKQ_CANNOT_INSTANTIATE; |
| | | String message = getMessage(msgID, classAttr.activeValue(), |
| | |
| | | */ |
| | | public static WorkQueue getWorkQueue() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getWorkQueue"); |
| | | |
| | | return directoryServer.workQueue; |
| | | } |
| | |
| | | public static void enqueueRequest(Operation operation) |
| | | throws DirectoryException |
| | | { |
| | | assert debugEnter(CLASS_NAME, "enqueueRequest", String.valueOf(operation)); |
| | | |
| | | |
| | | // See if a bind is already in progress on the associated connection. If so |
| | |
| | | public static CopyOnWriteArrayList<ChangeNotificationListener> |
| | | getChangeNotificationListeners() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getChangeNotificationListeners"); |
| | | |
| | | return directoryServer.changeNotificationListeners; |
| | | } |
| | |
| | | public static void registerChangeNotificationListener( |
| | | ChangeNotificationListener changeListener) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerChangeNotificationListener", |
| | | String.valueOf(changeListener)); |
| | | |
| | | directoryServer.changeNotificationListeners.add(changeListener); |
| | | } |
| | |
| | | public static void deregisterChangeNotificationListener( |
| | | ChangeNotificationListener changeListener) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterChangeNotificationListener", |
| | | String.valueOf(changeListener)); |
| | | |
| | | directoryServer.changeNotificationListeners.remove(changeListener); |
| | | } |
| | |
| | | */ |
| | | public static CopyOnWriteArrayList<PersistentSearch> getPersistentSearches() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getPersistentSearches"); |
| | | |
| | | return directoryServer.persistentSearches; |
| | | } |
| | |
| | | */ |
| | | public static void registerPersistentSearch(PersistentSearch persistentSearch) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerPersistentSearch", |
| | | String.valueOf(persistentSearch)); |
| | | |
| | | directoryServer.persistentSearches.add(persistentSearch); |
| | | persistentSearch.getSearchOperation().getClientConnection(). |
| | |
| | | public static void deregisterPersistentSearch(PersistentSearch |
| | | persistentSearch) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterPersistentSearch", |
| | | String.valueOf(persistentSearch)); |
| | | |
| | | directoryServer.persistentSearches.remove(persistentSearch); |
| | | persistentSearch.getSearchOperation().getClientConnection(). |
| | |
| | | public static CopyOnWriteArrayList<SynchronizationProvider> |
| | | getSynchronizationProviders() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSynchronizationProviders"); |
| | | |
| | | return directoryServer.synchronizationProviders; |
| | | } |
| | |
| | | public static void registerSynchronizationProvider(SynchronizationProvider |
| | | provider) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerSynchronizationProvider", |
| | | String.valueOf(provider)); |
| | | |
| | | directoryServer.synchronizationProviders.add(provider); |
| | | } |
| | |
| | | public static void deregisterSynchronizationProvider(SynchronizationProvider |
| | | provider) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterSynchronizationProvider", |
| | | String.valueOf(provider)); |
| | | |
| | | directoryServer.synchronizationProviders.remove(provider); |
| | | } |
| | |
| | | */ |
| | | public static void registerShutdownListener(ServerShutdownListener listener) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "registerShutdownListener", |
| | | String.valueOf(listener)); |
| | | |
| | | directoryServer.shutdownListeners.add(listener); |
| | | } |
| | |
| | | */ |
| | | public static void deregisterShutdownListener(ServerShutdownListener listener) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "deregisterShutdownListener", |
| | | String.valueOf(listener)); |
| | | |
| | | directoryServer.shutdownListeners.remove(listener); |
| | | } |
| | |
| | | */ |
| | | public static void shutDown(String className, String reason) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "shutDown", String.valueOf(className), |
| | | String.valueOf(reason)); |
| | | |
| | | synchronized (directoryServer) |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "shutDown", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | directoryServer.connectionHandlers.clear(); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "shutDown", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "shutDown", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "shutDown", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "shutDown", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "shutDown", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e2) |
| | | { |
| | | assert debugException(CLASS_NAME, "applyConfigurationChange", e2); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e2); |
| | | } |
| | | |
| | | msgID = MSGID_SHUTDOWN_CANNOT_RELEASE_SHARED_BACKEND_LOCK; |
| | | msgID = MSGID_SHUTDOWN_CANNOT_RELEASE_SHARED_BACKEND_LOCK; |
| | | message = getMessage(msgID, backend.getBackendID(), |
| | | stackTraceToSingleLineString(e2)); |
| | | logError(ErrorLogCategory.CONFIGURATION, |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "shutDown", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "shutDown", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "startServer", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | msgID = MSGID_CANNOT_RELEASE_EXCLUSIVE_SERVER_LOCK; |
| | | message = getMessage(msgID, lockFile, stackTraceToSingleLineString(e)); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "shutDown", e); |
| | | } |
| | | |
| | | |
| | | // Shutdown all debug loggers. |
| | | try |
| | | { |
| | | removeAllDebugLoggers(true); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | e.printStackTrace(); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | public static void restart(String className, String reason) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "restart", String.valueOf(className), |
| | | String.valueOf(reason)); |
| | | |
| | | try |
| | | { |
| | |
| | | */ |
| | | public static long getMaxAllowedConnections() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMaxAllowedConnections"); |
| | | |
| | | return directoryServer.maxAllowedConnections; |
| | | } |
| | |
| | | */ |
| | | public static void setMaxAllowedConnections(long maxAllowedConnections) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setMaxAllowedConnections", |
| | | String.valueOf(maxAllowedConnections)); |
| | | |
| | | if (maxAllowedConnections > 0) |
| | | { |
| | |
| | | */ |
| | | public static long newConnectionAccepted(ClientConnection clientConnection) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "newConnectionAccepted", |
| | | String.valueOf(clientConnection)); |
| | | |
| | | synchronized (directoryServer.establishedConnections) |
| | | { |
| | |
| | | */ |
| | | public static void connectionClosed(ClientConnection clientConnection) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "connectionClosed", |
| | | String.valueOf(clientConnection)); |
| | | |
| | | synchronized (directoryServer.establishedConnections) |
| | | { |
| | |
| | | */ |
| | | public static long getCurrentConnections() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getCurrentConnections"); |
| | | |
| | | return directoryServer.currentConnections; |
| | | } |
| | |
| | | */ |
| | | public static long getMaxConnections() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getMaxConnections"); |
| | | |
| | | return directoryServer.maxConnections; |
| | | } |
| | |
| | | */ |
| | | public static long getTotalConnections() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getTotalConnections"); |
| | | |
| | | return directoryServer.totalConnections; |
| | | } |
| | |
| | | */ |
| | | public static int getSizeLimit() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getSizeLimit"); |
| | | |
| | | return directoryServer.sizeLimit; |
| | | } |
| | |
| | | */ |
| | | public static void setSizeLimit(int sizeLimit) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setSizeLimit", String.valueOf(sizeLimit)); |
| | | |
| | | directoryServer.sizeLimit = sizeLimit; |
| | | } |
| | |
| | | */ |
| | | public static int getLookthroughLimit() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getLookthroughLimit"); |
| | | |
| | | return directoryServer.lookthroughLimit; |
| | | } |
| | |
| | | */ |
| | | public static void setLookthroughLimit(int lookthroughLimit) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setLookthroughLimit", |
| | | String.valueOf(lookthroughLimit)); |
| | | |
| | | directoryServer.lookthroughLimit = lookthroughLimit; |
| | | } |
| | |
| | | */ |
| | | public static int getTimeLimit() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getTimeLimit"); |
| | | |
| | | return directoryServer.timeLimit; |
| | | } |
| | |
| | | */ |
| | | public static void setTimeLimit(int timeLimit) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setTimeLimit", String.valueOf(timeLimit)); |
| | | |
| | | directoryServer.timeLimit = timeLimit; |
| | | } |
| | |
| | | */ |
| | | public static WritabilityMode getWritabilityMode() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getWritabilityMode"); |
| | | |
| | | return directoryServer.writabilityMode; |
| | | } |
| | |
| | | */ |
| | | public static void setWritabilityMode(WritabilityMode writabilityMode) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setWritabilityMode", |
| | | String.valueOf(writabilityMode)); |
| | | |
| | | directoryServer.writabilityMode = writabilityMode; |
| | | } |
| | |
| | | */ |
| | | public static boolean bindWithDNRequiresPassword() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "bindWithDNRequiresPassword"); |
| | | |
| | | return directoryServer.bindWithDNRequiresPassword; |
| | | } |
| | |
| | | public static void setBindWithDNRequiresPassword(boolean |
| | | bindWithDNRequiresPassword) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "setBindWithDNRequiresPassword", |
| | | String.valueOf(bindWithDNRequiresPassword)); |
| | | |
| | | directoryServer.bindWithDNRequiresPassword = bindWithDNRequiresPassword; |
| | | } |
| | |
| | | */ |
| | | public static boolean rejectUnauthenticatedRequests() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "rejectUnauthenticatedRequests"); |
| | | |
| | | return directoryServer.rejectUnauthenticatedRequests; |
| | | } |
| | |
| | | public static void setRejectUnauthenticatedRequests(boolean |
| | | rejectUnauthenticatedRequests) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "rejectUnauthenticatedRequests", |
| | | String.valueOf(rejectUnauthenticatedRequests)); |
| | | |
| | | directoryServer.rejectUnauthenticatedRequests = |
| | | rejectUnauthenticatedRequests; |
| | |
| | | */ |
| | | public DN getComponentEntryDN() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getComponentEntryDN"); |
| | | |
| | | try |
| | | { |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "getComponentEntryDN", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | // This could theoretically happen if an alert needs to be sent before the |
| | | // configuration is initialized. In that case, just return an empty DN. |
| | |
| | | */ |
| | | public String getClassName() |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getClassName"); |
| | | |
| | | return CLASS_NAME; |
| | | } |
| | |
| | | */ |
| | | public void uncaughtException(Thread thread, Throwable exception) |
| | | { |
| | | assert debugEnter(CLASS_NAME, "uncaughtException", |
| | | String.valueOf(thread), String.valueOf(exception)); |
| | | |
| | | assert debugException(CLASS_NAME, "uncaughtException", exception); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, exception); |
| | | } |
| | | |
| | | int msgID = MSGID_UNCAUGHT_THREAD_EXCEPTION; |
| | | String message = getMessage(msgID, thread.getName(), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | assert debugException(CLASS_NAME, "startServer", e); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, e); |
| | | } |
| | | |
| | | int msgID = MSGID_CANNOT_ACQUIRE_EXCLUSIVE_SERVER_LOCK; |
| | | String message = getMessage(msgID, lockFile, |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | assert debugException(CLASS_NAME, "main", ie); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | int msgID = MSGID_DSCORE_CANNOT_BOOTSTRAP; |
| | | String message = getMessage(msgID, ie.getMessage()); |
| | |
| | | } |
| | | catch (InitializationException ie) |
| | | { |
| | | assert debugException(CLASS_NAME, "main", ie); |
| | | if (debugEnabled()) |
| | | { |
| | | debugCought(DebugLogLevel.ERROR, ie); |
| | | } |
| | | |
| | | int msgID = MSGID_DSCORE_CANNOT_START; |
| | | String message = getMessage(msgID, ie.getMessage()); |