| | |
| | | import static org.opends.messages.ToolMessages.*; |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.schema.SchemaConstants.*; |
| | | import static org.opends.server.tools.ConfigureWindowsService.*; |
| | | import static org.opends.server.util.CollectionUtils.*; |
| | | import static org.opends.server.util.DynamicConstants.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | |
| | | import org.opends.server.schema.SchemaUpdater; |
| | | import org.opends.server.schema.TelephoneNumberEqualityMatchingRuleFactory; |
| | | import org.opends.server.schema.TelephoneNumberSubstringMatchingRuleFactory; |
| | | import org.opends.server.tools.ConfigureWindowsService; |
| | | import org.opends.server.types.AcceptRejectWarn; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.BackupConfig; |
| | |
| | | /** The singleton Directory Server instance. */ |
| | | private static DirectoryServer directoryServer = new DirectoryServer(); |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the server currently holds an exclusive lock on the |
| | | * server lock file. |
| | | */ |
| | | /** Indicates whether the server currently holds an exclusive lock on the server lock file. */ |
| | | private static boolean serverLocked; |
| | | |
| | | /** |
| | | * The message to be displayed on the command-line when the user asks for the |
| | | * usage. |
| | | */ |
| | | /** The message to be displayed on the command-line when the user asks for the usage. */ |
| | | private static LocalizableMessage toolDescription = INFO_DSCORE_TOOL_DESCRIPTION.get(); |
| | | |
| | | /** |
| | |
| | | private static final int START_AS_NON_DETACH = 100; |
| | | /** The server must be started as a window service. */ |
| | | private static final int START_AS_WINDOWS_SERVICE = 101; |
| | | /** |
| | | * The server must be started as detached and it is being called from the |
| | | * Windows Service. |
| | | */ |
| | | /** The server must be started as detached and it is being called from the Windows Service. */ |
| | | private static final int START_AS_DETACH_CALLED_FROM_WINDOWS_SERVICE = 102; |
| | | /** |
| | | * The server must be started as detached process and should not produce any |
| | | * output. |
| | | */ |
| | | /** The server must be started as detached process and should not produce any output. */ |
| | | private static final int START_AS_DETACH_QUIET = 103; |
| | | /** |
| | | * The server must be started as non-detached process and should not produce |
| | | * any output. |
| | | */ |
| | | /** The server must be started as non-detached process and should not produce any output. */ |
| | | private static final int START_AS_NON_DETACH_QUIET = 104; |
| | | |
| | | /** Temporary context object, to provide instance methods instead of static methods. */ |
| | |
| | | */ |
| | | private boolean allowAttributeNameExceptions; |
| | | |
| | | /** |
| | | * Indicates whether a simple bind request containing a DN must also provide a |
| | | * password. |
| | | */ |
| | | /** Indicates whether a simple bind request containing a DN must also provide a password. */ |
| | | private boolean bindWithDNRequiresPassword; |
| | | |
| | | /** |
| | | * Indicates whether the Directory Server should perform schema checking for |
| | | * update operations. |
| | | */ |
| | | /** Indicates whether the Directory Server should perform schema checking for update operations. */ |
| | | private boolean checkSchema; |
| | | |
| | | /** Indicates whether the server has been bootstrapped. */ |
| | |
| | | /** Indicates whether the server is currently in "lockdown mode". */ |
| | | private boolean lockdownMode; |
| | | |
| | | /** |
| | | * Indicates whether the server should send a response to operations that have |
| | | * been abandoned. |
| | | */ |
| | | /** Indicates whether the server should send a response to operations that have been abandoned. */ |
| | | private boolean notifyAbandonedOperations; |
| | | |
| | | /** |
| | | * Indicates whether to save a copy of the configuration on successful |
| | | * startup. |
| | | */ |
| | | /** Indicates whether to save a copy of the configuration on successful startup. */ |
| | | private boolean saveConfigOnSuccessfulStartup; |
| | | |
| | | /** |
| | | * Indicates whether the server is currently in the process of shutting down. |
| | | */ |
| | | /** Indicates whether the server is currently in the process of shutting down. */ |
| | | private boolean shuttingDown; |
| | | |
| | | /** Indicates whether the server should reject unauthenticated requests. */ |
| | | private boolean rejectUnauthenticatedRequests; |
| | | |
| | | /** |
| | | * Indicates whether bind responses should include failure reason messages. |
| | | */ |
| | | /** Indicates whether bind responses should include failure reason messages. */ |
| | | private boolean returnBindErrorMessages; |
| | | |
| | | /** The configuration manager that will handle the certificate mapper. */ |
| | |
| | | private List<InitializationCompletedListener> |
| | | initializationCompletedListeners; |
| | | |
| | | /** |
| | | * The set of shutdown listeners that have been registered with the Directory |
| | | * Server. |
| | | */ |
| | | /** The set of shutdown listeners that have been registered with the Directory Server. */ |
| | | private List<ServerShutdownListener> shutdownListeners; |
| | | |
| | | /** |
| | | * The set of synchronization providers that have been registered with the |
| | | * Directory Server. |
| | | */ |
| | | private List<SynchronizationProvider<SynchronizationProviderCfg>> |
| | | synchronizationProviders; |
| | | |
| | | /** |
| | | * The set of backend initialization listeners registered with the Directory |
| | | * Server. |
| | | */ |
| | | private Set<BackendInitializationListener> |
| | | backendInitializationListeners; |
| | | /** The set of synchronization providers that have been registered with the Directory Server. */ |
| | | private List<SynchronizationProvider<SynchronizationProviderCfg>> synchronizationProviders; |
| | | /** The set of backend initialization listeners registered with the Directory Server. */ |
| | | private Set<BackendInitializationListener> backendInitializationListeners; |
| | | |
| | | /** The set of root DNs registered with the Directory Server. */ |
| | | private Set<DN> rootDNs; |
| | |
| | | * unless overridden on a per-user basis. |
| | | */ |
| | | private int timeLimit; |
| | | |
| | | /** |
| | | * The maximum number of candidates that should be check for matches during a |
| | | * search. |
| | | */ |
| | | /** The maximum number of candidates that should be check for matches during a search. */ |
| | | private int lookthroughLimit; |
| | | |
| | | /** The current active persistent searches. */ |
| | |
| | | /** The maximum number of concurrent persistent searches. */ |
| | | private int maxPSearches; |
| | | |
| | | /** |
| | | * Whether to use collect operation processing times in nanosecond resolution. |
| | | */ |
| | | /** Whether to use collect operation processing times in nanosecond resolution. */ |
| | | private boolean useNanoTime; |
| | | |
| | | /** |
| | | * The key manager provider configuration manager for the Directory Server. |
| | | */ |
| | | /** The key manager provider configuration manager for the Directory Server. */ |
| | | private KeyManagerProviderConfigManager keyManagerProviderConfigManager; |
| | | |
| | | /** The set of connections that are currently established. */ |
| | |
| | | |
| | | /** The number of connections currently established to the server. */ |
| | | private long currentConnections; |
| | | |
| | | /** The idle time limit for the server. */ |
| | | private long idleTimeLimit; |
| | | |
| | | /** |
| | | * The maximum number of connections that will be allowed at any given time. |
| | | */ |
| | | /** The maximum number of connections that will be allowed at any given time. */ |
| | | private long maxAllowedConnections; |
| | | |
| | | /** The maximum number of connections established at one time. */ |
| | | private long maxConnections; |
| | | |
| | |
| | | |
| | | /** The configuration handler used to manage the password generators. */ |
| | | private PasswordGeneratorConfigManager passwordGeneratorConfigManager; |
| | | |
| | | /** The default password policy for the Directory Server. */ |
| | | private PasswordPolicy defaultPasswordPolicy; |
| | | |
| | | /** The configuration handler used to manage the authentication policies. */ |
| | | private PasswordPolicyConfigManager authenticationPolicyConfigManager; |
| | | |
| | | /** The configuration handler used to manage the password storage schemes. */ |
| | | private PasswordStorageSchemeConfigManager storageSchemeConfigManager; |
| | | |
| | | /** The configuration handler used to manage the password validators. */ |
| | | private PasswordValidatorConfigManager passwordValidatorConfigManager; |
| | | |
| | |
| | | |
| | | /** The special backend used for the Directory Server root DSE. */ |
| | | private RootDSEBackend rootDSEBackend; |
| | | |
| | | /** The root DN config manager for the server. */ |
| | | private RootDNConfigManager rootDNConfigManager; |
| | | |
| | |
| | | /** The time that the server was started, formatted in UTC time. */ |
| | | private String startTimeUTC; |
| | | |
| | | /** |
| | | * The synchronization provider configuration manager for the Directory |
| | | * Server. |
| | | */ |
| | | private SynchronizationProviderConfigManager |
| | | synchronizationProviderConfigManager; |
| | | /** The synchronization provider configuration manager for the Directory Server. */ |
| | | private SynchronizationProviderConfigManager synchronizationProviderConfigManager; |
| | | |
| | | /** Registry for base DN and naming context information. */ |
| | | private BaseDnRegistry baseDnRegistry; |
| | | |
| | | |
| | | /** The set of backends registered with the server. */ |
| | | private TreeMap<String, Backend<?>> backends; |
| | | |
| | |
| | | /** The writability mode for the Directory Server. */ |
| | | private WritabilityMode writabilityMode; |
| | | |
| | | /** The memory reservation system */ |
| | | /** The memory reservation system. */ |
| | | private MemoryQuota memoryQuota; |
| | | |
| | | /** The Disk Space Monitor */ |
| | | /** The Disk Space Monitor. */ |
| | | private DiskSpaceMonitor diskSpaceMonitor; |
| | | |
| | | /** The lock manager which will be used for coordinating access to LDAP entries */ |
| | | /** The lock manager which will be used for coordinating access to LDAP entries. */ |
| | | private final LockManager lockManager = new LockManager(); |
| | | |
| | | /** |
| | | * The maximum size that internal buffers will be allowed to grow to until |
| | | * they are trimmed. |
| | | */ |
| | | /** The maximum size that internal buffers will be allowed to grow to until they are trimmed. */ |
| | | private int maxInternalBufferSize = DEFAULT_MAX_INTERNAL_BUFFER_SIZE; |
| | | |
| | | /** |
| | | * The default timeout used to start the server in detach mode. |
| | | */ |
| | | /** The default timeout used to start the server in detach mode. */ |
| | | public static final int DEFAULT_TIMEOUT = 200; |
| | | |
| | | /** Entry point for server configuration. */ |
| | | private org.forgerock.opendj.config.server.ServerManagementContext serverManagementContext; |
| | | |
| | | /** |
| | | * Class that prints the version of OpenDJ server to System.out. |
| | | */ |
| | | /** Class that prints the version of OpenDJ server to System.out. */ |
| | | public static final class DirectoryServerVersionHandler implements VersionHandler |
| | | { |
| | | /** {@inheritDoc} */ |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of the Directory Server. This will allow only a |
| | | * single instance of the server per JVM. |
| | |
| | | diskSpaceMonitor = new DiskSpaceMonitor(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the instance of the Directory Server that is associated with this |
| | | * JVM. |
| | |
| | | return directoryServer; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Creates a new instance of the Directory Server and replaces the static |
| | | * reference to it. This should only be used in the context of an in-core |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the environment configuration for the Directory Server. |
| | | * |
| | |
| | | return directoryServer.environmentConfig; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sets the environment configuration for the Directory Server. This method |
| | | * may only be invoked when the server is not running. |
| | |
| | | return directoryServer.isRunning; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Bootstraps the appropriate Directory Server structures that may be needed |
| | | * by both server and client-side tools. |
| | |
| | | // processing. |
| | | directoryServer.syntaxEnforcementPolicy = AcceptRejectWarn.REJECT; |
| | | |
| | | |
| | | // Create the server schema and initialize and register a minimal set of |
| | | // matching rules and attribute syntaxes. |
| | | directoryServer.schema = new Schema(); |
| | |
| | | directoryServer.bootstrapMatchingRules(); |
| | | directoryServer.bootstrapAttributeSyntaxes(); |
| | | |
| | | |
| | | // Perform any additional initialization that might be necessary before |
| | | // loading the configuration. |
| | | directoryServer.alertHandlers = new CopyOnWriteArrayList<>(); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Bootstraps the Directory Server by initializing all the necessary |
| | | * structures that should be in place before the configuration may be read. |
| | |
| | | shuttingDown = false; |
| | | } |
| | | |
| | | |
| | | // Add a shutdown hook so that the server can be notified when the JVM |
| | | // starts shutting down. |
| | | shutdownHook = new DirectoryServerShutdownHook(); |
| | | Runtime.getRuntime().addShutdownHook(shutdownHook); |
| | | |
| | | |
| | | // Create the MBean server that we will use for JMX interaction. |
| | | initializeJMX(); |
| | | |
| | | |
| | | logger.debug(INFO_DIRECTORY_BOOTSTRAPPING); |
| | | |
| | | |
| | | // Perform all the bootstrapping that is shared with the client-side |
| | | // processing. |
| | | // Perform all the bootstrapping that is shared with the client-side processing. |
| | | bootstrapClient(); |
| | | |
| | | |
| | | // Initialize the variables that will be used for connection tracking. |
| | | establishedConnections = new LinkedHashSet<>(1000); |
| | | currentConnections = 0; |
| | | maxConnections = 0; |
| | | totalConnections = 0; |
| | | |
| | | |
| | | // Create the plugin config manager, but don't initialize it yet. This will |
| | | // make it possible to process internal operations before the plugins have |
| | | // been loaded. |
| | | pluginConfigManager = new PluginConfigManager(serverContext); |
| | | |
| | | // If we have gotten here, then the configuration should be properly |
| | | // bootstrapped. |
| | | // If we have gotten here, then the configuration should be properly bootstrapped. |
| | | synchronized (directoryServer) |
| | | { |
| | | isBootstrapped = true; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Performs a minimal set of JMX initialization. This may be used by the core |
| | | * Directory Server or by command-line tools. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Instantiates the configuration handler and loads the Directory Server |
| | | * configuration. |
| | |
| | | //configBackend.initializeConfigBackend(serverContext, configurationHandler); |
| | | } |
| | | |
| | | /** |
| | | * Initialize the schema of this server. |
| | | */ |
| | | /** Initialize the schema of this server. */ |
| | | @ActivateOnceSDKSchemaIsUsed |
| | | private void initializeSchemaNG() throws InitializationException |
| | | { |
| | |
| | | throw new InitializationException(message, e); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // Perform the handler-specific initialization. |
| | | try |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the path to the configuration file used to initialize the |
| | | * Directory Server. |
| | |
| | | return directoryServer.configFile.getAbsolutePath(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Starts up the Directory Server. It must have already been bootstrapped |
| | | * and cannot be running. |
| | |
| | | throw new InitializationException(message); |
| | | } |
| | | |
| | | |
| | | logger.info(NOTE_DIRECTORY_SERVER_STARTING, getVersionString(), BUILD_ID, REVISION_NUMBER); |
| | | |
| | | // Acquire an exclusive lock for the Directory Server process. |
| | |
| | | new IdleTimeLimitThread().start(); |
| | | } |
| | | |
| | | |
| | | // Synchronization of ADS with the crypto manager. |
| | | new CryptoManagerSync(); |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers a basic set of attribute syntaxes with the server that should |
| | | * always be available regardless of the server configuration and may be |
| | |
| | | return directoryServer.authenticatedUsers; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Initializes the crypto manager for the Directory Server. |
| | | * |
| | |
| | | cryptoManager = new CryptoManagerImpl(serverContext, cryptoManagerCfg); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a reference to the Directory Server crypto manager. |
| | | * |
| | |
| | | return directoryServer.cryptoManager; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the Directory Server is configured with information about |
| | | * one or more mail servers and may therefore be used to send e-mail messages. |
| | |
| | | && !directoryServer.mailServerPropertySets.isEmpty(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the set of mail server properties that should be used for SMTP |
| | | * communication. |
| | |
| | | directoryServer.mailServerPropertySets = mailServerPropertySets; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the sets of information about the mail servers configured for use |
| | | * by the Directory Server. |
| | |
| | | return directoryServer.mailServerPropertySets; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Initializes the schema elements for the Directory Server, including the |
| | | * matching rules, attribute syntaxes, attribute types, and object classes. |
| | |
| | | configClass, configFile, e.getLocalizedMessage())); |
| | | } |
| | | |
| | | |
| | | // Re-register all of the change listeners with the configuration. |
| | | for (String dnStr : addListeners.keySet()) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default compressed schema manager for the Directory Server. |
| | | * |
| | |
| | | return directoryServer.compressedSchema; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Gets all of the add, delete, and change listeners from the provided |
| | | * configuration entry and all of its descendants and puts them in the |
| | |
| | | return directoryServer.backendInitializationListeners; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided backend initialization listener with the Directory |
| | | * Server. |
| | |
| | | directoryServer.backendInitializationListeners.add(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided backend initialization listener with the Directory |
| | | * Server. |
| | |
| | | directoryServer.backendInitializationListeners.remove(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Initializes the set of backends defined in the Directory Server. |
| | | * |
| | |
| | | backendConfigManager = new BackendConfigManager(serverContext); |
| | | backendConfigManager.initializeBackendConfig(); |
| | | |
| | | |
| | | // Make sure to initialize the root DSE backend separately after all other |
| | | // backends. |
| | | RootDSEBackendCfg rootDSECfg; |
| | |
| | | rootDSEBackend.openBackend(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Creates a set of workflows for a given backend and registers the |
| | | * workflows with the default network group, the internal network group |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Initializes the Directory Server group manager. |
| | | * |
| | |
| | | // groupManager.performBackendInitializationProcessing(configHandler); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the Directory Server group manager. |
| | | * |
| | |
| | | return directoryServer.groupManager; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the Directory Server subentry manager. |
| | | * |
| | |
| | | return directoryServer.subentryManager; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Initializes the set of extended operation handlers for the Directory |
| | | * Server. |
| | |
| | | extendedOperationConfigManager.initializeExtendedOperationHandlers(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Initializes the set of SASL mechanism handlers for the Directory Server. |
| | | * |
| | |
| | | saslConfigManager.initializeSASLMechanismHandlers(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Initializes the set of connection handlers that should be defined in the |
| | | * Directory Server. |
| | |
| | | connectionHandlerConfigManager.initializeConnectionHandlerConfig(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Initializes the subentry manager for the Directory Server. |
| | | * Note that the subentry manager initialization should be |
| | |
| | | authenticationPolicyConfigManager.initializeAuthenticationPolicies(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the operating system on which the Directory Server is running. |
| | | * |
| | |
| | | return directoryServer.operatingSystem; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a reference to the Directory Server configuration handler. |
| | | * |
| | |
| | | return directoryServer.configHandler; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Initializes the set of plugins defined in the Directory Server. Only the |
| | | * specified types of plugins will be initialized. |
| | |
| | | pluginConfigManager.initializeUserPlugins(pluginTypes); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Initializes the root DN Config Manager in the Directory Server. |
| | | * |
| | |
| | | rootDNConfigManager.initializeRootDNs(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Initialize the root DSE in the Directory Server. |
| | | * |
| | |
| | | rootDSEBackend.openBackend(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a reference to the Directory Server plugin configuration manager. |
| | | * |
| | |
| | | return directoryServer.pluginConfigManager; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided internal plugin with the Directory Server |
| | | * and ensures that it will be invoked in the specified ways. |
| | |
| | | directoryServer.pluginConfigManager.registerInternalPlugin(plugin); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided internal plugin with the Directory Server. |
| | | * |
| | |
| | | directoryServer.pluginConfigManager.deregisterInternalPlugin(plugin); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the requested entry from the Directory Server configuration. |
| | | * |
| | |
| | | return directoryServer.configHandler.getConfigEntry(entryDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the path to the root directory for this instance of the Directory |
| | | * Server. |
| | |
| | | return directoryServer.startUpTime; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the time that the Directory Server was started, formatted in UTC. |
| | | * |
| | |
| | | return directoryServer.startTimeUTC; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a reference to the Directory Server schema. |
| | | * |
| | |
| | | return directoryServer.schema; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Replaces the Directory Server schema with the provided schema. |
| | | * |
| | |
| | | directoryServer.schema = schema; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a list of modifications detailing any schema changes that may |
| | | * have been made with the server offline (e.g., by directly editing the |
| | |
| | | return directoryServer.offlineSchemaChanges; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies a list of modifications detailing any schema changes that may |
| | | * have been made with the server offline. |
| | |
| | | directoryServer.offlineSchemaChanges = offlineSchemaChanges; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of matching rules registered with the Directory Server. |
| | | * The mapping will be between the lowercase name or OID for each matching |
| | |
| | | return directoryServer.schema.getMatchingRules(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the matching rule with the specified name or OID. |
| | | * |
| | |
| | | return directoryServer.schema.getMatchingRule(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided matching rule with the Directory Server. |
| | | * |
| | |
| | | return directoryServer.schema.getObjectClasses(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the objectclass for the provided lowercase name or OID. |
| | | * |
| | |
| | | return directoryServer.schema.getObjectClass(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the objectclass for the provided lowercase name or OID. It can |
| | | * optionally return a generated "default" version if the requested |
| | |
| | | return oc; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided objectclass with the Directory Server. |
| | | * |
| | |
| | | directoryServer.schema.registerObjectClass(objectClass, overwriteExisting); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided objectclass with the Directory Server. |
| | | * |
| | |
| | | directoryServer.schema.deregisterObjectClass(objectClass); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the "top" objectClass, which should be the topmost objectclass in |
| | | * the inheritance chain for most other objectclasses. If no such objectclass |
| | |
| | | return objectClass; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Causes the Directory Server to construct a new objectclass |
| | | * definition with the provided name and with no required or allowed |
| | |
| | | return objectClass; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Causes the Directory Server to construct a new auxiliary objectclass |
| | | * definition with the provided name and with no required or allowed |
| | |
| | | return objectClass; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of attribute type definitions that have been |
| | | * defined in the Directory Server. |
| | |
| | | return directoryServer.schema.getAttributeTypes(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attribute type for the provided lowercase name or OID. |
| | | * |
| | |
| | | return directoryServer.schema.getAttributeType(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attribute type for the provided lowercase name or OID. It |
| | | * can optionally return a generated "default" version if the requested |
| | |
| | | overwriteExisting); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided attribute type with the Directory Server. |
| | | * |
| | |
| | | directoryServer.schema.deregisterAttributeType(attributeType); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the attribute type for the "objectClass" attribute. |
| | | * |
| | |
| | | return directoryServer.objectClassAttributeType; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Causes the Directory Server to construct a new attribute type definition |
| | | * with the provided name and using the default attribute syntax. This should |
| | |
| | | return getDefaultAttributeType(name, getDefaultAttributeSyntax()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Causes the Directory Server to construct a new attribute type definition |
| | | * with the provided name and syntax. This should only be used if there is no |
| | |
| | | false, false).setDirty(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of attribute syntaxes defined in the Directory Server. |
| | | * |
| | |
| | | return directoryServer.defaultSyntax; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default attribute syntax that should be used for attributes |
| | | * that are not defined in the server schema and are meant to store binary |
| | |
| | | return directoryServer.defaultBinarySyntax; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default attribute syntax that should be used for attributes |
| | | * that are not defined in the server schema and are meant to store Boolean |
| | |
| | | return directoryServer.defaultBooleanSyntax; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default attribute syntax that should be used for attributes |
| | | * that are not defined in the server schema and are meant to store DN values. |
| | |
| | | return directoryServer.defaultDNSyntax; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default attribute syntax that should be used for attributes |
| | | * that are not defined in the server schema and are meant to store integer |
| | |
| | | return directoryServer.defaultIntegerSyntax; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default attribute syntax that should be used for attributes |
| | | * that are not defined in the server schema and are meant to store string |
| | |
| | | return directoryServer.defaultStringSyntax; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of matching rule uses defined in the Directory Server. |
| | | * |
| | |
| | | return directoryServer.schema.getMatchingRuleUses(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the matching rule use associated with the provided matching rule. |
| | | * |
| | |
| | | return directoryServer.schema.getMatchingRuleUse(matchingRule); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided matching rule use with the Directory Server. |
| | | * |
| | |
| | | overwriteExisting); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided matching rule use with the Directory Server. |
| | | * |
| | |
| | | directoryServer.schema.deregisterMatchingRuleUse(matchingRuleUse); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of DIT content rules defined in the Directory Server. |
| | | * |
| | |
| | | return directoryServer.schema.getDITContentRules(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DIT content rule associated with the specified objectclass. |
| | | * |
| | |
| | | return directoryServer.schema.getDITContentRule(objectClass); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided DIT content rule with the Directory Server. |
| | | * |
| | |
| | | overwriteExisting); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided DIT content rule with the Directory Server. |
| | | * |
| | |
| | | directoryServer.schema.deregisterDITContentRule(ditContentRule); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of DIT structure rules defined in the Directory Server. |
| | | * |
| | |
| | | return directoryServer.schema.getDITStructureRulesByNameForm(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DIT structure rule associated with the provided rule ID. |
| | | * |
| | |
| | | return directoryServer.schema.getDITStructureRule(ruleID); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DIT structure rule associated with the provided name form. |
| | | * |
| | |
| | | return directoryServer.schema.getDITStructureRule(nameForm); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided DIT structure rule with the Directory Server. |
| | | * |
| | |
| | | overwriteExisting); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided DIT structure rule with the Directory Server. |
| | | * |
| | |
| | | directoryServer.schema.deregisterDITStructureRule(ditStructureRule); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of name forms defined in the Directory Server. |
| | | * |
| | |
| | | return directoryServer.schema.getNameFormsByObjectClass(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the name forms associated with the specified objectclass. |
| | | * |
| | |
| | | return directoryServer.schema.getNameForm(objectClass); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the name form associated with the specified name or OID. |
| | | * |
| | |
| | | return directoryServer.schema.getNameForm(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided name form with the Directory Server. |
| | | * |
| | |
| | | directoryServer.schema.registerNameForm(nameForm, overwriteExisting); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided name form with the Directory Server. |
| | | * |
| | |
| | | directoryServer.schema.deregisterNameForm(nameForm); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of virtual attribute rules registered with the Directory |
| | | * Server. |
| | |
| | | return directoryServer.virtualAttributeConfigManager.getVirtualAttributes(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of virtual attribute rules registered with the Directory |
| | | * Server that are applicable to the provided entry. |
| | |
| | | getInstance().virtualAttributeConfigManager.deregister(rule); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a reference to the JMX MBean server that is associated with the |
| | | * Directory Server. |
| | |
| | | return directoryServer.mBeanServer; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of JMX MBeans that are associated with the server. |
| | | * |
| | |
| | | return directoryServer.mBeans; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the JMX MBean associated with the specified entry in the |
| | | * Directory Server configuration. |
| | |
| | | return directoryServer.mBeans.get(configEntryDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided invokable component with the Directory Server. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided invokable component with the Directory Server. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided alert generator with the Directory Server. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided alert generator with the Directory Server. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of alert handlers that have been registered with the |
| | | * Directory Server. |
| | |
| | | return directoryServer.alertHandlers; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided alert handler with the Directory Server. |
| | | * |
| | |
| | | directoryServer.alertHandlers.add(alertHandler); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided alert handler with the Directory Server. |
| | | * |
| | |
| | | directoryServer.alertHandlers.remove(alertHandler); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sends an alert notification with the provided information. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | String alertID = alertMessage != null ? alertMessage.resourceName() + "-" + alertMessage.ordinal() : "-1"; |
| | | logger.info(NOTE_SENT_ALERT_NOTIFICATION, generator.getClassName(), alertType, alertID, alertMessage); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the password storage scheme defined in the specified |
| | | * configuration entry. |
| | |
| | | return directoryServer.passwordStorageSchemesByDN.get(configEntryDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of password storage schemes defined in the Directory |
| | | * Server, as a mapping between the all-lowercase scheme name and the |
| | |
| | | return directoryServer.passwordStorageSchemes; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the specified password storage scheme. |
| | | * |
| | |
| | | return directoryServer.passwordStorageSchemes.get(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of authentication password storage schemes defined in the |
| | | * Directory Server, as a mapping between the scheme name and the |
| | |
| | | return directoryServer.authPasswordStorageSchemes; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the specified authentication password storage scheme. |
| | | * |
| | |
| | | return directoryServer.authPasswordStorageSchemes.get(name); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided password storage scheme with the Directory Server. |
| | | * If an existing password storage scheme is registered with the same name, |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the specified password storage scheme with the Directory |
| | | * Server. If no scheme is registered with the specified name, then no action |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of password validators that have been registered for use |
| | | * with the Directory Server as a mapping between the DN of the associated |
| | |
| | | return directoryServer.passwordValidators; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the password validator registered with the provided configuration |
| | | * entry DN. |
| | |
| | | return directoryServer.passwordValidators.get(configEntryDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided password validator for use with the Directory |
| | | * Server. |
| | |
| | | directoryServer.passwordValidators.put(configEntryDN, validator); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided password validator for use with the Directory |
| | | * Server. |
| | |
| | | directoryServer.passwordValidators.remove(configEntryDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of account status notification handlers defined in the |
| | | * Directory Server, as a mapping between the DN of the configuration entry |
| | |
| | | return directoryServer.accountStatusNotificationHandlers; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the account status notification handler with the specified |
| | | * configuration entry DN. |
| | |
| | | return directoryServer.accountStatusNotificationHandlers.get(handlerDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided account status notification handler with the |
| | | * Directory Server. |
| | |
| | | directoryServer.accountStatusNotificationHandlers.put(handlerDN, handler); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the specified account status notification handler with the |
| | | * Directory Server. |
| | |
| | | directoryServer.accountStatusNotificationHandlers.remove(handlerDN); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of password generators that have been registered for use |
| | | * with the Directory Server as a mapping between the DN of the associated |
| | |
| | | return directoryServer.passwordGenerators; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the password generator registered with the provided configuration |
| | | * entry DN. |
| | |
| | | return directoryServer.passwordGenerators.get(configEntryDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided password generator for use with the Directory |
| | | * Server. |
| | |
| | | directoryServer.passwordGenerators.put(configEntryDN, generator); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided password generator for use with the Directory |
| | | * Server. |
| | |
| | | directoryServer.passwordGenerators.remove(configEntryDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Returns an unmodifiable collection containing all of the authentication |
| | | * policies registered with the Directory Server. The references returned are |
| | |
| | | .unmodifiableCollection(directoryServer.authenticationPolicies.values()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the authentication policy registered for the provided |
| | | * configuration entry. |
| | |
| | | return directoryServer.authenticationPolicies.get(configEntryDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided authentication policy with the Directory Server. If |
| | | * a policy is already registered for the provided configuration entry DN, |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided authentication policy with the Directory Server. |
| | | * If no such policy is registered, then no action will be taken. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the configuration entry for the default password policy |
| | | * for the Directory Server. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the DN of the configuration entry for the default authentication |
| | | * policy for the Directory Server. This routine does not check the registered |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default password policy for the Directory Server. This |
| | | * method is equivalent to invoking <CODE>getAuthenticationPolicy</CODE> on |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Retrieves the log rotation policy registered for the provided configuration |
| | | * entry. |
| | |
| | | directoryServer.rotationPolicies.put(configEntryDN, policy); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided log rotation policy with the Directory Server. |
| | | * If no such policy is registered, then no action will be taken. |
| | |
| | | directoryServer.retentionPolicies.put(configEntryDN, policy); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided log retention policy with the Directory Server. |
| | | * If no such policy is registered, then no action will be taken. |
| | |
| | | return directoryServer.monitorProviders; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the monitor provider with the specified name. |
| | | * |
| | |
| | | return directoryServer.monitorProviders.get(lowerName); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided monitor provider with the Directory Server. Note |
| | | * that if a monitor provider is already registered with the specified name, |
| | |
| | | String lowerName = toLowerCase(monitorProvider.getMonitorInstanceName()); |
| | | directoryServer.monitorProviders.put(lowerName, monitorProvider); |
| | | |
| | | |
| | | // Try to register this monitor provider with an appropriate JMX MBean. |
| | | try |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the specified monitor provider from the Directory Server. If no |
| | | * such monitor provider is registered, no action will be taken. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entry cache for the Directory Server. |
| | | * |
| | |
| | | return directoryServer.entryCache; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the entry cache that should be used by the Directory Server. |
| | | * This should only be called by the entry cache configuration manager. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of key manager providers registered with the Directory |
| | | * Server. |
| | |
| | | return directoryServer.keyManagerProviders; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the key manager provider registered with the provided entry DN. |
| | | * |
| | |
| | | return directoryServer.keyManagerProviders.get(providerDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided key manager provider with the Directory Server. |
| | | * |
| | |
| | | directoryServer.keyManagerProviders.put(providerDN, provider); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the specified key manager provider with the Directory Server. |
| | | * |
| | |
| | | directoryServer.keyManagerProviders.remove(providerDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of trust manager providers registered with the Directory |
| | | * Server. |
| | |
| | | return directoryServer.trustManagerProviders; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the trust manager provider registered with the provided entry DN. |
| | | * |
| | |
| | | return directoryServer.trustManagerProviders.get(providerDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided trust manager provider with the Directory Server. |
| | | * |
| | |
| | | directoryServer.trustManagerProviders.put(providerDN, provider); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the specified trust manager provider with the Directory Server. |
| | | * |
| | |
| | | directoryServer.trustManagerProviders.remove(providerDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of certificate mappers registered with the Directory |
| | | * Server. |
| | |
| | | return directoryServer.certificateMappers; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the certificate mapper registered with the provided entry DN. |
| | | * |
| | |
| | | return directoryServer.certificateMappers.get(mapperDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided certificate mapper with the Directory Server. |
| | | * |
| | |
| | | directoryServer.certificateMappers.put(mapperDN, mapper); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the specified certificate mapper with the Directory Server. |
| | | * |
| | |
| | | directoryServer.certificateMappers.remove(mapperDN); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of privileges that should automatically be granted to |
| | | * root users when they authenticate. |
| | |
| | | return directoryServer.rootDNConfigManager.getRootPrivileges(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DNs for the root users configured in the Directory Server. |
| | | * Note that this set should only contain the actual DNs for the root users |
| | |
| | | return directoryServer.rootDNs; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the provided DN is the DN for one of the root users |
| | | * configured in the Directory Server. |
| | |
| | | return directoryServer.rootDNs.contains(userDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided root DN with the Directory Server. |
| | | * |
| | |
| | | directoryServer.rootDNs.add(rootDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided root DN with the Directory Server. This will have |
| | | * no effect if the provided DN is not registered as a root DN. |
| | |
| | | directoryServer.rootDNs.remove(rootDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of alternate bind DNs for root users, mapped between the |
| | | * alternate DN and the real DN. The contents of the returned map must not be |
| | |
| | | return directoryServer.alternateRootBindDNs; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the real entry DN for the root user with the provided alternate |
| | | * bind DN. |
| | |
| | | return directoryServer.alternateRootBindDNs.get(alternateRootBindDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers an alternate root bind DN using the provided information. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided alternate root bind DN from the server. This will |
| | | * have no effect if there was no mapping defined for the provided alternate |
| | |
| | | return directoryServer.alternateRootBindDNs.remove(alternateRootBindDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the result code that should be used when the Directory Server |
| | | * encounters an internal server error. |
| | |
| | | return directoryServer.serverErrorResultCode; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the result code that should be used when the Directory Server |
| | | * encounters an internal server error. |
| | |
| | | directoryServer.serverErrorResultCode = serverErrorResultCode; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the Directory Server should automatically add missing RDN |
| | | * attributes to an entry whenever it is added. |
| | |
| | | return directoryServer.addMissingRDNAttributes; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies whether the Directory Server should automatically add missing RDN |
| | | * attributes to an entry whenever it is added. |
| | |
| | | directoryServer.addMissingRDNAttributes = addMissingRDNAttributes; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether to be more flexible in the set of characters allowed for |
| | | * attribute names. The standard requires that only ASCII alphabetic letters, |
| | |
| | | return directoryServer.allowAttributeNameExceptions; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies whether to be more flexible in the set of characters allowed for |
| | | * attribute names. |
| | |
| | | directoryServer.allowAttributeNameExceptions = allowAttributeNameExceptions; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the Directory Server should perform schema checking. |
| | | * |
| | |
| | | return directoryServer.checkSchema; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies whether the Directory Server should perform schema checking. |
| | | * |
| | |
| | | directoryServer.checkSchema = checkSchema; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the policy that should be used regarding enforcement of a single |
| | | * structural objectclass per entry. |
| | |
| | | return directoryServer.singleStructuralClassPolicy; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the policy that should be used regarding enforcement of a single |
| | | * structural objectclass per entry. |
| | |
| | | directoryServer.singleStructuralClassPolicy = singleStructuralClassPolicy; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the policy that should be used when an attribute value is found |
| | | * that is not valid according to the associated attribute syntax. |
| | |
| | | return directoryServer.syntaxEnforcementPolicy; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the policy that should be used when an attribute value is found |
| | | * that is not valid according to the associated attribute syntax. |
| | |
| | | directoryServer.syntaxEnforcementPolicy = syntaxEnforcementPolicy; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the Directory Server should send a response to an |
| | | * operation that has been abandoned. Sending such a response is technically |
| | |
| | | return directoryServer.notifyAbandonedOperations; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies whether the Directory Server should send a response to an |
| | | * operation that has been abandoned. Sending such a response is technically |
| | |
| | | directoryServer.notifyAbandonedOperations = notifyAbandonedOperations; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of backends that have been registered with the Directory |
| | | * Server, as a mapping between the backend ID and the corresponding backend. |
| | |
| | | return new TreeMap<String, Backend>(directoryServer.backends); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the backend with the specified backend ID. |
| | | * |
| | |
| | | return directoryServer.backends.get(backendID); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the Directory Server has a backend with the specified |
| | | * backend ID. |
| | |
| | | return directoryServer.backends.containsKey(backendID); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided backend with the Directory Server. Note that this |
| | | * will not register the set of configured suffixes with the server, as that |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided backend with the Directory Server. Note that this |
| | | * will not deregister the set of configured suffixes with the server, as that |
| | |
| | | LocalBackendWorkflowElement.remove(baseDN); |
| | | } |
| | | |
| | | |
| | | BackendMonitor monitor = backend.getBackendMonitor(); |
| | | if (monitor != null) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entire set of base DNs registered with the Directory Server, |
| | | * mapped from the base DN to the backend responsible for that base DN. The |
| | |
| | | return directoryServer.baseDnRegistry.getBaseDnMap(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the backend with the specified base DN. |
| | | * |
| | |
| | | return directoryServer.baseDnRegistry.getBaseDnMap().get(baseDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the backend that should be used to handle operations on the |
| | | * specified entry. |
| | |
| | | return b; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Obtains a copy of the server's base DN registry. The copy can be used |
| | | * to test registration/deregistration of base DNs but cannot be used to |
| | |
| | | return directoryServer.baseDnRegistry.copy(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Registers the provided base DN with the server. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided base DN with the server. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of public naming contexts defined in the Directory |
| | | * Server, mapped from the naming context DN to the corresponding backend. |
| | |
| | | return directoryServer.baseDnRegistry.getPublicNamingContextsMap(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of private naming contexts defined in the Directory |
| | | * Server, mapped from the naming context DN to the corresponding backend. |
| | |
| | | return directoryServer.baseDnRegistry.getPrivateNamingContextsMap(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the specified DN is one of the Directory Server naming |
| | | * contexts. |
| | |
| | | return directoryServer.baseDnRegistry.containsNamingContext(dn); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the root DSE entry for the Directory Server. |
| | | * |
| | |
| | | return directoryServer.rootDSEBackend.getRootDSE(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the root DSE backend for the Directory Server. |
| | | * |
| | |
| | | return directoryServer.rootDSEBackend; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the entry containing the server schema definitions. |
| | | * |
| | |
| | | return directoryServer.schemaDN; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the DN of the entry containing the server schema definitions. |
| | | * |
| | |
| | | directoryServer.schemaDN = schemaDN; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the entry with the requested DN. It will first determine which backend should be used |
| | | * for this DN and will then use that backend to retrieve the entry. The caller is not required to |
| | |
| | | return backend != null ? backend.getEntry(entryDN) : null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the specified entry exists in the Directory Server. The |
| | | * caller is not required to hold any locks when invoking this method. |
| | |
| | | return backend != null && backend.entryExists(entryDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of supported controls registered with the Directory |
| | | * Server. |
| | |
| | | return directoryServer.supportedControls; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the specified OID is registered with the Directory Server |
| | | * as a supported control. |
| | |
| | | return directoryServer.supportedControls.contains(controlOID); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided OID as a supported control for the Directory Server. |
| | | * This will have no effect if the specified control OID is already present in |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided OID as a supported control for the Directory |
| | | * Server. This will have no effect if the specified control OID is not |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of supported features registered with the Directory |
| | | * Server. |
| | |
| | | return directoryServer.supportedFeatures; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the specified OID is registered with the Directory Server |
| | | * as a supported feature. |
| | |
| | | return directoryServer.supportedFeatures.contains(featureOID); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided OID as a supported feature for the Directory Server. |
| | | * This will have no effect if the specified feature OID is already present in |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided OID as a supported feature for the Directory |
| | | * Server. This will have no effect if the specified feature OID is not |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of extended operations that may be processed by the |
| | | * Directory Server. |
| | |
| | | return directoryServer.extendedOperationHandlers; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the handler for the extended operation for the provided OID. |
| | | * |
| | |
| | | return directoryServer.extendedOperationHandlers.get(oid); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided extended operation handler with the Directory |
| | | * Server. |
| | |
| | | directoryServer.extendedOperationHandlers.put(toLowerCase(oid), handler); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided extended operation handler with the Directory |
| | | * Server. |
| | |
| | | directoryServer.extendedOperationHandlers.remove(toLowerCase(oid)); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of SASL mechanisms that are supported by the Directory |
| | | * Server. |
| | |
| | | return directoryServer.saslMechanismHandlers; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the handler for the specified SASL mechanism. |
| | | * |
| | |
| | | return directoryServer.saslMechanismHandlers.get(name); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided SASL mechanism handler with the Directory Server. |
| | | * |
| | |
| | | directoryServer.saslMechanismHandlers.put(name, handler); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided SASL mechanism handler with the Directory Server. |
| | | * |
| | |
| | | directoryServer.saslMechanismHandlers.remove(name); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the supported LDAP versions for the Directory Server. |
| | | * |
| | |
| | | return directoryServer.supportedLDAPVersions.keySet(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided LDAP protocol version as supported within the |
| | | * Directory Server. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided LDAP protocol version as supported within the |
| | | * Directory Server. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of identity mappers defined in the Directory Server |
| | | * configuration, as a mapping between the DN of the configuration entry and |
| | |
| | | return directoryServer.identityMappers; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the Directory Server identity mapper whose configuration resides |
| | | * in the specified configuration entry. |
| | |
| | | return directoryServer.identityMappers.get(configEntryDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided identity mapper for use with the Directory Server. |
| | | * |
| | |
| | | directoryServer.identityMappers.put(configEntryDN, identityMapper); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided identity mapper for use with the Directory Server. |
| | | * |
| | |
| | | directoryServer.identityMappers.remove(configEntryDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the DN of the configuration entry for the identity mapper that |
| | | * should be used in conjunction with proxied authorization V2 controls. |
| | |
| | | return directoryServer.proxiedAuthorizationIdentityMapperDN; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the DN of the configuration entry for the identity mapper that |
| | | * should be used in conjunction with proxied authorization V2 controls. |
| | |
| | | proxiedAuthorizationIdentityMapperDN; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the identity mapper that should be used to resolve authorization |
| | | * IDs contained in proxied authorization V2 controls. |
| | |
| | | directoryServer.proxiedAuthorizationIdentityMapperDN); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of connection handlers configured in the Directory |
| | | * Server. The returned list must not be altered. |
| | |
| | | return directoryServer.connectionHandlers; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided connection handler with the Directory Server. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided connection handler with the Directory Server. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Starts the connection handlers defined in the Directory Server |
| | | * Configuration. |
| | |
| | | throw new ConfigException(ERR_ERROR_STARTING_CONNECTION_HANDLERS.get()); |
| | | } |
| | | |
| | | |
| | | // If there are no connection handlers log a message. |
| | | if (connectionHandlers.isEmpty()) |
| | | { |
| | |
| | | return directoryServer.workQueue; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Runs all the necessary checks prior to adding an operation to the work |
| | | * queue. It throws a DirectoryException if one of the check fails. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // If the associated user is required to change their password before |
| | | // continuing, then make sure the associated operation is one that could |
| | | // result in the password being changed. If not, then reject it. |
| | |
| | | return directoryServer.synchronizationProviders; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided synchronization provider with the Directory Server. |
| | | * |
| | |
| | | provider.completeSynchronizationProvider(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided synchronization provider with the Directory |
| | | * Server. |
| | |
| | | directoryServer.synchronizationProviders.remove(provider); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves a set containing the names of the allowed tasks that may be |
| | | * invoked in the server. |
| | |
| | | return directoryServer.allowedTasks; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the set of allowed tasks that may be invoked in the server. |
| | | * |
| | |
| | | directoryServer.allowedTasks = allowedTasks; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the set of privileges that have been disabled. |
| | | * |
| | |
| | | return directoryServer.disabledPrivileges; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the specified privilege is disabled. |
| | | * |
| | |
| | | return directoryServer.disabledPrivileges.contains(privilege); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the set of privileges that should be disabled in the server. |
| | | * |
| | |
| | | directoryServer.disabledPrivileges = disabledPrivileges; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether responses to failed bind operations should include a |
| | | * message explaining the reason for the failure. |
| | |
| | | return directoryServer.returnBindErrorMessages; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies whether responses to failed bind operations should include a |
| | | * message explaining the reason for the failure. |
| | |
| | | directoryServer.returnBindErrorMessages = returnBindErrorMessages; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the maximum length of time in milliseconds that client |
| | | * connections should be allowed to remain idle without being disconnected. |
| | |
| | | return directoryServer.idleTimeLimit; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the maximum length of time in milliseconds that client |
| | | * connections should be allowed to remain idle without being disconnected. |
| | |
| | | directoryServer.idleTimeLimit = idleTimeLimit; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the Directory Server should save a copy of its |
| | | * configuration whenever it is started successfully. |
| | |
| | | return directoryServer.saveConfigOnSuccessfulStartup; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies whether the Directory Server should save a copy of its |
| | | * configuration whenever it is started successfully. |
| | |
| | | saveConfigOnSuccessfulStartup; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided backup task listener with the Directory Server. |
| | | * |
| | |
| | | directoryServer.backupTaskListeners.addIfAbsent(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided backup task listener with the Directory Server. |
| | | * |
| | |
| | | directoryServer.backupTaskListeners.remove(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Notifies the registered backup task listeners that the server will be |
| | | * beginning a backup task with the provided information. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Notifies the registered backup task listeners that the server has completed |
| | | * processing on a backup task with the provided information. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided restore task listener with the Directory Server. |
| | | * |
| | |
| | | directoryServer.restoreTaskListeners.addIfAbsent(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided restore task listener with the Directory Server. |
| | | * |
| | |
| | | directoryServer.restoreTaskListeners.remove(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Notifies the registered restore task listeners that the server will be |
| | | * beginning a restore task with the provided information. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Notifies the registered restore task listeners that the server has |
| | | * completed processing on a restore task with the provided information. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided LDIF export task listener with the Directory Server. |
| | | * |
| | |
| | | directoryServer.exportTaskListeners.addIfAbsent(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided LDIF export task listener with the Directory |
| | | * Server. |
| | |
| | | directoryServer.exportTaskListeners.remove(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Notifies the registered LDIF export task listeners that the server will be |
| | | * beginning an export task with the provided information. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Notifies the registered LDIF export task listeners that the server has |
| | | * completed processing on an export task with the provided information. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers the provided LDIF import task listener with the Directory Server. |
| | | * |
| | |
| | | directoryServer.importTaskListeners.addIfAbsent(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided LDIF import task listener with the Directory |
| | | * Server. |
| | |
| | | directoryServer.importTaskListeners.remove(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Notifies the registered LDIF import task listeners that the server will be |
| | | * beginning an import task with the provided information. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Notifies the registered LDIF import task listeners that the server has |
| | | * completed processing on an import task with the provided information. |
| | |
| | | directoryServer.shutdownListeners.add(listener); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters the provided shutdown listener with the Directory Server. |
| | | * |
| | |
| | | directoryServer.shutdownListeners.remove(listener); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Initiates the Directory Server shutdown process. Note that once this has |
| | | * started, it should not be interrupted. |
| | |
| | | sendAlertNotification(directoryServer, ALERT_TYPE_SERVER_SHUTDOWN, |
| | | NOTE_SERVER_SHUTDOWN.get(className, reason)); |
| | | |
| | | |
| | | // Create a shutdown monitor that will watch the rest of the shutdown |
| | | // process to ensure that everything goes smoothly. |
| | | ServerShutdownMonitor shutdownMonitor = new ServerShutdownMonitor(); |
| | | shutdownMonitor.start(); |
| | | |
| | | |
| | | // Shut down the connection handlers. |
| | | for (ConnectionHandler handler : directoryServer.connectionHandlers) |
| | | { |
| | |
| | | catch (Exception e) {} |
| | | } |
| | | |
| | | |
| | | // Notify all the shutdown listeners. |
| | | for (ServerShutdownListener shutdownListener : |
| | | directoryServer.shutdownListeners) |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // Shut down all of the alert handlers. |
| | | for (AlertHandler alertHandler : directoryServer.alertHandlers) |
| | | { |
| | | alertHandler.finalizeAlertHandler(); |
| | | } |
| | | |
| | | |
| | | // Deregister all of the JMX MBeans. |
| | | if (directoryServer.mBeanServer != null) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // Finalize all of the SASL mechanism handlers. |
| | | for (SASLMechanismHandler handler : |
| | | directoryServer.saslMechanismHandlers.values()) |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // Finalize all of the extended operation handlers. |
| | | for (ExtendedOperationHandler handler : |
| | | directoryServer.extendedOperationHandlers.values()) |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // Finalize the password policy map. |
| | | for (DN configEntryDN : directoryServer.authenticationPolicies.keySet()) |
| | | { |
| | |
| | | // Shut down all the other components that may need special handling. |
| | | // NYI |
| | | |
| | | |
| | | // Shut down the monitor providers. |
| | | for (MonitorProvider monitor : directoryServer.monitorProviders.values()) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | // Shut down the backends. |
| | | for (Backend<?> backend : directoryServer.backends.values()) |
| | | { |
| | |
| | | // the monitor to give the OK to stop. |
| | | shutdownMonitor.waitForMonitor(); |
| | | |
| | | |
| | | // At this point, the server is no longer running. We should destroy the |
| | | // handle to the previous instance, but we will want to get a new instance |
| | | // in case the server is to be started again later in the same JVM. Before |
| | |
| | | directoryServer = getNewInstance(envConfig); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Destroy key structures in the current Directory Server instance in a manner |
| | | * that can help detect any inappropriate cached references to server |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Causes the Directory Server to perform an in-core restart. This will |
| | | * cause virtually all components of the Directory Server to shut down, and |
| | |
| | | restart(className, reason, directoryServer.environmentConfig); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Causes the Directory Server to perform an in-core restart. This will |
| | | * cause virtually all components of the Directory Server to shut down, and |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reinitializes the server following a shutdown, preparing it for a call to |
| | | * {@code startServer}. |
| | |
| | | return reinitialize(directoryServer.environmentConfig); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Reinitializes the server following a shutdown, preparing it for a call to |
| | | * {@code startServer}. |
| | |
| | | return directoryServer; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the maximum number of concurrent client connections that may be |
| | | * established. |
| | |
| | | return directoryServer.maxAllowedConnections; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the maximum number of concurrent client connections that may be |
| | | * established. A value that is less than or equal to zero will indicate that |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates that a new connection has been accepted and increments the |
| | | * associated counters. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates that the specified client connection has been closed. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the number of client connections that are currently established. |
| | | * |
| | |
| | | return directoryServer.currentConnections; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the maximum number of client connections that have been |
| | | * established concurrently. |
| | |
| | | return directoryServer.maxConnections; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the total number of client connections that have been established |
| | | * since the Directory Server started. |
| | |
| | | return directoryServer.totalConnections; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the full version string for the Directory Server. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default maximum number of entries that should be returned for |
| | | * a search. |
| | |
| | | return directoryServer.sizeLimit; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the default maximum number of entries that should be returned for |
| | | * a search. |
| | |
| | | directoryServer.sizeLimit = sizeLimit; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default maximum number of entries that should checked for |
| | | * matches during a search. |
| | |
| | | return directoryServer.lookthroughLimit; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the default maximum number of entries that should be checked for |
| | | * matches during a search. |
| | |
| | | directoryServer.lookthroughLimit = lookthroughLimit; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the maximum number of simultaneous persistent |
| | | * searches that are allowed. |
| | |
| | | directoryServer.maxPSearches = maxPSearches; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Registers a new persistent search by increasing the count |
| | | * of active persistent searches. After receiving a persistent |
| | |
| | | directoryServer.activePSearches.incrementAndGet(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Deregisters a canceled persistent search. After a persistent |
| | | * search is canceled, the handler must call this method to let |
| | |
| | | directoryServer.activePSearches.decrementAndGet(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether a new persistent search is allowed. |
| | | * |
| | |
| | | || directoryServer.activePSearches.get() < directoryServer.maxPSearches; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the default maximum length of time in seconds that should be |
| | | * allowed when processing a search. |
| | |
| | | return directoryServer.timeLimit; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the default maximum length of time in seconds that should be |
| | | * allowed when processing a search. |
| | |
| | | directoryServer.timeLimit = timeLimit; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies whether to collect nanosecond resolution processing times for |
| | | * operations. |
| | |
| | | directoryServer.useNanoTime = useNanoTime; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves whether operation processing times should be collected with |
| | | * nanosecond resolution. |
| | |
| | | return directoryServer.useNanoTime; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the writability mode for the Directory Server. This will only |
| | | * be applicable for user suffixes. |
| | |
| | | return directoryServer.writabilityMode; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the writability mode for the Directory Server. This will only |
| | | * be applicable for user suffixes. |
| | |
| | | directoryServer.writabilityMode = writabilityMode; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether simple bind requests that contain a bind DN will also be |
| | | * required to have a password. |
| | |
| | | return directoryServer.bindWithDNRequiresPassword; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies whether simple bind requests that contain a bind DN will also be |
| | | * required to have a password. |
| | |
| | | directoryServer.bindWithDNRequiresPassword = bindWithDNRequiresPassword; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether an unauthenticated request should be rejected. |
| | | * |
| | |
| | | rejectUnauthenticatedRequests; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the Directory Server is currently configured to operate |
| | | * in the lockdown mode, in which all non-root requests will be rejected and |
| | |
| | | return directoryServer.lockdownMode; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies whether the server should operate in lockdown mode. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * Sets the message to be displayed on the command-line when the user asks for |
| | | * the usage. |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the fully-qualified name of the Java class for this alert |
| | | * generator implementation. |
| | |
| | | return DirectoryServer.class.getName(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves information about the set of alerts that this generator may |
| | | * produce. The map returned should be between the notification type for a |
| | |
| | | return alerts; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Indicates whether the server is currently in the process of shutting down. |
| | | * @return <CODE>true</CODE> if this server is currently in the process of |
| | |
| | | return shuttingDown; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Parses the provided command-line arguments and uses that information to |
| | | * bootstrap and start the Directory Server. |
| | |
| | | StringArgument configClass = null; |
| | | StringArgument configFile = null; |
| | | |
| | | |
| | | // Create the command-line argument parser for use with this program. |
| | | LocalizableMessage theToolDescription = DirectoryServer.toolDescription; |
| | | ArgumentParser argParser = |
| | |
| | | true, false, true, |
| | | INFO_CONFIGCLASS_PLACEHOLDER.get(), |
| | | ConfigFileHandler.class.getName(), null, |
| | | INFO_DSCORE_DESCRIPTION_CONFIG_CLASS |
| | | .get()); |
| | | INFO_DSCORE_DESCRIPTION_CONFIG_CLASS.get()); |
| | | configClass.setHidden(true); |
| | | argParser.addArgument(configClass); |
| | | |
| | | |
| | | configFile = new StringArgument("configfile", 'f', "configFile", |
| | | true, false, true, |
| | | INFO_CONFIGFILE_PLACEHOLDER.get(), null, |
| | | null, |
| | | INFO_DSCORE_DESCRIPTION_CONFIG_FILE |
| | | .get()); |
| | | INFO_DSCORE_DESCRIPTION_CONFIG_FILE.get()); |
| | | configFile.setHidden(true); |
| | | argParser.addArgument(configFile); |
| | | |
| | | |
| | | checkStartability = new BooleanArgument("checkstartability", null, |
| | | "checkStartability", |
| | | INFO_DSCORE_DESCRIPTION_CHECK_STARTABILITY.get()); |
| | | checkStartability.setHidden(true); |
| | | argParser.addArgument(checkStartability); |
| | | |
| | | windowsNetStart = new BooleanArgument("windowsnetstart", null, |
| | | "windowsNetStart", |
| | | windowsNetStart = new BooleanArgument("windowsnetstart", null, "windowsNetStart", |
| | | INFO_DSCORE_DESCRIPTION_WINDOWS_NET_START.get()); |
| | | windowsNetStart.setHidden(true); |
| | | argParser.addArgument(windowsNetStart); |
| | | |
| | | |
| | | fullVersion = new BooleanArgument("fullversion", 'F', "fullVersion", |
| | | INFO_DSCORE_DESCRIPTION_FULLVERSION |
| | | .get()); |
| | | INFO_DSCORE_DESCRIPTION_FULLVERSION.get()); |
| | | fullVersion.setHidden(true); |
| | | argParser.addArgument(fullVersion); |
| | | |
| | | |
| | | systemInfo = new BooleanArgument("systeminfo", 's', "systemInfo", |
| | | INFO_DSCORE_DESCRIPTION_SYSINFO.get()); |
| | | argParser.addArgument(systemInfo); |
| | | |
| | | |
| | | useLastKnownGoodConfig = |
| | | new BooleanArgument("lastknowngoodconfig", 'L', |
| | | "useLastKnownGoodConfig", |
| | | INFO_DSCORE_DESCRIPTION_LASTKNOWNGOODCFG.get()); |
| | | argParser.addArgument(useLastKnownGoodConfig); |
| | | |
| | | |
| | | noDetach = new BooleanArgument("nodetach", 'N', "nodetach", |
| | | INFO_DSCORE_DESCRIPTION_NODETACH.get()); |
| | | argParser.addArgument(noDetach); |
| | | |
| | | |
| | | quietMode = CommonArguments.getQuiet(); |
| | | argParser.addArgument(quietMode); |
| | | |
| | | |
| | | // Not used in this class, but required by the start-ds script |
| | | // (see issue #3814) |
| | | timeout = new IntegerArgument("timeout", 't', "timeout", true, false, |
| | |
| | | System.exit(1); |
| | | } |
| | | |
| | | |
| | | // Parse the command-line arguments provided to this program. |
| | | try |
| | | { |
| | |
| | | System.exit(1); |
| | | } |
| | | |
| | | |
| | | // If we should just display usage information, then print it and exit. |
| | | if (checkStartability.isPresent()) |
| | | { |
| | |
| | | System.exit(1); |
| | | } |
| | | |
| | | |
| | | // At this point, we know that we're going to try to start the server. |
| | | // Attempt to grab an exclusive lock for the Directory Server process. |
| | | String lockFile = LockFileManager.getServerLockFileName(); |
| | |
| | | } |
| | | } catch (Exception e) {} |
| | | |
| | | |
| | | // Redirect standard output and standard error to the server.out file. If |
| | | // the server hasn't detached from the terminal, then also continue writing |
| | | // to the original standard output and standard error. Also, configure the |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Gets the class loader to be used with this directory server |
| | | * application. |
| | |
| | | return Class.forName(name, true, DirectoryServer.getClassLoader()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Returns the error code that we return when we are checking the startability |
| | | * of the server. |
| | |
| | | */ |
| | | public static boolean isRunningAsWindowsService() |
| | | { |
| | | boolean isRunningAsWindowsService = false; |
| | | if (OperatingSystem.isWindows()) |
| | | { |
| | | isRunningAsWindowsService = |
| | | ConfigureWindowsService.serviceState() == ConfigureWindowsService.SERVICE_STATE_ENABLED; |
| | | } |
| | | return isRunningAsWindowsService; |
| | | return OperatingSystem.isWindows() |
| | | && serviceState() == SERVICE_STATE_ENABLED; |
| | | } |
| | | |
| | | // TODO JNR remove error CoreMessages.ERR_REGISTER_WORKFLOW_ELEMENT_ALREADY_EXISTS |
| | | |
| | | /** |
| | | * Print messages for start-ds "-F" option (full version information). |
| | | */ |
| | | /** Print messages for start-ds "-F" option (full version information). */ |
| | | private static void printFullVersionInformation() { |
| | | /* |
| | | * This option is used by the upgrade to identify the server build and it |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Sets the threshold capacity beyond which internal cached buffers used for |
| | | * encoding and decoding entries and protocol messages will be trimmed after |
| | |
| | | directoryServer.maxInternalBufferSize = maxInternalBufferSize; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Returns the threshold capacity beyond which internal cached buffers used |
| | | * for encoding and decoding entries and protocol messages will be trimmed |