public final class DirectoryServer extends Object implements AlertGenerator
Modifier and Type | Class and Description |
---|---|
static class |
DirectoryServer.DirectoryServerVersionHandler
Class that prints the version of OpenDJ server to System.out.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_TIMEOUT
The default timeout used to start the server in detach mode.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
addMissingRDNAttributes()
Indicates whether the Directory Server should automatically add missing RDN
attributes to an entry whenever it is added.
|
static boolean |
allowAttributeNameExceptions()
Indicates whether to be more flexible in the set of characters allowed for
attribute names.
|
static boolean |
allowNewPersistentSearch()
Indicates whether a new persistent search is allowed.
|
static boolean |
bindWithDNRequiresPassword()
Indicates whether simple bind requests that contain a bind DN will also be
required to have a password.
|
static void |
bootstrapClient()
Bootstraps the appropriate Directory Server structures that may be needed
by both server and client-side tools.
|
static void |
checkCanEnqueueRequest(Operation operation,
boolean isAllowedInLockDownMode)
Runs all the necessary checks prior to adding an operation to the work
queue.
|
static boolean |
checkSchema()
Indicates whether the Directory Server should perform schema checking.
|
static void |
connectionClosed(ClientConnection clientConnection)
Indicates that the specified client connection has been closed.
|
static BaseDnRegistry |
copyBaseDnRegistry()
Obtains a copy of the server's base DN registry.
|
static void |
deregisterAccountStatusNotificationHandler(DN handlerDN)
Deregisters the specified account status notification handler with the
Directory Server.
|
static void |
deregisterAlertGenerator(AlertGenerator alertGenerator)
Deregisters the provided alert generator with the Directory Server.
|
static void |
deregisterAlertHandler(AlertHandler alertHandler)
Deregisters the provided alert handler with the Directory Server.
|
static DN |
deregisterAlternateRootBindDN(DN alternateRootBindDN)
Deregisters the provided alternate root bind DN from the server.
|
static void |
deregisterAttributeType(AttributeType attributeType)
Deregisters the provided attribute type with the Directory Server.
|
static void |
deregisterAuthenticationPolicy(DN configEntryDN)
Deregisters the provided authentication policy with the Directory Server.
|
static void |
deregisterBackend(Backend<?> backend)
Deregisters the provided backend with the Directory Server.
|
static void |
deregisterBackendInitializationListener(BackendInitializationListener listener)
Deregisters the provided backend initialization listener with the Directory
Server.
|
static void |
deregisterBackupTaskListener(BackupTaskListener listener)
Deregisters the provided backup task listener with the Directory Server.
|
static void |
deregisterBaseDN(DN baseDN)
Deregisters the provided base DN with the server.
|
static void |
deregisterCertificateMapper(DN mapperDN)
Deregisters the specified certificate mapper with the Directory Server.
|
static void |
deregisterConnectionHandler(ConnectionHandler handler)
Deregisters the provided connection handler with the Directory Server.
|
static void |
deregisterDITContentRule(DITContentRule ditContentRule)
Deregisters the provided DIT content rule with the Directory Server.
|
static void |
deregisterDITStructureRule(DITStructureRule ditStructureRule)
Deregisters the provided DIT structure rule with the Directory Server.
|
static void |
deregisterExportTaskListener(ExportTaskListener listener)
Deregisters the provided LDIF export task listener with the Directory
Server.
|
static void |
deregisterIdentityMapper(DN configEntryDN)
Deregisters the provided identity mapper for use with the Directory Server.
|
static void |
deregisterImportTaskListener(ImportTaskListener listener)
Deregisters the provided LDIF import task listener with the Directory
Server.
|
static void |
deregisterInitializationCompletedListener(InitializationCompletedListener listener)
Deregisters the provided initialization completed listener with the
Directory Server.
|
static void |
deregisterInternalPlugin(InternalDirectoryServerPlugin plugin)
Deregisters the provided internal plugin with the Directory Server.
|
static void |
deregisterInvokableComponent(InvokableComponent component)
Deregisters the provided invokable component with the Directory Server.
|
static void |
deregisterKeyManagerProvider(DN providerDN)
Deregisters the specified key manager provider with the Directory Server.
|
static void |
deregisterMatchingRule(org.forgerock.opendj.ldap.schema.MatchingRule matchingRule)
Deregisters the provided matching rule with the Directory Server.
|
static void |
deregisterMatchingRuleUse(MatchingRuleUse matchingRuleUse)
Deregisters the provided matching rule use with the Directory Server.
|
static void |
deregisterMonitorProvider(MonitorProvider<? extends MonitorProviderCfg> monitorProvider)
Deregisters the specified monitor provider from the Directory Server.
|
static void |
deregisterNameForm(NameForm nameForm)
Deregisters the provided name form with the Directory Server.
|
static void |
deregisterObjectClass(ObjectClass objectClass)
Deregisters the provided objectclass with the Directory Server.
|
static void |
deregisterPasswordGenerator(DN configEntryDN)
Deregisters the provided password generator for use with the Directory
Server.
|
static void |
deregisterPasswordStorageScheme(DN configEntryDN)
Deregisters the specified password storage scheme with the Directory
Server.
|
static void |
deregisterPasswordValidator(DN configEntryDN)
Deregisters the provided password validator for use with the Directory
Server.
|
static void |
deregisterPersistentSearch()
Deregisters a canceled persistent search.
|
static void |
deregisterRestoreTaskListener(RestoreTaskListener listener)
Deregisters the provided restore task listener with the Directory Server.
|
static void |
deregisterRetentionPolicy(DN configEntryDN)
Deregisters the provided log retention policy with the Directory Server.
|
static void |
deregisterRootDN(DN rootDN)
Deregisters the provided root DN with the Directory Server.
|
static void |
deregisterRotationPolicy(DN configEntryDN)
Deregisters the provided log rotation policy with the Directory Server.
|
static void |
deregisterSASLMechanismHandler(String name)
Deregisters the provided SASL mechanism handler with the Directory Server.
|
static void |
deregisterShutdownListener(ServerShutdownListener listener)
Deregisters the provided shutdown listener with the Directory Server.
|
static void |
deregisterSupportedControl(String controlOID)
Deregisters the provided OID as a supported control for the Directory
Server.
|
static void |
deregisterSupportedExtension(String oid)
Deregisters the provided extended operation handler with the Directory
Server.
|
static void |
deregisterSupportedFeature(String featureOID)
Deregisters the provided OID as a supported feature for the Directory
Server.
|
static void |
deregisterSupportedLDAPVersion(int supportedLDAPVersion,
ConnectionHandler connectionHandler)
Deregisters the provided LDAP protocol version as supported within the
Directory Server.
|
static void |
deregisterSynchronizationProvider(SynchronizationProvider provider)
Deregisters the provided synchronization provider with the Directory
Server.
|
static void |
deregisterTrustManagerProvider(DN providerDN)
Deregisters the specified trust manager provider with the Directory Server.
|
static void |
deregisterVirtualAttribute(VirtualAttributeRule rule)
Deregisters the provided virtual attribute rule with the Directory Server.
|
static void |
enqueueRequest(Operation operation)
Adds the provided operation to the work queue so that it will be processed
by one of the worker threads.
|
static boolean |
entryExists(DN entryDN)
Indicates whether the specified entry exists in the Directory Server.
|
static AccountStatusNotificationHandler |
getAccountStatusNotificationHandler(DN handlerDN)
Retrieves the account status notification handler with the specified
configuration entry DN.
|
static ConcurrentMap<DN,AccountStatusNotificationHandler> |
getAccountStatusNotificationHandlers()
Retrieves the set of account status notification handlers defined in the
Directory Server, as a mapping between the DN of the configuration entry
and the notification handler implementation.
|
static DN |
getActualRootBindDN(DN alternateRootBindDN)
Retrieves the real entry DN for the root user with the provided alternate
bind DN.
|
static List<AlertHandler> |
getAlertHandlers()
Retrieves the set of alert handlers that have been registered with the
Directory Server.
|
Map<String,String> |
getAlerts()
Retrieves information about the set of alerts that this generator may
produce.
|
static Set<String> |
getAllowedTasks()
Retrieves a set containing the names of the allowed tasks that may be
invoked in the server.
|
static ConcurrentMap<DN,DN> |
getAlternateRootBindDNs()
Retrieves the set of alternate bind DNs for root users, mapped between the
alternate DN and the real DN.
|
static ConcurrentMap<String,org.forgerock.opendj.ldap.schema.Syntax> |
getAttributeSyntaxes()
Retrieves the set of attribute syntaxes defined in the Directory Server.
|
static AttributeType |
getAttributeTypeOrDefault(String lowerName)
Retrieves the attribute type for the provided lowercase name or OID.
|
static AttributeType |
getAttributeTypeOrDefault(String lowerName,
String upperName)
Retrieves the attribute type for the provided lowercase name or OID.
|
static AttributeType |
getAttributeTypeOrDefault(String lowerName,
String upperName,
org.forgerock.opendj.ldap.schema.Syntax syntax)
Retrieves the attribute type for the provided lowercase name or OID.
|
static AttributeType |
getAttributeTypeOrNull(String lowerName)
Retrieves the attribute type for the provided lowercase name or OID.
|
static ConcurrentMap<String,AttributeType> |
getAttributeTypes()
Retrieves the set of attribute type definitions that have been
defined in the Directory Server.
|
static AuthenticatedUsers |
getAuthenticatedUsers()
Retrieves the authenticated users manager for the Directory Server.
|
static Collection<AuthenticationPolicy> |
getAuthenticationPolicies()
Returns an unmodifiable collection containing all of the authentication
policies registered with the Directory Server.
|
static AuthenticationPolicy |
getAuthenticationPolicy(DN configEntryDN)
Retrieves the authentication policy registered for the provided
configuration entry.
|
static PasswordStorageScheme |
getAuthPasswordStorageScheme(String name)
Retrieves the specified authentication password storage scheme.
|
static ConcurrentHashMap<String,PasswordStorageScheme> |
getAuthPasswordStorageSchemes()
Retrieves the set of authentication password storage schemes defined in the
Directory Server, as a mapping between the scheme name and the
corresponding implementation.
|
static Backend<?> |
getBackend(DN entryDN)
Retrieves the backend that should be used to handle operations on the
specified entry.
|
static Backend<?> |
getBackend(String backendID)
Retrieves the backend with the specified backend ID.
|
static Set<BackendInitializationListener> |
getBackendInitializationListeners()
Retrieves the set of backend initialization listeners that have been
registered with the Directory Server.
|
static Map<String,Backend> |
getBackends()
Retrieves the set of backends that have been registered with the Directory
Server, as a mapping between the backend ID and the corresponding backend.
|
static Backend<?> |
getBackendWithBaseDN(DN baseDN)
Retrieves the backend with the specified base DN.
|
static Map<DN,Backend> |
getBaseDNs()
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.
|
static CertificateMapper |
getCertificateMapper(DN mapperDN)
Retrieves the certificate mapper registered with the provided entry DN.
|
static Map<DN,CertificateMapper> |
getCertificateMappers()
Retrieves the set of certificate mappers registered with the Directory
Server.
|
static ClassLoader |
getClassLoader()
Gets the class loader to be used with this directory server
application.
|
String |
getClassName()
Retrieves the fully-qualified name of the Java class for this alert
generator implementation.
|
DN |
getComponentEntryDN()
Retrieves the DN of the configuration entry with which this alert generator
is associated.
|
static ConfigEntry |
getConfigEntry(DN entryDN)
Retrieves the requested entry from the Directory Server configuration.
|
static String |
getConfigFile()
Retrieves the path to the configuration file used to initialize the
Directory Server.
|
static ConfigHandler |
getConfigHandler()
Retrieves a reference to the Directory Server configuration handler.
|
static List<ConnectionHandler> |
getConnectionHandlers()
Retrieves the set of connection handlers configured in the Directory
Server.
|
static CryptoManagerImpl |
getCryptoManager()
Retrieves a reference to the Directory Server crypto manager.
|
static long |
getCurrentConnections()
Retrieves the number of client connections that are currently established.
|
static org.forgerock.opendj.ldap.schema.Syntax |
getDefaultAttributeSyntax()
Retrieves the default attribute syntax that should be used for attributes
that are not defined in the server schema.
|
static AttributeType |
getDefaultAttributeType(String name,
org.forgerock.opendj.ldap.schema.Syntax syntax)
Causes the Directory Server to construct a new attribute type definition
with the provided name and syntax.
|
static ObjectClass |
getDefaultAuxiliaryObjectClass(String name)
Causes the Directory Server to construct a new auxiliary objectclass
definition with the provided name and with no required or allowed
attributes.
|
static org.forgerock.opendj.ldap.schema.Syntax |
getDefaultBinarySyntax()
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
values.
|
static org.forgerock.opendj.ldap.schema.Syntax |
getDefaultBooleanSyntax()
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
values.
|
static CompressedSchema |
getDefaultCompressedSchema()
Retrieves the default compressed schema manager for the Directory Server.
|
static org.forgerock.opendj.ldap.schema.Syntax |
getDefaultDNSyntax()
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.
|
static org.forgerock.opendj.ldap.schema.Syntax |
getDefaultIntegerSyntax()
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
values.
|
static ObjectClass |
getDefaultObjectClass(String name)
Causes the Directory Server to construct a new objectclass
definition with the provided name and with no required or allowed
attributes.
|
static PasswordPolicy |
getDefaultPasswordPolicy()
Retrieves the default password policy for the Directory Server.
|
static DN |
getDefaultPasswordPolicyDN()
Retrieves the DN of the configuration entry for the default password policy
for the Directory Server.
|
static org.forgerock.opendj.ldap.schema.Syntax |
getDefaultStringSyntax()
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
values.
|
static Set<Privilege> |
getDisabledPrivileges()
Retrieves the set of privileges that have been disabled.
|
static DITContentRule |
getDITContentRule(ObjectClass objectClass)
Retrieves the DIT content rule associated with the specified objectclass.
|
static ConcurrentMap<ObjectClass,DITContentRule> |
getDITContentRules()
Retrieves the set of DIT content rules defined in the Directory Server.
|
static DITStructureRule |
getDITStructureRule(int ruleID)
Retrieves the DIT structure rule associated with the provided rule ID.
|
static DITStructureRule |
getDITStructureRule(NameForm nameForm)
Retrieves the DIT structure rule associated with the provided name form.
|
static ConcurrentMap<NameForm,DITStructureRule> |
getDITStructureRules()
Retrieves the set of DIT structure rules defined in the Directory Server.
|
static Entry |
getEntry(DN entryDN)
Retrieves the entry with the requested DN.
|
static EntryCache |
getEntryCache()
Retrieves the entry cache for the Directory Server.
|
static DirectoryEnvironmentConfig |
getEnvironmentConfig()
Retrieves the environment configuration for the Directory Server.
|
static ExtendedOperationHandler |
getExtendedOperationHandler(String oid)
Retrieves the handler for the extended operation for the provided OID.
|
static GroupManager |
getGroupManager()
Retrieves the Directory Server group manager.
|
static IdentityMapper |
getIdentityMapper(DN configEntryDN)
Retrieves the Directory Server identity mapper whose configuration resides
in the specified configuration entry.
|
static ConcurrentMap<DN,IdentityMapper> |
getIdentityMappers()
Retrieves the set of identity mappers defined in the Directory Server
configuration, as a mapping between the DN of the configuration entry and
the identity mapper.
|
static long |
getIdleTimeLimit()
Retrieves the maximum length of time in milliseconds that client
connections should be allowed to remain idle without being disconnected.
|
static DirectoryServer |
getInstance()
Retrieves the instance of the Directory Server that is associated with this
JVM.
|
static String |
getInstanceRoot()
Retrieves the path to the instance directory for this instance of the
Directory Server.
|
static JMXMBean |
getJMXMBean(DN configEntryDN)
Retrieves the JMX MBean associated with the specified entry in the
Directory Server configuration.
|
static ConcurrentHashMap<DN,JMXMBean> |
getJMXMBeans()
Retrieves the set of JMX MBeans that are associated with the server.
|
static MBeanServer |
getJMXMBeanServer()
Retrieves a reference to the JMX MBean server that is associated with the
Directory Server.
|
static KeyManagerProvider |
getKeyManagerProvider(DN providerDN)
Retrieves the key manager provider registered with the provided entry DN.
|
static Map<DN,KeyManagerProvider> |
getKeyManagerProviders()
Retrieves the set of key manager providers registered with the Directory
Server.
|
static LockManager |
getLockManager()
Returns the lock manager which will be used for coordinating access to LDAP entries.
|
static int |
getLookthroughLimit()
Retrieves the default maximum number of entries that should checked for
matches during a search.
|
static List<Properties> |
getMailServerPropertySets()
Retrieves the sets of information about the mail servers configured for use
by the Directory Server.
|
static org.forgerock.opendj.ldap.schema.MatchingRule |
getMatchingRule(String lowerName)
Retrieves the matching rule with the specified name or OID.
|
static ConcurrentMap<String,org.forgerock.opendj.ldap.schema.MatchingRule> |
getMatchingRules()
Retrieves the set of matching rules registered with the Directory Server.
|
static MatchingRuleUse |
getMatchingRuleUse(org.forgerock.opendj.ldap.schema.MatchingRule matchingRule)
Retrieves the matching rule use associated with the provided matching rule.
|
static ConcurrentMap<org.forgerock.opendj.ldap.schema.MatchingRule,MatchingRuleUse> |
getMatchingRuleUses()
Retrieves the set of matching rule uses defined in the Directory Server.
|
static long |
getMaxAllowedConnections()
Retrieves the maximum number of concurrent client connections that may be
established.
|
static long |
getMaxConnections()
Retrieves the maximum number of client connections that have been
established concurrently.
|
static int |
getMaxInternalBufferSize()
Returns the threshold capacity beyond which internal cached buffers used
for encoding and decoding entries and protocol messages will be trimmed
after use.
|
static MonitorProvider<? extends MonitorProviderCfg> |
getMonitorProvider(String lowerName)
Retrieves the monitor provider with the specified name.
|
static DN |
getMonitorProviderDN(MonitorProvider provider)
Construct the DN of a monitor provider entry.
|
static ConcurrentMap<String,MonitorProvider<? extends MonitorProviderCfg>> |
getMonitorProviders()
Retrieves the set of monitor providers that have been registered with the
Directory Server, as a mapping between the monitor name (in all lowercase
characters) and the monitor implementation.
|
static List<NameForm> |
getNameForm(ObjectClass objectClass)
Retrieves the name forms associated with the specified objectclass.
|
static NameForm |
getNameForm(String lowerName)
Retrieves the name form associated with the specified name or OID.
|
static ConcurrentMap<ObjectClass,List<NameForm>> |
getNameForms()
Retrieves the set of name forms defined in the Directory Server.
|
static ObjectClass |
getObjectClass(String lowerName)
Retrieves the objectclass for the provided lowercase name or OID.
|
static ObjectClass |
getObjectClass(String lowerName,
boolean returnDefault)
Retrieves the objectclass for the provided lowercase name or OID.
|
static AttributeType |
getObjectClassAttributeType()
Retrieves the attribute type for the "objectClass" attribute.
|
static ConcurrentMap<String,ObjectClass> |
getObjectClasses()
Retrieves the set of objectclasses defined in the Directory Server.
|
static List<Modification> |
getOfflineSchemaChanges()
Retrieves a list of modifications detailing any schema changes that may
have been made with the server offline (e.g., by directly editing the
schema configuration files).
|
static com.forgerock.opendj.util.OperatingSystem |
getOperatingSystem()
Retrieves the operating system on which the Directory Server is running.
|
static PasswordGenerator |
getPasswordGenerator(DN configEntryDN)
Retrieves the password generator registered with the provided configuration
entry DN.
|
static ConcurrentMap<DN,PasswordGenerator> |
getPasswordGenerators()
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
generator configuration entry and the generator implementation.
|
static PasswordStorageScheme |
getPasswordStorageScheme(DN configEntryDN)
Retrieves the password storage scheme defined in the specified
configuration entry.
|
static PasswordStorageScheme |
getPasswordStorageScheme(String lowerName)
Retrieves the specified password storage scheme.
|
static ConcurrentHashMap<String,PasswordStorageScheme> |
getPasswordStorageSchemes()
Retrieves the set of password storage schemes defined in the Directory
Server, as a mapping between the all-lowercase scheme name and the
corresponding implementation.
|
static PasswordValidator<? extends PasswordValidatorCfg> |
getPasswordValidator(DN configEntryDN)
Retrieves the password validator registered with the provided configuration
entry DN.
|
static ConcurrentMap<DN,PasswordValidator<? extends PasswordValidatorCfg>> |
getPasswordValidators()
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
validator configuration entry and the validator implementation.
|
static PluginConfigManager |
getPluginConfigManager()
Retrieves a reference to the Directory Server plugin configuration manager.
|
static Map<DN,Backend> |
getPrivateNamingContexts()
Retrieves the set of private naming contexts defined in the Directory
Server, mapped from the naming context DN to the corresponding backend.
|
static IdentityMapper |
getProxiedAuthorizationIdentityMapper()
Retrieves the identity mapper that should be used to resolve authorization
IDs contained in proxied authorization V2 controls.
|
static DN |
getProxiedAuthorizationIdentityMapperDN()
Retrieves the DN of the configuration entry for the identity mapper that
should be used in conjunction with proxied authorization V2 controls.
|
static Map<DN,Backend> |
getPublicNamingContexts()
Retrieves the set of public naming contexts defined in the Directory
Server, mapped from the naming context DN to the corresponding backend.
|
static RetentionPolicy |
getRetentionPolicy(DN configEntryDN)
Retrieves the log retention policy registered for the provided
configuration entry.
|
static Set<DN> |
getRootDNs()
Retrieves the DNs for the root users configured in the Directory Server.
|
static Entry |
getRootDSE()
Retrieves the root DSE entry for the Directory Server.
|
static RootDSEBackend |
getRootDSEBackend()
Retrieves the root DSE backend for the Directory Server.
|
static Set<Privilege> |
getRootPrivileges()
Retrieves the set of privileges that should automatically be granted to
root users when they authenticate.
|
static RotationPolicy |
getRotationPolicy(DN configEntryDN)
Retrieves the log rotation policy registered for the provided configuration
entry.
|
static SASLMechanismHandler |
getSASLMechanismHandler(String name)
Retrieves the handler for the specified SASL mechanism.
|
static Schema |
getSchema()
Retrieves a reference to the Directory Server schema.
|
static DN |
getSchemaDN()
Retrieves the DN of the entry containing the server schema definitions.
|
ServerContext |
getServerContext()
Returns the server context.
|
static org.forgerock.opendj.ldap.ResultCode |
getServerErrorResultCode()
Retrieves the result code that should be used when the Directory Server
encounters an internal server error.
|
static String |
getServerRoot()
Retrieves the path to the root directory for this instance of the Directory
Server.
|
static AcceptRejectWarn |
getSingleStructuralObjectClassPolicy()
Retrieves the policy that should be used regarding enforcement of a single
structural objectclass per entry.
|
static int |
getSizeLimit()
Retrieves the default maximum number of entries that should be returned for
a search.
|
static long |
getStartTime()
Retrieves the time that the Directory Server was started, in milliseconds
since the epoch.
|
static String |
getStartTimeUTC()
Retrieves the time that the Directory Server was started, formatted in UTC.
|
static SubentryManager |
getSubentryManager()
Retrieves the Directory Server subentry manager.
|
static TreeSet<String> |
getSupportedControls()
Retrieves the set of supported controls registered with the Directory
Server.
|
static ConcurrentMap<String,ExtendedOperationHandler> |
getSupportedExtensions()
Retrieves the set of extended operations that may be processed by the
Directory Server.
|
static TreeSet<String> |
getSupportedFeatures()
Retrieves the set of supported features registered with the Directory
Server.
|
static Set<Integer> |
getSupportedLDAPVersions()
Retrieves the supported LDAP versions for the Directory Server.
|
static ConcurrentMap<String,SASLMechanismHandler> |
getSupportedSASLMechanisms()
Retrieves the set of SASL mechanisms that are supported by the Directory
Server.
|
static List<SynchronizationProvider<SynchronizationProviderCfg>> |
getSynchronizationProviders()
Retrieves the set of synchronization providers that have been registered
with the Directory Server.
|
static AcceptRejectWarn |
getSyntaxEnforcementPolicy()
Retrieves the policy that should be used when an attribute value is found
that is not valid according to the associated attribute syntax.
|
static int |
getTimeLimit()
Retrieves the default maximum length of time in seconds that should be
allowed when processing a search.
|
static ObjectClass |
getTopObjectClass()
Retrieves the "top" objectClass, which should be the topmost objectclass in
the inheritance chain for most other objectclasses.
|
static long |
getTotalConnections()
Retrieves the total number of client connections that have been established
since the Directory Server started.
|
static TrustManagerProvider |
getTrustManagerProvider(DN providerDN)
Retrieves the trust manager provider registered with the provided entry DN.
|
static Map<DN,TrustManagerProvider> |
getTrustManagerProviders()
Retrieves the set of trust manager providers registered with the Directory
Server.
|
static boolean |
getUseNanoTime()
Retrieves whether operation processing times should be collected with
nanosecond resolution.
|
static String |
getVersionString()
Retrieves the full version string for the Directory Server.
|
static Collection<VirtualAttributeRule> |
getVirtualAttributes()
Retrieves the set of virtual attribute rules registered with the Directory
Server.
|
static List<VirtualAttributeRule> |
getVirtualAttributes(Entry entry)
Retrieves the set of virtual attribute rules registered with the Directory
Server that are applicable to the provided entry.
|
static WorkQueue |
getWorkQueue()
Retrieves a reference to the Directory Server work queue.
|
static WritabilityMode |
getWritabilityMode()
Retrieves the writability mode for the Directory Server.
|
static boolean |
hasBackend(String backendID)
Indicates whether the Directory Server has a backend with the specified
backend ID.
|
void |
initializeAuthenticatedUsers()
Initializes authenticated users.
|
void |
initializeAuthenticationPolicyComponents()
Initializes the set of authentication policy components for use by the
Directory Server.
|
void |
initializeConfiguration()
Instantiates the configuration handler and loads the Directory Server
configuration.
|
void |
initializeConfiguration(String configClass,
String configFile)
Instantiates the configuration handler and loads the Directory Server
configuration.
|
void |
initializeCryptoManager()
Initializes the crypto manager for the Directory Server.
|
static void |
initializeJMX()
Performs a minimal set of JMX initialization.
|
void |
initializePlugins(Set<PluginType> pluginTypes)
Initializes the set of plugins defined in the Directory Server.
|
void |
initializeRootDNConfigManager()
Initializes the root DN Config Manager in the Directory Server.
|
void |
initializeRootDSE()
Initialize the root DSE in the Directory Server.
|
void |
initializeSchema()
Initializes the schema elements for the Directory Server, including the
matching rules, attribute syntaxes, attribute types, and object classes.
|
void |
initializeSubentryManager()
Initializes the subentry manager for the Directory Server.
|
static boolean |
isDisabled(Privilege privilege)
Indicates whether the specified privilege is disabled.
|
static boolean |
isNamingContext(DN dn)
Indicates whether the specified DN is one of the Directory Server naming
contexts.
|
static boolean |
isRootDN(DN userDN)
Indicates whether the provided DN is the DN for one of the root users
configured in the Directory Server.
|
static boolean |
isRunning()
Indicates whether the Directory Server is currently running.
|
static boolean |
isRunningAsWindowsService()
Returns true if this server is configured to run as a windows service.
|
boolean |
isShuttingDown()
Indicates whether the server is currently in the process of shutting down.
|
static boolean |
isSupportedControl(String controlOID)
Indicates whether the specified OID is registered with the Directory Server
as a supported control.
|
static boolean |
isSupportedFeature(String featureOID)
Indicates whether the specified OID is registered with the Directory Server
as a supported feature.
|
static Class<?> |
loadClass(String name)
Loads the named class using this directory server application's
class loader.
|
static boolean |
lockdownMode()
Indicates whether the Directory Server is currently configured to operate
in the lockdown mode, in which all non-root requests will be rejected and
all connection attempts from non-loopback clients will be rejected.
|
static boolean |
mailServerConfigured()
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.
|
static void |
main(String[] args)
Parses the provided command-line arguments and uses that information to
bootstrap and start the Directory Server.
|
static long |
newConnectionAccepted(ClientConnection clientConnection)
Indicates that a new connection has been accepted and increments the
associated counters.
|
static boolean |
notifyAbandonedOperations()
Indicates whether the Directory Server should send a response to an
operation that has been abandoned.
|
static void |
notifyBackupBeginning(Backend<?> backend,
BackupConfig config)
Notifies the registered backup task listeners that the server will be
beginning a backup task with the provided information.
|
static void |
notifyBackupEnded(Backend<?> backend,
BackupConfig config,
boolean successful)
Notifies the registered backup task listeners that the server has completed
processing on a backup task with the provided information.
|
static void |
notifyExportBeginning(Backend<?> backend,
LDIFExportConfig config)
Notifies the registered LDIF export task listeners that the server will be
beginning an export task with the provided information.
|
static void |
notifyExportEnded(Backend<?> backend,
LDIFExportConfig config,
boolean successful)
Notifies the registered LDIF export task listeners that the server has
completed processing on an export task with the provided information.
|
static void |
notifyImportBeginning(Backend<?> backend,
LDIFImportConfig config)
Notifies the registered LDIF import task listeners that the server will be
beginning an import task with the provided information.
|
static void |
notifyImportEnded(Backend<?> backend,
LDIFImportConfig config,
boolean successful)
Notifies the registered LDIF import task listeners that the server has
completed processing on an import task with the provided information.
|
static void |
notifyRestoreBeginning(Backend<?> backend,
RestoreConfig config)
Notifies the registered restore task listeners that the server will be
beginning a restore task with the provided information.
|
static void |
notifyRestoreEnded(Backend<?> backend,
RestoreConfig config,
boolean successful)
Notifies the registered restore task listeners that the server has
completed processing on a restore task with the provided information.
|
static void |
printVersion(OutputStream outputStream)
Prints out the version string for the Directory Server.
|
static void |
registerAccountStatusNotificationHandler(DN handlerDN,
AccountStatusNotificationHandler handler)
Registers the provided account status notification handler with the
Directory Server.
|
static void |
registerAlertGenerator(AlertGenerator alertGenerator)
Registers the provided alert generator with the Directory Server.
|
static void |
registerAlertHandler(AlertHandler alertHandler)
Registers the provided alert handler with the Directory Server.
|
static void |
registerAlternateRootDN(DN actualRootEntryDN,
DN alternateRootBindDN)
Registers an alternate root bind DN using the provided information.
|
static void |
registerAttributeType(AttributeType attributeType,
boolean overwriteExisting)
Registers the provided attribute type with the Directory Server.
|
static void |
registerAuthenticationPolicy(DN configEntryDN,
AuthenticationPolicy policy)
Registers the provided authentication policy with the Directory Server.
|
static void |
registerBackend(Backend<?> backend)
Registers the provided backend with the Directory Server.
|
static void |
registerBackendInitializationListener(BackendInitializationListener listener)
Registers the provided backend initialization listener with the Directory
Server.
|
static void |
registerBackupTaskListener(BackupTaskListener listener)
Registers the provided backup task listener with the Directory Server.
|
static void |
registerBaseDN(DN baseDN,
Backend<?> backend,
boolean isPrivate)
Registers the provided base DN with the server.
|
static void |
registerCertificateMapper(DN mapperDN,
CertificateMapper mapper)
Registers the provided certificate mapper with the Directory Server.
|
static void |
registerConnectionHandler(ConnectionHandler<? extends ConnectionHandlerCfg> handler)
Registers the provided connection handler with the Directory Server.
|
static void |
registerDITContentRule(DITContentRule ditContentRule,
boolean overwriteExisting)
Registers the provided DIT content rule with the Directory Server.
|
static void |
registerDITStructureRule(DITStructureRule ditStructureRule,
boolean overwriteExisting)
Registers the provided DIT structure rule with the Directory Server.
|
static void |
registerExportTaskListener(ExportTaskListener listener)
Registers the provided LDIF export task listener with the Directory Server.
|
static void |
registerIdentityMapper(DN configEntryDN,
IdentityMapper identityMapper)
Registers the provided identity mapper for use with the Directory Server.
|
static void |
registerImportTaskListener(ImportTaskListener listener)
Registers the provided LDIF import task listener with the Directory Server.
|
static void |
registerInitializationCompletedListener(InitializationCompletedListener listener)
Registers the provided initialization completed listener with the
Directory Server so that it will be notified when the server
initialization completes.
|
static void |
registerInternalPlugin(InternalDirectoryServerPlugin plugin)
Registers the provided internal plugin with the Directory Server
and ensures that it will be invoked in the specified ways.
|
static void |
registerInvokableComponent(InvokableComponent component)
Registers the provided invokable component with the Directory Server.
|
static void |
registerKeyManagerProvider(DN providerDN,
KeyManagerProvider provider)
Registers the provided key manager provider with the Directory Server.
|
static void |
registerMatchingRule(org.forgerock.opendj.ldap.schema.MatchingRule matchingRule,
boolean overwriteExisting)
Registers the provided matching rule with the Directory Server.
|
static void |
registerMatchingRuleUse(MatchingRuleUse matchingRuleUse,
boolean overwriteExisting)
Registers the provided matching rule use with the Directory Server.
|
static void |
registerMonitorProvider(MonitorProvider<? extends MonitorProviderCfg> monitorProvider)
Registers the provided monitor provider with the Directory Server.
|
static void |
registerNameForm(NameForm nameForm,
boolean overwriteExisting)
Registers the provided name form with the Directory Server.
|
static void |
registerObjectClass(ObjectClass objectClass,
boolean overwriteExisting)
Registers the provided objectclass with the Directory Server.
|
static void |
registerPasswordGenerator(DN configEntryDN,
PasswordGenerator generator)
Registers the provided password generator for use with the Directory
Server.
|
static void |
registerPasswordStorageScheme(DN configEntryDN,
PasswordStorageScheme scheme)
Registers the provided password storage scheme with the Directory Server.
|
static void |
registerPasswordValidator(DN configEntryDN,
PasswordValidator<? extends PasswordValidatorCfg> validator)
Registers the provided password validator for use with the Directory
Server.
|
static void |
registerPersistentSearch()
Registers a new persistent search by increasing the count
of active persistent searches.
|
static void |
registerRestoreTaskListener(RestoreTaskListener listener)
Registers the provided restore task listener with the Directory Server.
|
static void |
registerRetentionPolicy(DN configEntryDN,
RetentionPolicy policy)
Registers the provided log retention policy with the Directory Server.
|
static void |
registerRootDN(DN rootDN)
Registers the provided root DN with the Directory Server.
|
static void |
registerRotationPolicy(DN configEntryDN,
RotationPolicy policy)
Registers the provided log rotation policy with the Directory Server.
|
static void |
registerSASLMechanismHandler(String name,
SASLMechanismHandler handler)
Registers the provided SASL mechanism handler with the Directory Server.
|
static void |
registerShutdownListener(ServerShutdownListener listener)
Registers the provided shutdown listener with the Directory Server so that
it will be notified when the server shuts down.
|
static void |
registerSupportedControl(String controlOID)
Registers the provided OID as a supported control for the Directory Server.
|
static void |
registerSupportedExtension(String oid,
ExtendedOperationHandler handler)
Registers the provided extended operation handler with the Directory
Server.
|
static void |
registerSupportedFeature(String featureOID)
Registers the provided OID as a supported feature for the Directory Server.
|
static void |
registerSupportedLDAPVersion(int supportedLDAPVersion,
ConnectionHandler connectionHandler)
Registers the provided LDAP protocol version as supported within the
Directory Server.
|
static void |
registerSynchronizationProvider(SynchronizationProvider<SynchronizationProviderCfg> provider)
Registers the provided synchronization provider with the Directory Server.
|
static void |
registerTrustManagerProvider(DN providerDN,
TrustManagerProvider provider)
Registers the provided trust manager provider with the Directory Server.
|
static void |
registerVirtualAttribute(VirtualAttributeRule rule)
Registers the provided virtual attribute rule with the Directory Server.
|
static DirectoryServer |
reinitialize()
Reinitializes the server following a shutdown, preparing it for a call to
startServer . |
static DirectoryServer |
reinitialize(DirectoryEnvironmentConfig config)
Reinitializes the server following a shutdown, preparing it for a call to
startServer . |
static boolean |
rejectUnauthenticatedRequests()
Indicates whether an unauthenticated request should be rejected.
|
static void |
restart(String className,
LocalizableMessage reason)
Causes the Directory Server to perform an in-core restart.
|
static void |
restart(String className,
LocalizableMessage reason,
DirectoryEnvironmentConfig config)
Causes the Directory Server to perform an in-core restart.
|
static boolean |
returnBindErrorMessages()
Indicates whether responses to failed bind operations should include a
message explaining the reason for the failure.
|
static boolean |
saveConfigOnSuccessfulStartup()
Indicates whether the Directory Server should save a copy of its
configuration whenever it is started successfully.
|
static void |
sendAlertNotification(AlertGenerator generator,
String alertType,
LocalizableMessage alertMessage)
Sends an alert notification with the provided information.
|
static void |
setAddMissingRDNAttributes(boolean addMissingRDNAttributes)
Specifies whether the Directory Server should automatically add missing RDN
attributes to an entry whenever it is added.
|
static void |
setAllowAttributeNameExceptions(boolean allowAttributeNameExceptions)
Specifies whether to be more flexible in the set of characters allowed for
attribute names.
|
static void |
setAllowedTasks(Set<String> allowedTasks)
Specifies the set of allowed tasks that may be invoked in the server.
|
static void |
setBindWithDNRequiresPassword(boolean bindWithDNRequiresPassword)
Specifies whether simple bind requests that contain a bind DN will also be
required to have a password.
|
static void |
setCheckSchema(boolean checkSchema)
Specifies whether the Directory Server should perform schema checking.
|
static void |
setDefaultPasswordPolicyDN(DN defaultPasswordPolicyDN)
Specifies the DN of the configuration entry for the default authentication
policy for the Directory Server.
|
static void |
setDisabledPrivileges(Set<Privilege> disabledPrivileges)
Specifies the set of privileges that should be disabled in the server.
|
static void |
setEntryCache(EntryCache entryCache)
Specifies the entry cache that should be used by the Directory Server.
|
void |
setEnvironmentConfig(DirectoryEnvironmentConfig config)
Sets the environment configuration for the Directory Server.
|
static void |
setIdleTimeLimit(long idleTimeLimit)
Specifies the maximum length of time in milliseconds that client
connections should be allowed to remain idle without being disconnected.
|
static void |
setLockdownMode(boolean lockdownMode)
Specifies whether the server should operate in lockdown mode.
|
static void |
setLookthroughLimit(int lookthroughLimit)
Specifies the default maximum number of entries that should be checked for
matches during a search.
|
static void |
setMailServerPropertySets(List<Properties> mailServerPropertySets)
Specifies the set of mail server properties that should be used for SMTP
communication.
|
static void |
setMaxAllowedConnections(long maxAllowedConnections)
Specifies the maximum number of concurrent client connections that may be
established.
|
static void |
setMaxInternalBufferSize(int maxInternalBufferSize)
Sets the threshold capacity beyond which internal cached buffers used for
encoding and decoding entries and protocol messages will be trimmed after
use.
|
static void |
setMaxPersistentSearchLimit(int maxPSearches)
Specifies the maximum number of simultaneous persistent
searches that are allowed.
|
static void |
setNotifyAbandonedOperations(boolean notifyAbandonedOperations)
Specifies whether the Directory Server should send a response to an
operation that has been abandoned.
|
static void |
setOfflineSchemaChanges(List<Modification> offlineSchemaChanges)
Specifies a list of modifications detailing any schema changes that may
have been made with the server offline.
|
static void |
setProxiedAuthorizationIdentityMapperDN(DN proxiedAuthorizationIdentityMapperDN)
Specifies the DN of the configuration entry for the identity mapper that
should be used in conjunction with proxied authorization V2 controls.
|
static void |
setRejectUnauthenticatedRequests(boolean rejectUnauthenticatedRequests)
Specifies whether an unauthenticated request should be rejected.
|
static void |
setReturnBindErrorMessages(boolean returnBindErrorMessages)
Specifies whether responses to failed bind operations should include a
message explaining the reason for the failure.
|
static void |
setSaveConfigOnSuccessfulStartup(boolean saveConfigOnSuccessfulStartup)
Specifies whether the Directory Server should save a copy of its
configuration whenever it is started successfully.
|
static void |
setSchema(Schema schema)
Replaces the Directory Server schema with the provided schema.
|
static void |
setSchemaDN(DN schemaDN)
Specifies the DN of the entry containing the server schema definitions.
|
static void |
setServerErrorResultCode(org.forgerock.opendj.ldap.ResultCode serverErrorResultCode)
Specifies the result code that should be used when the Directory Server
encounters an internal server error.
|
static void |
setSingleStructuralObjectClassPolicy(AcceptRejectWarn singleStructuralClassPolicy)
Specifies the policy that should be used regarding enforcement of a single
structural objectclass per entry.
|
static void |
setSizeLimit(int sizeLimit)
Specifies the default maximum number of entries that should be returned for
a search.
|
static void |
setSyntaxEnforcementPolicy(AcceptRejectWarn syntaxEnforcementPolicy)
Retrieves the policy that should be used when an attribute value is found
that is not valid according to the associated attribute syntax.
|
static void |
setTimeLimit(int timeLimit)
Specifies the default maximum length of time in seconds that should be
allowed when processing a search.
|
static void |
setToolDescription(LocalizableMessage msg)
Sets the message to be displayed on the command-line when the user asks for
the usage.
|
static void |
setUseNanoTime(boolean useNanoTime)
Specifies whether to collect nanosecond resolution processing times for
operations.
|
static void |
setWritabilityMode(WritabilityMode writabilityMode)
Specifies the writability mode for the Directory Server.
|
static void |
shutDown(String className,
LocalizableMessage reason)
Initiates the Directory Server shutdown process.
|
void |
startServer()
Starts up the Directory Server.
|
static boolean |
tryEnqueueRequest(Operation operation)
Tries to add the provided operation to the work queue if not full so that
it will be processed by one of the worker threads.
|
public static final int DEFAULT_TIMEOUT
public static DirectoryServer getInstance()
public static DirectoryEnvironmentConfig getEnvironmentConfig()
public void setEnvironmentConfig(DirectoryEnvironmentConfig config) throws InitializationException
config
- The environment configuration for the Directory Server.InitializationException
- If the Directory Server is currently
running.public ServerContext getServerContext()
public static boolean isRunning()
true
if the server is currently running, or false
if not.public static void bootstrapClient()
public static void initializeJMX() throws InitializationException
InitializationException
- If a problem occurs while attempting to
initialize the JMX subsystem.public void initializeConfiguration(String configClass, String configFile) throws InitializationException
configClass
- The fully-qualified name of the Java class that will
serve as the configuration handler for the Directory
Server.configFile
- The path to the file that will hold either the entire
server configuration or enough information to allow
the server to access the configuration in some other
repository.InitializationException
- If a problem occurs while trying to
initialize the config handler.public void initializeConfiguration() throws InitializationException
InitializationException
- If a problem occurs while trying to
initialize the config handler.public static String getConfigFile()
public void startServer() throws org.forgerock.opendj.config.server.ConfigException, InitializationException
org.forgerock.opendj.config.server.ConfigException
- If there is a problem with the Directory Server
configuration that prevents a critical component
from being instantiated.InitializationException
- If some other problem occurs while
attempting to initialize and start the
Directory Server.public void initializeAuthenticatedUsers()
public static AuthenticatedUsers getAuthenticatedUsers()
public void initializeCryptoManager() throws org.forgerock.opendj.config.server.ConfigException, InitializationException
org.forgerock.opendj.config.server.ConfigException
- If a configuration problem is identified while initializing the
crypto manager.InitializationException
- If a problem occurs while initializing the crypto manager that is
not related to the server configuration.public static CryptoManagerImpl getCryptoManager()
public static boolean mailServerConfigured()
true
if the Directory Server is configured to be able to
send e-mail messages, or false
if not.public static void setMailServerPropertySets(List<Properties> mailServerPropertySets)
mailServerPropertySets
- A list of Properties
objects that
provide information that can be used to
communicate with SMTP servers.public static List<Properties> getMailServerPropertySets()
public void initializeSchema() throws org.forgerock.opendj.config.server.ConfigException, InitializationException
org.forgerock.opendj.config.server.ConfigException
- If there is a configuration problem with any of
the schema elements.InitializationException
- If a problem occurs while initializing
the schema elements that is not related
to the server configuration.public static CompressedSchema getDefaultCompressedSchema()
public static Set<BackendInitializationListener> getBackendInitializationListeners()
public static void registerBackendInitializationListener(BackendInitializationListener listener)
listener
- The backend initialization listener to register with the
Directory Server.public static void deregisterBackendInitializationListener(BackendInitializationListener listener)
listener
- The backend initialization listener to deregister with
the Directory Server.public static GroupManager getGroupManager()
public static SubentryManager getSubentryManager()
public void initializeSubentryManager() throws InitializationException
InitializationException
- If a problem occurs while
initializing the subentry
manager.public void initializeAuthenticationPolicyComponents() throws org.forgerock.opendj.config.server.ConfigException, InitializationException
org.forgerock.opendj.config.server.ConfigException
- If there is a configuration problem with any of the
authentication policy components.InitializationException
- If a problem occurs while initializing the authentication policy
components that is not related to the server configuration.public static com.forgerock.opendj.util.OperatingSystem getOperatingSystem()
public static ConfigHandler getConfigHandler()
public void initializePlugins(Set<PluginType> pluginTypes) throws org.forgerock.opendj.config.server.ConfigException, InitializationException
pluginTypes
- The set of plugin types for the plugins to
initialize.org.forgerock.opendj.config.server.ConfigException
- If there is a configuration problem with any of
the Directory Server plugins.InitializationException
- If a problem occurs while initializing
the plugins that is not related to the
server configuration.public void initializeRootDNConfigManager() throws org.forgerock.opendj.config.server.ConfigException, InitializationException
org.forgerock.opendj.config.server.ConfigException
- If a problem occurs registering a DN.InitializationException
- If a problem occurs initializing the root
DN manager.public void initializeRootDSE() throws org.forgerock.opendj.config.server.ConfigException, InitializationException
org.forgerock.opendj.config.server.ConfigException
- If a problem occurs retrieving the root DSE backend
configuration.InitializationException
- If a problem occurs initializing the root
root DSE backend.public static PluginConfigManager getPluginConfigManager()
public static void registerInternalPlugin(InternalDirectoryServerPlugin plugin)
plugin
- The internal plugin to register with the Directory Server.
The plugin must specify a configuration entry which is
guaranteed to be unique.public static void deregisterInternalPlugin(InternalDirectoryServerPlugin plugin)
plugin
- The internal plugin to deregister from the Directory Server.public static ConfigEntry getConfigEntry(DN entryDN) throws org.forgerock.opendj.config.server.ConfigException
entryDN
- The DN of the configuration entry to retrieve.org.forgerock.opendj.config.server.ConfigException
- If a problem occurs while trying to retrieve the
requested entry.public static String getServerRoot()
public static String getInstanceRoot()
public static long getStartTime()
public static String getStartTimeUTC()
public static Schema getSchema()
public static void setSchema(Schema schema)
schema
- The new schema to use for the Directory Server.public static List<Modification> getOfflineSchemaChanges()
public static void setOfflineSchemaChanges(List<Modification> offlineSchemaChanges)
offlineSchemaChanges
- A list of modifications detailing any schema
changes that may have been made with the
server offline. It must not be null
.public static ConcurrentMap<String,org.forgerock.opendj.ldap.schema.MatchingRule> getMatchingRules()
public static org.forgerock.opendj.ldap.schema.MatchingRule getMatchingRule(String lowerName)
lowerName
- The lowercase name or OID for the matching rule to
retrieve.null
if no such
matching rule has been defined in the server.public static void registerMatchingRule(org.forgerock.opendj.ldap.schema.MatchingRule matchingRule, boolean overwriteExisting) throws DirectoryException
matchingRule
- The matching rule to register with the server.overwriteExisting
- Indicates whether to overwrite an existing
mapping if there are any conflicts (i.e.,
another matching rule with the same OID or
name).DirectoryException
- If a conflict is encountered and the
overwriteExisting
flag is set to
false
public static void deregisterMatchingRule(org.forgerock.opendj.ldap.schema.MatchingRule matchingRule)
matchingRule
- The matching rule to deregister with the server.public static ConcurrentMap<String,ObjectClass> getObjectClasses()
public static ObjectClass getObjectClass(String lowerName)
lowerName
- The lowercase name or OID for the objectclass to
retrieve.null
if there is no
such objectclass defined in the server schema.public static ObjectClass getObjectClass(String lowerName, boolean returnDefault)
lowerName
- The lowercase name or OID for the objectclass to
retrieve.returnDefault
- Indicates whether to generate a default version if
the requested objectclass is not defined in the
server schema.null
if there is no
objectclass with the specified name or OID defined in the server
schema and a default class should not be returned.public static void registerObjectClass(ObjectClass objectClass, boolean overwriteExisting) throws DirectoryException
objectClass
- The objectclass instance to register with the
server.overwriteExisting
- Indicates whether to overwrite an existing
mapping if there are any conflicts (i.e.,
another objectclass with the same OID or
name).DirectoryException
- If a conflict is encountered and the
overwriteExisting
flag is set to
false
public static void deregisterObjectClass(ObjectClass objectClass)
objectClass
- The objectclass instance to deregister with the
server.public static ObjectClass getTopObjectClass()
public static ObjectClass getDefaultObjectClass(String name)
name
- The name to use for the objectclass, as provided by the
user.public static ObjectClass getDefaultAuxiliaryObjectClass(String name)
name
- The name to use for the objectclass, as provided by the user.public static ConcurrentMap<String,AttributeType> getAttributeTypes()
public static AttributeType getAttributeTypeOrNull(String lowerName)
lowerName
- The lowercase attribute name or OID for the attribute
type to retrieve.null
if there is no
attribute with the specified type defined in the server schema.public static AttributeType getAttributeTypeOrDefault(String lowerName)
lowerName
- The lowercase name or OID for the attribute type to
retrieve.null
if there is no
attribute with the specified type defined in the server schema and
a default type should not be returned.public static AttributeType getAttributeTypeOrDefault(String lowerName, String upperName)
lowerName
- The lowercase name or OID for the attribute type to retrieve.upperName
- The uppercase name or OID for the attribute type to generate.public static AttributeType getAttributeTypeOrDefault(String lowerName, String upperName, org.forgerock.opendj.ldap.schema.Syntax syntax)
lowerName
- The lowercase name or OID for the attribute type to retrieve.upperName
- The uppercase name or OID for the attribute type to generate.syntax
- The syntax for the attribute type to generate.public static void registerAttributeType(AttributeType attributeType, boolean overwriteExisting) throws DirectoryException
attributeType
- The attribute type to register with the
Directory Server.overwriteExisting
- Indicates whether to overwrite an existing
mapping if there are any conflicts (i.e.,
another attribute type with the same OID or
name).DirectoryException
- If a conflict is encountered and the
overwriteExisting
flag is set to
false
public static void deregisterAttributeType(AttributeType attributeType)
attributeType
- The attribute type to deregister with the Directory
Server.public static AttributeType getObjectClassAttributeType()
public static AttributeType getDefaultAttributeType(String name, org.forgerock.opendj.ldap.schema.Syntax syntax)
TODO remove once we switch to the SDK Schema
FIXME move to Schema
?
name
- The name to use for the attribute type, as provided by the user.syntax
- The syntax to use for the attribute type.public static ConcurrentMap<String,org.forgerock.opendj.ldap.schema.Syntax> getAttributeSyntaxes()
public static org.forgerock.opendj.ldap.schema.Syntax getDefaultAttributeSyntax()
public static org.forgerock.opendj.ldap.schema.Syntax getDefaultBinarySyntax()
public static org.forgerock.opendj.ldap.schema.Syntax getDefaultBooleanSyntax()
public static org.forgerock.opendj.ldap.schema.Syntax getDefaultDNSyntax()
public static org.forgerock.opendj.ldap.schema.Syntax getDefaultIntegerSyntax()
public static org.forgerock.opendj.ldap.schema.Syntax getDefaultStringSyntax()
public static ConcurrentMap<org.forgerock.opendj.ldap.schema.MatchingRule,MatchingRuleUse> getMatchingRuleUses()
public static MatchingRuleUse getMatchingRuleUse(org.forgerock.opendj.ldap.schema.MatchingRule matchingRule)
matchingRule
- The matching rule for which to retrieve the matching
rule use.null
if none is defined.public static void registerMatchingRuleUse(MatchingRuleUse matchingRuleUse, boolean overwriteExisting) throws DirectoryException
matchingRuleUse
- The matching rule use to register with the
server.overwriteExisting
- Indicates whether to overwrite an existing
mapping if there are any conflicts (i.e.,
another matching rule use with the same matching
rule).DirectoryException
- If a conflict is encountered and the
overwriteExisting
flag is set to
false
public static void deregisterMatchingRuleUse(MatchingRuleUse matchingRuleUse)
matchingRuleUse
- The matching rule use to deregister with the
server.public static ConcurrentMap<ObjectClass,DITContentRule> getDITContentRules()
public static DITContentRule getDITContentRule(ObjectClass objectClass)
objectClass
- The objectclass for which to retrieve the associated
DIT content rule.null
if no such
rule is defined in the schema.public static void registerDITContentRule(DITContentRule ditContentRule, boolean overwriteExisting) throws DirectoryException
ditContentRule
- The DIT content rule to register with the
server.overwriteExisting
- Indicates whether to overwrite an existing
mapping if there are any conflicts (i.e.,
another DIT content rule with the same
structural objectclass).DirectoryException
- If a conflict is encountered and the
overwriteExisting
flag is set to
false
public static void deregisterDITContentRule(DITContentRule ditContentRule)
ditContentRule
- The DIT content rule to deregister with the server.public static ConcurrentMap<NameForm,DITStructureRule> getDITStructureRules()
public static DITStructureRule getDITStructureRule(int ruleID)
ruleID
- The rule ID for which to retrieve the associated DIT
structure rule.null
if no such
rule is defined.public static DITStructureRule getDITStructureRule(NameForm nameForm)
nameForm
- The name form for which to retrieve the associated DIT
structure rule.null
if no such
rule is defined.public static void registerDITStructureRule(DITStructureRule ditStructureRule, boolean overwriteExisting) throws DirectoryException
ditStructureRule
- The DIT structure rule to register with the
server.overwriteExisting
- Indicates whether to overwrite an existing
mapping if there are any conflicts (i.e.,
another DIT structure rule with the same name
form).DirectoryException
- If a conflict is encountered and the
overwriteExisting
flag is set to
false
public static void deregisterDITStructureRule(DITStructureRule ditStructureRule)
ditStructureRule
- The DIT structure rule to deregister with the
server.public static ConcurrentMap<ObjectClass,List<NameForm>> getNameForms()
public static List<NameForm> getNameForm(ObjectClass objectClass)
objectClass
- The objectclass for which to retrieve the associated
name form.null
if no such name
form is defined in the schema.public static NameForm getNameForm(String lowerName)
lowerName
- The name or OID of the name form to retrieve, formatted
in all lowercase characters.null
if no such name form
is defined in the schema.public static void registerNameForm(NameForm nameForm, boolean overwriteExisting) throws DirectoryException
nameForm
- The name form to register with the server.overwriteExisting
- Indicates whether to overwrite an existing
mapping if there are any conflicts (i.e.,
another name form with the same structural
objectclass).DirectoryException
- If a conflict is encountered and the
overwriteExisting
flag is set to
false
public static void deregisterNameForm(NameForm nameForm)
nameForm
- The name form to deregister with the server.public static Collection<VirtualAttributeRule> getVirtualAttributes()
public static List<VirtualAttributeRule> getVirtualAttributes(Entry entry)
entry
- The entry for which to retrieve the applicable virtual
attribute rules.public static void registerVirtualAttribute(VirtualAttributeRule rule)
rule
- The virtual attribute rule to be registered.public static void deregisterVirtualAttribute(VirtualAttributeRule rule)
rule
- The virtual attribute rule to be deregistered.public static MBeanServer getJMXMBeanServer()
public static ConcurrentHashMap<DN,JMXMBean> getJMXMBeans()
public static JMXMBean getJMXMBean(DN configEntryDN)
configEntryDN
- The DN of the configuration entry for which to
retrieve the associated JMX MBean.null
if there is no MBean
for the specified entry.public static void registerInvokableComponent(InvokableComponent component)
component
- The invokable component to register.public static void deregisterInvokableComponent(InvokableComponent component)
component
- The invokable component to deregister.public static void registerAlertGenerator(AlertGenerator alertGenerator)
alertGenerator
- The alert generator to register.public static void deregisterAlertGenerator(AlertGenerator alertGenerator)
alertGenerator
- The alert generator to deregister.public static List<AlertHandler> getAlertHandlers()
public static void registerAlertHandler(AlertHandler alertHandler)
alertHandler
- The alert handler to register.public static void deregisterAlertHandler(AlertHandler alertHandler)
alertHandler
- The alert handler to deregister.public static void sendAlertNotification(AlertGenerator generator, String alertType, LocalizableMessage alertMessage)
generator
- The alert generator that created the alert.alertType
- The alert type name for this alert.alertMessage
- A message (possibly null
) that canpublic static PasswordStorageScheme getPasswordStorageScheme(DN configEntryDN)
configEntryDN
- The DN of the configuration entry that defines the
password storage scheme to retrieve.null
if no such
scheme is defined.public static ConcurrentHashMap<String,PasswordStorageScheme> getPasswordStorageSchemes()
public static PasswordStorageScheme getPasswordStorageScheme(String lowerName)
lowerName
- The name of the password storage scheme to retrieve,
formatted in all lowercase characters.null
if no
such scheme is defined.public static ConcurrentHashMap<String,PasswordStorageScheme> getAuthPasswordStorageSchemes()
public static PasswordStorageScheme getAuthPasswordStorageScheme(String name)
name
- The case-sensitive name of the authentication password
storage scheme to retrieve.null
if no such scheme is defined.public static void registerPasswordStorageScheme(DN configEntryDN, PasswordStorageScheme scheme)
configEntryDN
- The DN of the configuration entry that defines the
password storage scheme.scheme
- The password storage scheme to register with the
Directory Server.public static void deregisterPasswordStorageScheme(DN configEntryDN)
configEntryDN
- The DN of the configuration entry that defines the
password storage scheme.public static ConcurrentMap<DN,PasswordValidator<? extends PasswordValidatorCfg>> getPasswordValidators()
public static PasswordValidator<? extends PasswordValidatorCfg> getPasswordValidator(DN configEntryDN)
configEntryDN
- The DN of the configuration entry for which to
retrieve the associated password validator.null
if no such
validator is defined.public static void registerPasswordValidator(DN configEntryDN, PasswordValidator<? extends PasswordValidatorCfg> validator)
configEntryDN
- The DN of the configuration entry that defines the
specified password validator.validator
- The password validator to register with the
Directory Server.public static void deregisterPasswordValidator(DN configEntryDN)
configEntryDN
- The DN of the configuration entry that defines the
password validator to deregister.public static ConcurrentMap<DN,AccountStatusNotificationHandler> getAccountStatusNotificationHandlers()
public static AccountStatusNotificationHandler getAccountStatusNotificationHandler(DN handlerDN)
handlerDN
- The DN of the configuration entry associated with the
account status notification handler to retrieve.null
if no such handler is defined in the server.public static void registerAccountStatusNotificationHandler(DN handlerDN, AccountStatusNotificationHandler handler)
handlerDN
- The DN of the configuration entry that defines the
provided account status notification handler.handler
- The account status notification handler to register with
the Directory Server.public static void deregisterAccountStatusNotificationHandler(DN handlerDN)
handlerDN
- The DN of the configuration entry for the account status
notification handler to deregister.public static ConcurrentMap<DN,PasswordGenerator> getPasswordGenerators()
public static PasswordGenerator getPasswordGenerator(DN configEntryDN)
configEntryDN
- The DN of the configuration entry for which to
retrieve the associated password generator.null
if no such
generator is defined.public static void registerPasswordGenerator(DN configEntryDN, PasswordGenerator generator)
configEntryDN
- The DN of the configuration entry that defines the
specified password generator.generator
- The password generator to register with the
Directory Server.public static void deregisterPasswordGenerator(DN configEntryDN)
configEntryDN
- The DN of the configuration entry that defines the
password generator to deregister.public static Collection<AuthenticationPolicy> getAuthenticationPolicies()
public static AuthenticationPolicy getAuthenticationPolicy(DN configEntryDN)
configEntryDN
- The DN of the configuration entry for which to retrieve the
associated authentication policy.null
if there is no such policy.public static void registerAuthenticationPolicy(DN configEntryDN, AuthenticationPolicy policy)
configEntryDN
- The DN of the configuration entry that defines the authentication
policy.policy
- The authentication policy to register with the server.public static void deregisterAuthenticationPolicy(DN configEntryDN)
configEntryDN
- The DN of the configuration entry that defines the authentication
policy to deregister.public static DN getDefaultPasswordPolicyDN()
public static void setDefaultPasswordPolicyDN(DN defaultPasswordPolicyDN)
defaultPasswordPolicyDN
- The DN of the configuration entry for the default authentication
policy for the Directory Server.public static PasswordPolicy getDefaultPasswordPolicy()
getAuthenticationPolicy
on
the DN returned from
DirectoryServer.getDefaultPasswordPolicyDN()
.public static RotationPolicy getRotationPolicy(DN configEntryDN)
configEntryDN
- The DN of the configuration entry for which to
retrieve the associated rotation policy.null
if there is no such policy.public static void registerRotationPolicy(DN configEntryDN, RotationPolicy policy)
configEntryDN
- The DN of the configuration entry that defines the
password policy.policy
- The rotation policy to register with the server.public static void deregisterRotationPolicy(DN configEntryDN)
configEntryDN
- The DN of the configuration entry that defines the
rotation policy to deregister.public static RetentionPolicy getRetentionPolicy(DN configEntryDN)
configEntryDN
- The DN of the configuration entry for which to
retrieve the associated retention policy.null
if there is no such policy.public static void registerRetentionPolicy(DN configEntryDN, RetentionPolicy policy)
configEntryDN
- The DN of the configuration entry that defines the
password policy.policy
- The retention policy to register with the server.public static void deregisterRetentionPolicy(DN configEntryDN)
configEntryDN
- The DN of the configuration entry that defines the
retention policy to deregister.public static ConcurrentMap<String,MonitorProvider<? extends MonitorProviderCfg>> getMonitorProviders()
public static MonitorProvider<? extends MonitorProviderCfg> getMonitorProvider(String lowerName)
lowerName
- The name of the monitor provider to retrieve, in all
lowercase characters.null
if none
exists with the specified name.public static void registerMonitorProvider(MonitorProvider<? extends MonitorProviderCfg> monitorProvider)
monitorProvider
- The monitor provider to register with the
Directory Server.public static void deregisterMonitorProvider(MonitorProvider<? extends MonitorProviderCfg> monitorProvider)
monitorProvider
- The monitor provider to deregister from the Directory Server.public static EntryCache getEntryCache()
public static void setEntryCache(EntryCache entryCache)
entryCache
- The entry cache for the Directory Server.public static Map<DN,KeyManagerProvider> getKeyManagerProviders()
public static KeyManagerProvider getKeyManagerProvider(DN providerDN)
providerDN
- The DN with which the key manager provider is
registered.null
if there is no such key manager provider registered
with the server.public static void registerKeyManagerProvider(DN providerDN, KeyManagerProvider provider)
providerDN
- The DN with which to register the key manager provider.provider
- The key manager provider to register with the server.public static void deregisterKeyManagerProvider(DN providerDN)
providerDN
- The DN with which the key manager provider is
registered.public static Map<DN,TrustManagerProvider> getTrustManagerProviders()
public static TrustManagerProvider getTrustManagerProvider(DN providerDN)
providerDN
- The DN with which the trust manager provider is
registered.null
if there is no such trust manager provider
registered with the server.public static void registerTrustManagerProvider(DN providerDN, TrustManagerProvider provider)
providerDN
- The DN with which to register the trust manager
provider.provider
- The trust manager provider to register with the server.public static void deregisterTrustManagerProvider(DN providerDN)
providerDN
- The DN with which the trust manager provider is
registered.public static Map<DN,CertificateMapper> getCertificateMappers()
public static CertificateMapper getCertificateMapper(DN mapperDN)
mapperDN
- The DN with which the certificate mapper is registered.null
if there is no such certificate mapper registered
with the server.public static void registerCertificateMapper(DN mapperDN, CertificateMapper mapper)
mapperDN
- The DN with which to register the certificate mapper.mapper
- The certificate mapper to register with the server.public static void deregisterCertificateMapper(DN mapperDN)
mapperDN
- The DN with which the certificate mapper is registered.public static Set<Privilege> getRootPrivileges()
public static Set<DN> getRootDNs()
public static boolean isRootDN(DN userDN)
userDN
- The user DN for which to make the determination.true
if the provided user DN is a Directory Server
root DN, or false
if not.public static void registerRootDN(DN rootDN)
rootDN
- The root DN to register with the Directory Server.public static void deregisterRootDN(DN rootDN)
rootDN
- The root DN to deregister.public static ConcurrentMap<DN,DN> getAlternateRootBindDNs()
public static DN getActualRootBindDN(DN alternateRootBindDN)
alternateRootBindDN
- The alternate root bind DN for which to
retrieve the real entry DN.null
if no such mapping has been defined.public static void registerAlternateRootDN(DN actualRootEntryDN, DN alternateRootBindDN) throws DirectoryException
actualRootEntryDN
- The actual DN for the root user's entry.alternateRootBindDN
- The alternate DN that should be interpreted as
if it were the provided actual root entry DN.DirectoryException
- If the provided alternate bind DN is already
in use for another root user.public static DN deregisterAlternateRootBindDN(DN alternateRootBindDN)
alternateRootBindDN
- The alternate root bind DN to be deregistered.null
if there was no mapping for the
provided DN.public static org.forgerock.opendj.ldap.ResultCode getServerErrorResultCode()
public static void setServerErrorResultCode(org.forgerock.opendj.ldap.ResultCode serverErrorResultCode)
serverErrorResultCode
- The result code that should be used when the
Directory Server encounters an internal
server error.public static boolean addMissingRDNAttributes()
true
if the Directory Server should automatically add
missing RDN attributes to an entry, or false
if it
should return an error to the client.public static void setAddMissingRDNAttributes(boolean addMissingRDNAttributes)
addMissingRDNAttributes
- Specifies whether the Directory Server
should automatically add missing RDN
attributes to an entry whenever it is
added.public static boolean allowAttributeNameExceptions()
true
if the server should use a more flexible
syntax for attribute names, or false
if not.public static void setAllowAttributeNameExceptions(boolean allowAttributeNameExceptions)
allowAttributeNameExceptions
- Specifies whether to be more flexible
in the set of characters allowed for
attribute names.public static boolean checkSchema()
true
if the Directory Server should perform schema
checking, or false
if not.public static void setCheckSchema(boolean checkSchema)
checkSchema
- Specifies whether the Directory Server should perform
schema checking.public static AcceptRejectWarn getSingleStructuralObjectClassPolicy()
public static void setSingleStructuralObjectClassPolicy(AcceptRejectWarn singleStructuralClassPolicy)
singleStructuralClassPolicy
- The policy that should be used
regarding enforcement of a single
structural objectclass per entry.public static AcceptRejectWarn getSyntaxEnforcementPolicy()
public static void setSyntaxEnforcementPolicy(AcceptRejectWarn syntaxEnforcementPolicy)
syntaxEnforcementPolicy
- The policy that should be used when an
attribute value is found that is not valid
according to the associated attribute
syntax.public static boolean notifyAbandonedOperations()
true
if the Directory Server should send a response
to an operation that has been abandoned, or false
if
not.public static void setNotifyAbandonedOperations(boolean notifyAbandonedOperations)
notifyAbandonedOperations
- Indicates whether the Directory Server
should send a response to an operation
that has been abandoned.public static Map<String,Backend> getBackends()
public static Backend<?> getBackend(String backendID)
backendID
- The backend ID of the backend to retrieve.null
if
there is none.public static boolean hasBackend(String backendID)
backendID
- The backend ID for which to make the determination.true
if the Directory Server has a backend with the
specified backend ID, or false
if not.public static void registerBackend(Backend<?> backend) throws DirectoryException
backend
- The backend to register with the server. Neither the
backend nor its backend ID may be null.DirectoryException
- If the backend ID for the provided backend
conflicts with the backend ID of an existing
backend.public static void deregisterBackend(Backend<?> backend)
backend
- The backend to deregister with the server. It must not be
null
.public static Map<DN,Backend> getBaseDNs()
public static Backend<?> getBackendWithBaseDN(DN baseDN)
baseDN
- The DN that is registered as one of the base DNs for the
backend to retrieve.null
if there
is no backend registered with the specified base DN.public static Backend<?> getBackend(DN entryDN)
entryDN
- The DN of the entry for which to retrieve the
corresponding backend.null
if no appropriate backend is
registered with the server.public static BaseDnRegistry copyBaseDnRegistry()
registerBaseDN(DN, Backend, boolean)
and
deregisterBaseDN(DN)
.public static void registerBaseDN(DN baseDN, Backend<?> backend, boolean isPrivate) throws DirectoryException
baseDN
- The base DN to register with the server. It must not be
null
.backend
- The backend responsible for the provided base DN. It
must not be null
.isPrivate
- Indicates whether the base DN should be considered a
private base DN. If the provided base DN is a naming
context, then this controls whether it is public or
private.DirectoryException
- If a problem occurs while attempting to
register the provided base DN.public static void deregisterBaseDN(DN baseDN) throws DirectoryException
baseDN
- The base DN to deregister with the server. It must not
be null
.DirectoryException
- If a problem occurs while attempting to
deregister the provided base DN.public static Map<DN,Backend> getPublicNamingContexts()
public static Map<DN,Backend> getPrivateNamingContexts()
public static boolean isNamingContext(DN dn)
dn
- The DN for which to make the determination.true
if the specified DN is a naming context for the
Directory Server, or false
if it is not.public static Entry getRootDSE()
public static RootDSEBackend getRootDSEBackend()
public static DN getSchemaDN()
null
if none has been defined (e.g., if no schema
backend has been configured).public static void setSchemaDN(DN schemaDN)
schemaDN
- The DN of the entry containing the server schema
definitions.public static Entry getEntry(DN entryDN) throws DirectoryException
entryDN
- The DN of the entry to retrieve.null
if it does not exist.DirectoryException
- If a problem occurs while attempting to retrieve the entry.public static boolean entryExists(DN entryDN) throws DirectoryException
entryDN
- The DN of the entry for which to make the determination.true
if the specified entry exists in one of the
backends, or false
if it does not.DirectoryException
- If a problem occurs while attempting to
make the determination.public static TreeSet<String> getSupportedControls()
public static boolean isSupportedControl(String controlOID)
controlOID
- The OID of the control for which to make the
determination.true
if the specified OID is registered with the
server as a supported control, or false
if not.public static void registerSupportedControl(String controlOID)
controlOID
- The OID of the control to register as a supported
control.public static void deregisterSupportedControl(String controlOID)
controlOID
- The OID of the control to deregister as a supported
control.public static TreeSet<String> getSupportedFeatures()
public static boolean isSupportedFeature(String featureOID)
featureOID
- The OID of the feature for which to make the
determination.true
if the specified OID is registered with the
server as a supported feature, or false
if not.public static void registerSupportedFeature(String featureOID)
featureOID
- The OID of the feature to register as a supported
feature.public static void deregisterSupportedFeature(String featureOID)
featureOID
- The OID of the feature to deregister as a supported
feature.public static ConcurrentMap<String,ExtendedOperationHandler> getSupportedExtensions()
public static ExtendedOperationHandler getExtendedOperationHandler(String oid)
oid
- The OID of the extended operation to retrieve.null
if there is none.public static void registerSupportedExtension(String oid, ExtendedOperationHandler handler)
oid
- The OID for the extended operation to register.handler
- The extended operation handler to register with the
Directory Server.public static void deregisterSupportedExtension(String oid)
oid
- The OID for the extended operation to deregister.public static ConcurrentMap<String,SASLMechanismHandler> getSupportedSASLMechanisms()
public static SASLMechanismHandler getSASLMechanismHandler(String name)
name
- The name of the SASL mechanism to retrieve.null
if there is none.public static void registerSASLMechanismHandler(String name, SASLMechanismHandler handler)
name
- The name of the SASL mechanism to be registered.handler
- The SASL mechanism handler to register with the Directory
Server.public static void deregisterSASLMechanismHandler(String name)
name
- The name of the SASL mechanism to be deregistered.public static Set<Integer> getSupportedLDAPVersions()
public static void registerSupportedLDAPVersion(int supportedLDAPVersion, ConnectionHandler connectionHandler)
supportedLDAPVersion
- The LDAP protocol version to register as
supported.connectionHandler
- The connection handler that supports the
provided LDAP version. Note that multiple
connection handlers can provide support for
the same LDAP versions.public static void deregisterSupportedLDAPVersion(int supportedLDAPVersion, ConnectionHandler connectionHandler)
supportedLDAPVersion
- The LDAP protocol version to deregister.connectionHandler
- The connection handler that no longer
supports the provided LDAP version.public static ConcurrentMap<DN,IdentityMapper> getIdentityMappers()
public static IdentityMapper getIdentityMapper(DN configEntryDN)
configEntryDN
- The DN of the configuration entry for the identity
mapper to retrieve.null
if the
provided entry DN is not associated with an active identity
mapper.public static void registerIdentityMapper(DN configEntryDN, IdentityMapper identityMapper)
configEntryDN
- The DN of the configuration entry in which the
identity mapper definition resides.identityMapper
- The identity mapper to be registered.public static void deregisterIdentityMapper(DN configEntryDN)
configEntryDN
- The DN of the configuration entry in which the
identity mapper definition resides.public static DN getProxiedAuthorizationIdentityMapperDN()
null
if none is defined.public static void setProxiedAuthorizationIdentityMapperDN(DN proxiedAuthorizationIdentityMapperDN)
proxiedAuthorizationIdentityMapperDN
- The DN of the configuration
entry for the identity mapper
that should be used in
conjunction with proxied
authorization V2 controls.public static IdentityMapper getProxiedAuthorizationIdentityMapper()
null
if none is defined.public static List<ConnectionHandler> getConnectionHandlers()
public static void registerConnectionHandler(ConnectionHandler<? extends ConnectionHandlerCfg> handler)
handler
- The connection handler to register with the Directory
Server.public static void deregisterConnectionHandler(ConnectionHandler handler)
handler
- The connection handler to deregister with the Directory
Server.public static WorkQueue getWorkQueue()
public static void checkCanEnqueueRequest(Operation operation, boolean isAllowedInLockDownMode) throws DirectoryException
operation
- The operation to be added to the work queue.isAllowedInLockDownMode
- Flag to indicate if the request can be added to the work queue regardless
of the server's lock down mode.DirectoryException
- If a check failed preventing the operation from being added to
the queuepublic static void enqueueRequest(Operation operation) throws DirectoryException
operation
- The operation to be added to the work queue.DirectoryException
- If a problem prevents the operation from being
added to the queue (e.g., the queue is full).public static boolean tryEnqueueRequest(Operation operation) throws DirectoryException
operation
- The operation to be added to the work queue.DirectoryException
- If a problem prevents the operation from being added to the queue
(e.g., the queue is full).public static List<SynchronizationProvider<SynchronizationProviderCfg>> getSynchronizationProviders()
public static void registerSynchronizationProvider(SynchronizationProvider<SynchronizationProviderCfg> provider)
provider
- The synchronization provider to register.public static void deregisterSynchronizationProvider(SynchronizationProvider provider)
provider
- The synchronization provider to deregister.public static Set<String> getAllowedTasks()
public static void setAllowedTasks(Set<String> allowedTasks)
allowedTasks
- A set containing the names of the allowed tasks that
may be invoked in the server.public static Set<Privilege> getDisabledPrivileges()
public static boolean isDisabled(Privilege privilege)
privilege
- The privilege for which to make the determination.true
if the specified privilege is disabled, or
false
if not.public static void setDisabledPrivileges(Set<Privilege> disabledPrivileges)
disabledPrivileges
- The set of privileges that should be disabled
in the server.public static boolean returnBindErrorMessages()
true
if bind responses should include error messages, or
false
if not.public static void setReturnBindErrorMessages(boolean returnBindErrorMessages)
returnBindErrorMessages
- Specifies whether responses to failed bind
operations should include a message
explaining the reason for the failure.public static long getIdleTimeLimit()
public static void setIdleTimeLimit(long idleTimeLimit)
idleTimeLimit
- The maximum length of time in milliseconds that
client connections should be allowed to remain idle
without being disconnected.public static boolean saveConfigOnSuccessfulStartup()
true
if the server should save a copy of its configuration
whenever it is started successfully, or false
if not.public static void setSaveConfigOnSuccessfulStartup(boolean saveConfigOnSuccessfulStartup)
saveConfigOnSuccessfulStartup
- Specifies whether the server should
save a copy of its configuration
whenever it is started successfully.public static void registerBackupTaskListener(BackupTaskListener listener)
listener
- The backup task listener to register with the Directory
Server.public static void deregisterBackupTaskListener(BackupTaskListener listener)
listener
- The backup task listener to deregister with the Directory
Server.public static void notifyBackupBeginning(Backend<?> backend, BackupConfig config)
backend
- The backend in which the backup is to be performed.config
- The configuration for the backup to be performed.public static void notifyBackupEnded(Backend<?> backend, BackupConfig config, boolean successful)
backend
- The backend in which the backup was performed.config
- The configuration for the backup that was performed.successful
- Indicates whether the backup completed successfully.public static void registerRestoreTaskListener(RestoreTaskListener listener)
listener
- The restore task listener to register with the Directory
Server.public static void deregisterRestoreTaskListener(RestoreTaskListener listener)
listener
- The restore task listener to deregister with the
Directory Server.public static void notifyRestoreBeginning(Backend<?> backend, RestoreConfig config)
backend
- The backend in which the restore is to be performed.config
- The configuration for the restore to be performed.public static void notifyRestoreEnded(Backend<?> backend, RestoreConfig config, boolean successful)
backend
- The backend in which the restore was performed.config
- The configuration for the restore that was performed.successful
- Indicates whether the restore completed successfully.public static void registerExportTaskListener(ExportTaskListener listener)
listener
- The export task listener to register with the Directory
Server.public static void deregisterExportTaskListener(ExportTaskListener listener)
listener
- The export task listener to deregister with the Directory
Server.public static void notifyExportBeginning(Backend<?> backend, LDIFExportConfig config)
backend
- The backend in which the export is to be performed.config
- The configuration for the export to be performed.public static void notifyExportEnded(Backend<?> backend, LDIFExportConfig config, boolean successful)
backend
- The backend in which the export was performed.config
- The configuration for the export that was performed.successful
- Indicates whether the export completed successfully.public static void registerImportTaskListener(ImportTaskListener listener)
listener
- The import task listener to register with the Directory
Server.public static void deregisterImportTaskListener(ImportTaskListener listener)
listener
- The import task listener to deregister with the Directory
Server.public static void notifyImportBeginning(Backend<?> backend, LDIFImportConfig config)
backend
- The backend in which the import is to be performed.config
- The configuration for the import to be performed.public static void notifyImportEnded(Backend<?> backend, LDIFImportConfig config, boolean successful)
backend
- The backend in which the import was performed.config
- The configuration for the import that was performed.successful
- Indicates whether the import completed successfully.public static void registerInitializationCompletedListener(InitializationCompletedListener listener)
listener
- The initialization competed listener to register with
the Directory Server.public static void deregisterInitializationCompletedListener(InitializationCompletedListener listener)
listener
- The initialization completed listener to deregister with
the Directory Server.public static void registerShutdownListener(ServerShutdownListener listener)
listener
- The shutdown listener to register with the Directory
Server.public static void deregisterShutdownListener(ServerShutdownListener listener)
listener
- The shutdown listener to deregister with the Directory
Server.public static void shutDown(String className, LocalizableMessage reason)
className
- The fully-qualified name of the Java class that
initiated the shutdown.reason
- The human-readable reason that the directory server is
shutting down.public static void restart(String className, LocalizableMessage reason)
className
- The fully-qualified name of the Java class that
initiated the shutdown.reason
- The human-readable reason that the directory server is
shutting down.public static void restart(String className, LocalizableMessage reason, DirectoryEnvironmentConfig config)
className
- The fully-qualified name of the Java class that
initiated the shutdown.reason
- The human-readable reason that the directory server is
shutting down.config
- The environment configuration to use for the server.public static DirectoryServer reinitialize() throws InitializationException
startServer
.InitializationException
- If a problem occurs while trying to
initialize the config handler or
bootstrap that server.public static DirectoryServer reinitialize(DirectoryEnvironmentConfig config) throws InitializationException
startServer
.config
- The environment configuration for the Directory Server.InitializationException
- If a problem occurs while trying to
initialize the config handler or
bootstrap that server.public static long getMaxAllowedConnections()
public static void setMaxAllowedConnections(long maxAllowedConnections)
maxAllowedConnections
- The maximum number of concurrent client
connections that may be established.public static long newConnectionAccepted(ClientConnection clientConnection)
clientConnection
- The client connection that has been established.public static void connectionClosed(ClientConnection clientConnection)
clientConnection
- The client connection that has been closed.public static long getCurrentConnections()
public static long getMaxConnections()
public static long getTotalConnections()
public static String getVersionString()
public static void printVersion(OutputStream outputStream) throws IOException
outputStream
- The output stream to which the version information
should be written.IOException
- If a problem occurs while attempting to write the
version information to the provided output stream.public static int getSizeLimit()
public static void setSizeLimit(int sizeLimit)
sizeLimit
- The default maximum number of entries that should be
returned for a search.public static int getLookthroughLimit()
public static void setLookthroughLimit(int lookthroughLimit)
lookthroughLimit
- The default maximum number of entries that should
be check for matches during a search.public static void setMaxPersistentSearchLimit(int maxPSearches)
maxPSearches
- The maximum number of simultaneous persistent
searches that are allowed.public static void registerPersistentSearch()
public static void deregisterPersistentSearch()
public static boolean allowNewPersistentSearch()
true
if a new persistent search is allowed
or false
f if not.public static int getTimeLimit()
public static void setTimeLimit(int timeLimit)
timeLimit
- The default maximum length of time in seconds that
should be allowed when processing a search.public static void setUseNanoTime(boolean useNanoTime)
useNanoTime
- true
if nanosecond resolution times
should be collected or false
to
only collect in millisecond resolution.public static boolean getUseNanoTime()
true
if nanosecond resolution times are collected
or false
if only millisecond resolution times are
being collected.public static WritabilityMode getWritabilityMode()
public static void setWritabilityMode(WritabilityMode writabilityMode)
writabilityMode
- Specifies the writability mode for the Directory
Server.public static boolean bindWithDNRequiresPassword()
true
if simple bind requests containing a bind DN
will be required to have a password, or false
if not
(and therefore will be treated as anonymous binds).public static void setBindWithDNRequiresPassword(boolean bindWithDNRequiresPassword)
bindWithDNRequiresPassword
- Indicates whether simple bind requests
that contain a bind DN will also be
required to have a password.public static boolean rejectUnauthenticatedRequests()
true
if an unauthenticated request should be
rejected, or false
f if not.public static void setRejectUnauthenticatedRequests(boolean rejectUnauthenticatedRequests)
rejectUnauthenticatedRequests
- Indicates whether an
unauthenticated request should
be rejected.public static boolean lockdownMode()
true
if the Directory Server is currently configured to
operate in the lockdown mode, or false
if not.public static void setLockdownMode(boolean lockdownMode)
lockdownMode
- Indicates whether the Directory Server should operate
in lockdown mode.public static void setToolDescription(LocalizableMessage msg)
msg
- the message to be displayed on the command-line when the user
asks for the usage.public DN getComponentEntryDN()
getComponentEntryDN
in interface AlertGenerator
public String getClassName()
getClassName
in interface AlertGenerator
public Map<String,String> getAlerts()
getAlerts
in interface AlertGenerator
public boolean isShuttingDown()
true
if this server is currently in the process of
shutting down and false
otherwise.public static void main(String[] args)
args
- The command-line arguments provided to this program.public static DN getMonitorProviderDN(MonitorProvider provider)
provider
- The monitor provider for which a DN is desired.public static ClassLoader getClassLoader()
The class loader will automatically load classes from plugins where required.
public static Class<?> loadClass(String name) throws LinkageError, ExceptionInInitializerError, ClassNotFoundException
This method provided as a convenience and is equivalent to calling:
Class.forName(name, true, DirectoryServer.getClassLoader());
name
- The fully qualified name of the desired class.LinkageError
- If the linkage fails.ExceptionInInitializerError
- If the initialization provoked by this method fails.ClassNotFoundException
- If the class cannot be located by the specified class
loader.Class.forName(String, boolean, ClassLoader)
public static boolean isRunningAsWindowsService()
true
if this server is configured to run as a windows
service and false
otherwise.public static void setMaxInternalBufferSize(int maxInternalBufferSize)
maxInternalBufferSize
- The threshold capacity beyond which internal cached buffers used
for encoding and decoding entries and protocol messages will be
trimmed after use.public static int getMaxInternalBufferSize()
public static LockManager getLockManager()
Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.