| | |
| | | private ConfigurationHandler configurationHandler; |
| | | |
| | | /** The set of account status notification handlers defined in the server. */ |
| | | private ConcurrentMap<DN, AccountStatusNotificationHandler> |
| | | private ConcurrentMap<DN, AccountStatusNotificationHandler<?>> |
| | | accountStatusNotificationHandlers; |
| | | |
| | | /** The set of certificate mappers registered with the server. */ |
| | | private ConcurrentMap<DN, CertificateMapper> certificateMappers; |
| | | private ConcurrentMap<DN, CertificateMapper<?>> certificateMappers; |
| | | |
| | | /** The set of alternate bind DNs for the root users. */ |
| | | private ConcurrentMap<DN, DN> alternateRootBindDNs; |
| | |
| | | * The set of identity mappers registered with the server (mapped between the |
| | | * configuration entry Dn and the mapper). |
| | | */ |
| | | private ConcurrentMap<DN, IdentityMapper> identityMappers; |
| | | private ConcurrentMap<DN, IdentityMapper<?>> identityMappers; |
| | | |
| | | /** |
| | | * The set of JMX MBeans that have been registered with the server (mapped |
| | | * between the associated configuration entry DN and the MBean). |
| | | */ |
| | | private ConcurrentHashMap<DN,JMXMBean> mBeans; |
| | | private ConcurrentHashMap<DN, JMXMBean> mBeans; |
| | | |
| | | /** The set of key manager providers registered with the server. */ |
| | | private ConcurrentMap<DN, KeyManagerProvider> keyManagerProviders; |
| | | private ConcurrentMap<DN, KeyManagerProvider<?>> keyManagerProviders; |
| | | |
| | | /** |
| | | * The set of password generators registered with the Directory Server, as a |
| | | * mapping between the DN of the associated configuration entry and the |
| | | * generator implementation. |
| | | */ |
| | | private ConcurrentMap<DN, PasswordGenerator> passwordGenerators; |
| | | private ConcurrentMap<DN, PasswordGenerator<?>> passwordGenerators; |
| | | |
| | | /** |
| | | * The set of authentication policies registered with the Directory Server, as |
| | |
| | | * mapping between the DN of the associated configuration entry and the |
| | | * validator implementation. |
| | | */ |
| | | private ConcurrentMap<DN, PasswordValidator<? extends PasswordValidatorCfg>> |
| | | passwordValidators; |
| | | private ConcurrentMap<DN, PasswordValidator<? extends PasswordValidatorCfg>> passwordValidators; |
| | | |
| | | /** The set of trust manager providers registered with the server. */ |
| | | private ConcurrentMap<DN, TrustManagerProvider> trustManagerProviders; |
| | | private ConcurrentMap<DN, TrustManagerProvider<?>> trustManagerProviders; |
| | | |
| | | /** |
| | | * The set of log rotation policies registered with the Directory Server, as a |
| | | * mapping between the DN of the associated configuration entry and the policy |
| | | * implementation. |
| | | */ |
| | | private ConcurrentMap<DN, RotationPolicy> rotationPolicies; |
| | | private ConcurrentMap<DN, RotationPolicy<?>> rotationPolicies; |
| | | |
| | | /** |
| | | * The set of log retention policies registered with the Directory Server, as |
| | | * a mapping between the DN of the associated configuration entry and the |
| | | * policy implementation. |
| | | */ |
| | | private ConcurrentMap<DN, RetentionPolicy> retentionPolicies; |
| | | private ConcurrentMap<DN, RetentionPolicy<?>> retentionPolicies; |
| | | |
| | | /** The set supported LDAP protocol versions. */ |
| | | private ConcurrentMap<Integer, List<ConnectionHandler>> |
| | | supportedLDAPVersions; |
| | | private ConcurrentMap<Integer, List<ConnectionHandler<?>>> supportedLDAPVersions; |
| | | |
| | | /** |
| | | * The set of extended operation handlers registered with the server (mapped |
| | | * between the OID of the extended operation and the handler). |
| | | */ |
| | | private ConcurrentMap<String, ExtendedOperationHandler> |
| | | extendedOperationHandlers; |
| | | private ConcurrentMap<String, ExtendedOperationHandler<?>> extendedOperationHandlers; |
| | | |
| | | /** |
| | | * The set of monitor providers registered with the Directory Server, as a |
| | | * mapping between the monitor name and the corresponding implementation. |
| | | */ |
| | | private ConcurrentMap<String, MonitorProvider<? extends MonitorProviderCfg>> |
| | | monitorProviders; |
| | | private ConcurrentMap<String, MonitorProvider<? extends MonitorProviderCfg>> monitorProviders; |
| | | |
| | | /** |
| | | * The set of password storage schemes defined in the server (mapped between |
| | | * the lowercase scheme name and the storage scheme) that support the |
| | | * authentication password syntax. |
| | | */ |
| | | private ConcurrentHashMap<String,PasswordStorageScheme> |
| | | authPasswordStorageSchemes; |
| | | private ConcurrentHashMap<String, PasswordStorageScheme<?>> authPasswordStorageSchemes; |
| | | |
| | | /** |
| | | * The set of password storage schemes defined in the server (mapped between |
| | | * the lowercase scheme name and the storage scheme). |
| | | */ |
| | | private ConcurrentHashMap<String,PasswordStorageScheme> |
| | | passwordStorageSchemes; |
| | | private ConcurrentHashMap<String, PasswordStorageScheme<?>> passwordStorageSchemes; |
| | | |
| | | /** |
| | | * The set of password storage schemes defined in the server (mapped between |
| | | * the DN of the configuration entry and the storage scheme). |
| | | */ |
| | | private ConcurrentMap<DN, PasswordStorageScheme> |
| | | passwordStorageSchemesByDN; |
| | | private ConcurrentMap<DN, PasswordStorageScheme<?>> passwordStorageSchemesByDN; |
| | | |
| | | /** |
| | | * The set of SASL mechanism handlers registered with the server (mapped |
| | | * between the mechanism name and the handler). |
| | | */ |
| | | private ConcurrentMap<String, SASLMechanismHandler> saslMechanismHandlers; |
| | | private ConcurrentMap<String, SASLMechanismHandler<?>> saslMechanismHandlers; |
| | | |
| | | /** The connection handler configuration manager for the Directory Server. */ |
| | | private ConnectionHandlerConfigManager connectionHandlerConfigManager; |
| | | |
| | | /** The set of alert handlers registered with the Directory Server. */ |
| | | private List<AlertHandler> alertHandlers; |
| | | private List<AlertHandler<?>> alertHandlers; |
| | | /** The set of connection handlers registered with the Directory Server. */ |
| | | private List<ConnectionHandler<?>> connectionHandlers; |
| | | |
| | | /** The set of backup task listeners registered with the Directory Server. */ |
| | | private CopyOnWriteArrayList<BackupTaskListener> backupTaskListeners; |
| | | |
| | | /** The set of connection handlers registered with the Directory Server. */ |
| | | private List<ConnectionHandler> connectionHandlers; |
| | | |
| | | /** The set of export task listeners registered with the Directory Server. */ |
| | | private CopyOnWriteArrayList<ExportTaskListener> exportTaskListeners; |
| | | |
| | | /** The set of import task listeners registered with the Directory Server. */ |
| | | private CopyOnWriteArrayList<ImportTaskListener> importTaskListeners; |
| | | |
| | | /** The set of restore task listeners registered with the Directory Server. */ |
| | | private CopyOnWriteArrayList<RestoreTaskListener> restoreTaskListeners; |
| | | |
| | |
| | | * The set of initialization completed listeners that have been registered |
| | | * with the Directory Server. |
| | | */ |
| | | private List<InitializationCompletedListener> |
| | | initializationCompletedListeners; |
| | | private List<InitializationCompletedListener> initializationCompletedListeners; |
| | | |
| | | /** The set of shutdown listeners that have been registered with the Directory Server. */ |
| | | private List<ServerShutdownListener> shutdownListeners; |
| | |
| | | private DN schemaDN; |
| | | |
| | | /** The Directory Server entry cache. */ |
| | | private EntryCache entryCache; |
| | | private EntryCache<?> entryCache; |
| | | |
| | | /** The configuration manager for the entry cache. */ |
| | | private EntryCacheConfigManager entryCacheConfigManager; |
| | |
| | | private final VirtualAttributeConfigManager virtualAttributeConfigManager; |
| | | |
| | | /** The work queue that will be used to service client requests. */ |
| | | private WorkQueue workQueue; |
| | | private WorkQueue<?> workQueue; |
| | | |
| | | /** The writability mode for the Directory Server. */ |
| | | private WritabilityMode writabilityMode; |
| | |
| | | // matching rules and attribute syntaxes. |
| | | try |
| | | { |
| | | directoryServer.setSchema(new Schema(org.forgerock.opendj.ldap.schema.Schema.getCoreSchema())); |
| | | setSchema(new Schema(org.forgerock.opendj.ldap.schema.Schema.getCoreSchema())); |
| | | } |
| | | catch (DirectoryException unexpected) |
| | | { |
| | |
| | | * @param lowerName The lowercase name or OID for the matching rule to |
| | | * retrieve. |
| | | * |
| | | * @return The requested matching rule, or <CODE>null</CODE> if no such |
| | | * @return The requested matching rule, or {@code null} if no such |
| | | * matching rule has been defined in the server. |
| | | */ |
| | | public static MatchingRule getMatchingRule(String lowerName) |
| | |
| | | * @param lowerName The lowercase name or OID for the objectclass to |
| | | * retrieve. |
| | | * |
| | | * @return The requested objectclass, or <CODE>null</CODE> if there is no |
| | | * @return The requested objectclass, or {@code null} if there is no |
| | | * such objectclass defined in the server schema. |
| | | */ |
| | | public static ObjectClass getObjectClass(String lowerName) |
| | |
| | | * the requested objectclass is not defined in the |
| | | * server schema. |
| | | * |
| | | * @return The objectclass type, or <CODE>null</CODE> if there is no |
| | | * @return The objectclass type, or {@code 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. |
| | | */ |
| | |
| | | * rule use. |
| | | * |
| | | * @return The matching rule use for the provided matching rule, or |
| | | * <CODE>null</CODE> if none is defined. |
| | | * {@code null} if none is defined. |
| | | */ |
| | | public static MatchingRuleUse getMatchingRuleUse(MatchingRule matchingRule) |
| | | { |
| | |
| | | * @param objectClass The objectclass for which to retrieve the associated |
| | | * DIT content rule. |
| | | * |
| | | * @return The requested DIT content rule, or <CODE>null</CODE> if no such |
| | | * @return The requested DIT content rule, or {@code null} if no such |
| | | * rule is defined in the schema. |
| | | */ |
| | | public static DITContentRule getDITContentRule(ObjectClass objectClass) |
| | |
| | | * @param ruleID The rule ID for which to retrieve the associated DIT |
| | | * structure rule. |
| | | * |
| | | * @return The requested DIT structure rule, or <CODE>null</CODE> if no such |
| | | * @return The requested DIT structure rule, or {@code null} if no such |
| | | * rule is defined. |
| | | */ |
| | | public static DITStructureRule getDITStructureRule(int ruleID) |
| | |
| | | * @param nameForm The name form for which to retrieve the associated DIT |
| | | * structure rule. |
| | | * |
| | | * @return The requested DIT structure rule, or <CODE>null</CODE> if no such |
| | | * @return The requested DIT structure rule, or {@code null} if no such |
| | | * rule is defined. |
| | | */ |
| | | public static DITStructureRule getDITStructureRule(NameForm nameForm) |
| | |
| | | * @param objectClass The objectclass for which to retrieve the associated |
| | | * name form. |
| | | * |
| | | * @return The requested name forms, or <CODE>null</CODE> if no such name |
| | | * @return The requested name forms, or {@code null} if no such name |
| | | * form is defined in the schema. |
| | | */ |
| | | public static List<NameForm> getNameForm(ObjectClass objectClass) |
| | |
| | | * @param lowerName The name or OID of the name form to retrieve, formatted |
| | | * in all lowercase characters. |
| | | * |
| | | * @return The requested name form, or <CODE>null</CODE> if no such name form |
| | | * @return The requested name form, or {@code null} if no such name form |
| | | * is defined in the schema. |
| | | */ |
| | | public static NameForm getNameForm(String lowerName) |
| | |
| | | * retrieve the associated JMX MBean. |
| | | * |
| | | * @return The JMX MBean associated with the specified entry in the Directory |
| | | * Server configuration, or <CODE>null</CODE> if there is no MBean |
| | | * Server configuration, or {@code null} if there is no MBean |
| | | * for the specified entry. |
| | | */ |
| | | public static JMXMBean getJMXMBean(DN configEntryDN) |
| | |
| | | * @return The set of alert handlers that have been registered with the |
| | | * Directory Server. |
| | | */ |
| | | public static List<AlertHandler> getAlertHandlers() |
| | | public static List<AlertHandler<?>> getAlertHandlers() |
| | | { |
| | | return directoryServer.alertHandlers; |
| | | } |
| | |
| | | * |
| | | * @param alertHandler The alert handler to register. |
| | | */ |
| | | public static void registerAlertHandler(AlertHandler alertHandler) |
| | | public static void registerAlertHandler(AlertHandler<?> alertHandler) |
| | | { |
| | | directoryServer.alertHandlers.add(alertHandler); |
| | | } |
| | |
| | | * |
| | | * @param alertHandler The alert handler to deregister. |
| | | */ |
| | | public static void deregisterAlertHandler(AlertHandler alertHandler) |
| | | public static void deregisterAlertHandler(AlertHandler<?> alertHandler) |
| | | { |
| | | directoryServer.alertHandlers.remove(alertHandler); |
| | | } |
| | |
| | | * |
| | | * @param generator The alert generator that created the alert. |
| | | * @param alertType The alert type name for this alert. |
| | | * @param alertMessage A message (possibly <CODE>null</CODE>) that can |
| | | * @param alertMessage A message (possibly {@code null}) that can |
| | | */ |
| | | public static void sendAlertNotification(AlertGenerator generator, |
| | | String alertType, |
| | |
| | | AlertHandlerCfg config = alertHandler.getAlertHandlerConfiguration(); |
| | | Set<String> enabledAlerts = config.getEnabledAlertType(); |
| | | Set<String> disabledAlerts = config.getDisabledAlertType(); |
| | | if (enabledAlerts == null || enabledAlerts.isEmpty()) |
| | | if (enabledAlerts == null |
| | | || enabledAlerts.isEmpty() |
| | | || enabledAlerts.contains(alertType)) |
| | | { |
| | | if (disabledAlerts != null && disabledAlerts.contains(alertType)) |
| | | { |
| | |
| | | } |
| | | else |
| | | { |
| | | if (enabledAlerts.contains(alertType)) |
| | | { |
| | | if (disabledAlerts != null && disabledAlerts.contains(alertType)) |
| | | { |
| | | continue; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | continue; |
| | | } |
| | | continue; |
| | | } |
| | | |
| | | alertHandler.sendAlertNotification(generator, alertType, alertMessage); |
| | |
| | | * @return The set of password storage schemes defined in the Directory |
| | | * Server. |
| | | */ |
| | | public static ConcurrentHashMap<String,PasswordStorageScheme> |
| | | getPasswordStorageSchemes() |
| | | public static ConcurrentHashMap<String, PasswordStorageScheme<?>> getPasswordStorageSchemes() |
| | | { |
| | | return directoryServer.passwordStorageSchemes; |
| | | } |
| | |
| | | * @param lowerName The name of the password storage scheme to retrieve, |
| | | * formatted in all lowercase characters. |
| | | * |
| | | * @return The requested password storage scheme, or <CODE>null</CODE> if no |
| | | * @return The requested password storage scheme, or {@code null} if no |
| | | * such scheme is defined. |
| | | */ |
| | | public static PasswordStorageScheme getPasswordStorageScheme(String lowerName) |
| | | public static PasswordStorageScheme<?> getPasswordStorageScheme(String lowerName) |
| | | { |
| | | return directoryServer.passwordStorageSchemes.get(lowerName); |
| | | } |
| | |
| | | * @return The set of authentication password storage schemes defined in the |
| | | * Directory Server. |
| | | */ |
| | | public static ConcurrentHashMap<String,PasswordStorageScheme> |
| | | getAuthPasswordStorageSchemes() |
| | | public static ConcurrentHashMap<String, PasswordStorageScheme<?>> getAuthPasswordStorageSchemes() |
| | | { |
| | | return directoryServer.authPasswordStorageSchemes; |
| | | } |
| | |
| | | * storage scheme to retrieve. |
| | | * |
| | | * @return The requested authentication password storage scheme, or |
| | | * <CODE>null</CODE> if no such scheme is defined. |
| | | * {@code null} if no such scheme is defined. |
| | | */ |
| | | public static PasswordStorageScheme getAuthPasswordStorageScheme(String name) |
| | | public static PasswordStorageScheme<?> getAuthPasswordStorageScheme(String name) |
| | | { |
| | | return directoryServer.authPasswordStorageSchemes.get(name); |
| | | } |
| | |
| | | * @param scheme The password storage scheme to register with the |
| | | * Directory Server. |
| | | */ |
| | | public static void registerPasswordStorageScheme(DN configEntryDN, |
| | | PasswordStorageScheme scheme) |
| | | public static void registerPasswordStorageScheme(DN configEntryDN, PasswordStorageScheme<?> scheme) |
| | | { |
| | | directoryServer.passwordStorageSchemesByDN.put(configEntryDN, scheme); |
| | | |
| | |
| | | */ |
| | | public static void deregisterPasswordStorageScheme(DN configEntryDN) |
| | | { |
| | | PasswordStorageScheme scheme = |
| | | directoryServer.passwordStorageSchemesByDN.remove(configEntryDN); |
| | | PasswordStorageScheme<?> scheme = directoryServer.passwordStorageSchemesByDN.remove(configEntryDN); |
| | | |
| | | if (scheme != null) |
| | | { |
| | |
| | | * @param configEntryDN The DN of the configuration entry for which to |
| | | * retrieve the associated password validator. |
| | | * |
| | | * @return The requested password validator, or <CODE>null</CODE> if no such |
| | | * @return The requested password validator, or {@code null} if no such |
| | | * validator is defined. |
| | | */ |
| | | public static PasswordValidator<? extends PasswordValidatorCfg> |
| | |
| | | * @return The set of account status notification handlers defined in the |
| | | * Directory Server. |
| | | */ |
| | | public static ConcurrentMap<DN, AccountStatusNotificationHandler> |
| | | public static ConcurrentMap<DN, AccountStatusNotificationHandler<?>> |
| | | getAccountStatusNotificationHandlers() |
| | | { |
| | | return directoryServer.accountStatusNotificationHandlers; |
| | |
| | | * account status notification handler to retrieve. |
| | | * |
| | | * @return The requested account status notification handler, or |
| | | * <CODE>null</CODE> if no such handler is defined in the server. |
| | | * {@code null} if no such handler is defined in the server. |
| | | */ |
| | | public static AccountStatusNotificationHandler |
| | | public static AccountStatusNotificationHandler<?> |
| | | getAccountStatusNotificationHandler(DN handlerDN) |
| | | { |
| | | return directoryServer.accountStatusNotificationHandlers.get(handlerDN); |
| | |
| | | * the Directory Server. |
| | | */ |
| | | public static void registerAccountStatusNotificationHandler(DN handlerDN, |
| | | AccountStatusNotificationHandler handler) |
| | | AccountStatusNotificationHandler<?> handler) |
| | | { |
| | | directoryServer.accountStatusNotificationHandlers.put(handlerDN, handler); |
| | | } |
| | |
| | | * @return The set of password generators that have been registered for use |
| | | * with the Directory Server. |
| | | */ |
| | | public static ConcurrentMap<DN, PasswordGenerator> getPasswordGenerators() |
| | | public static ConcurrentMap<DN, PasswordGenerator<?>> getPasswordGenerators() |
| | | { |
| | | return directoryServer.passwordGenerators; |
| | | } |
| | |
| | | * @param configEntryDN The DN of the configuration entry for which to |
| | | * retrieve the associated password generator. |
| | | * |
| | | * @return The requested password generator, or <CODE>null</CODE> if no such |
| | | * @return The requested password generator, or {@code null} if no such |
| | | * generator is defined. |
| | | */ |
| | | public static PasswordGenerator getPasswordGenerator(DN configEntryDN) |
| | | public static PasswordGenerator<?> getPasswordGenerator(DN configEntryDN) |
| | | { |
| | | return directoryServer.passwordGenerators.get(configEntryDN); |
| | | } |
| | |
| | | * @param generator The password generator to register with the |
| | | * Directory Server. |
| | | */ |
| | | public static void registerPasswordGenerator(DN configEntryDN, |
| | | PasswordGenerator generator) |
| | | public static void registerPasswordGenerator(DN configEntryDN, PasswordGenerator<?> generator) |
| | | { |
| | | directoryServer.passwordGenerators.put(configEntryDN, generator); |
| | | } |
| | |
| | | * The DN of the configuration entry for which to retrieve the |
| | | * associated authentication policy. |
| | | * @return The authentication policy registered for the provided configuration |
| | | * entry, or <CODE>null</CODE> if there is no such policy. |
| | | * entry, or {@code null} if there is no such policy. |
| | | */ |
| | | public static AuthenticationPolicy getAuthenticationPolicy(DN configEntryDN) |
| | | { |
| | |
| | | * retrieve the associated rotation policy. |
| | | * |
| | | * @return The rotation policy registered for the provided configuration |
| | | * entry, or <CODE>null</CODE> if there is no such policy. |
| | | * entry, or {@code null} if there is no such policy. |
| | | */ |
| | | public static RotationPolicy getRotationPolicy(DN configEntryDN) |
| | | public static RotationPolicy<?> getRotationPolicy(DN configEntryDN) |
| | | { |
| | | Reject.ifNull(configEntryDN); |
| | | |
| | |
| | | * password policy. |
| | | * @param policy The rotation policy to register with the server. |
| | | */ |
| | | public static void registerRotationPolicy(DN configEntryDN, |
| | | RotationPolicy policy) |
| | | public static void registerRotationPolicy(DN configEntryDN, RotationPolicy<?> policy) |
| | | { |
| | | Reject.ifNull(configEntryDN, policy); |
| | | |
| | |
| | | * retrieve the associated retention policy. |
| | | * |
| | | * @return The retention policy registered for the provided configuration |
| | | * entry, or <CODE>null</CODE> if there is no such policy. |
| | | * entry, or {@code null} if there is no such policy. |
| | | */ |
| | | public static RetentionPolicy getRetentionPolicy(DN configEntryDN) |
| | | public static RetentionPolicy<?> getRetentionPolicy(DN configEntryDN) |
| | | { |
| | | Reject.ifNull(configEntryDN); |
| | | |
| | |
| | | * password policy. |
| | | * @param policy The retention policy to register with the server. |
| | | */ |
| | | public static void registerRetentionPolicy(DN configEntryDN, |
| | | RetentionPolicy policy) |
| | | public static void registerRetentionPolicy(DN configEntryDN, RetentionPolicy<?> policy) |
| | | { |
| | | Reject.ifNull(configEntryDN, policy); |
| | | |
| | |
| | | * @param lowerName The name of the monitor provider to retrieve, in all |
| | | * lowercase characters. |
| | | * |
| | | * @return The requested resource monitor, or <CODE>null</CODE> if none |
| | | * @return The requested resource monitor, or {@code null} if none |
| | | * exists with the specified name. |
| | | */ |
| | | public static MonitorProvider<? extends MonitorProviderCfg> |
| | |
| | | * |
| | | * @return The entry cache for the Directory Server. |
| | | */ |
| | | public static EntryCache getEntryCache() |
| | | public static EntryCache<?> getEntryCache() |
| | | { |
| | | return directoryServer.entryCache; |
| | | } |
| | |
| | | * |
| | | * @param entryCache The entry cache for the Directory Server. |
| | | */ |
| | | public static void setEntryCache(EntryCache entryCache) |
| | | public static void setEntryCache(EntryCache<?> entryCache) |
| | | { |
| | | synchronized (directoryServer) |
| | | { |
| | |
| | | * @return The set of key manager providers registered with the Directory |
| | | * Server. |
| | | */ |
| | | public static Map<DN,KeyManagerProvider> getKeyManagerProviders() |
| | | public static Map<DN, KeyManagerProvider<?>> getKeyManagerProviders() |
| | | { |
| | | return directoryServer.keyManagerProviders; |
| | | } |
| | |
| | | * {@code null} if there is no such key manager provider registered |
| | | * with the server. |
| | | */ |
| | | public static KeyManagerProvider getKeyManagerProvider(DN providerDN) |
| | | public static KeyManagerProvider<?> getKeyManagerProvider(DN providerDN) |
| | | { |
| | | return directoryServer.keyManagerProviders.get(providerDN); |
| | | } |
| | |
| | | * @param provider The key manager provider to register with the server. |
| | | */ |
| | | public static void registerKeyManagerProvider(DN providerDN, |
| | | KeyManagerProvider provider) |
| | | KeyManagerProvider<?> provider) |
| | | { |
| | | directoryServer.keyManagerProviders.put(providerDN, provider); |
| | | } |
| | |
| | | * @return The set of trust manager providers registered with the Directory |
| | | * Server. |
| | | */ |
| | | public static Map<DN,TrustManagerProvider> getTrustManagerProviders() |
| | | public static Map<DN, TrustManagerProvider<?>> getTrustManagerProviders() |
| | | { |
| | | return directoryServer.trustManagerProviders; |
| | | } |
| | |
| | | * or {@code null} if there is no such trust manager provider |
| | | * registered with the server. |
| | | */ |
| | | public static TrustManagerProvider getTrustManagerProvider(DN providerDN) |
| | | public static TrustManagerProvider<?> getTrustManagerProvider(DN providerDN) |
| | | { |
| | | return directoryServer.trustManagerProviders.get(providerDN); |
| | | } |
| | |
| | | * provider. |
| | | * @param provider The trust manager provider to register with the server. |
| | | */ |
| | | public static void registerTrustManagerProvider(DN providerDN, |
| | | TrustManagerProvider provider) |
| | | public static void registerTrustManagerProvider(DN providerDN, TrustManagerProvider<?> provider) |
| | | { |
| | | directoryServer.trustManagerProviders.put(providerDN, provider); |
| | | } |
| | |
| | | * @return The set of certificate mappers registered with the Directory |
| | | * Server. |
| | | */ |
| | | public static Map<DN,CertificateMapper> getCertificateMappers() |
| | | public static Map<DN, CertificateMapper<?>> getCertificateMappers() |
| | | { |
| | | return directoryServer.certificateMappers; |
| | | } |
| | |
| | | * {@code null} if there is no such certificate mapper registered |
| | | * with the server. |
| | | */ |
| | | public static CertificateMapper getCertificateMapper(DN mapperDN) |
| | | public static CertificateMapper<?> getCertificateMapper(DN mapperDN) |
| | | { |
| | | return directoryServer.certificateMappers.get(mapperDN); |
| | | } |
| | |
| | | * @param mapperDN The DN with which to register the certificate mapper. |
| | | * @param mapper The certificate mapper to register with the server. |
| | | */ |
| | | public static void registerCertificateMapper(DN mapperDN, |
| | | CertificateMapper mapper) |
| | | public static void registerCertificateMapper(DN mapperDN, CertificateMapper<?> mapper) |
| | | { |
| | | directoryServer.certificateMappers.put(mapperDN, mapper); |
| | | } |
| | |
| | | * retrieve the real entry DN. |
| | | * |
| | | * @return The real entry DN for the root user with the provided alternate |
| | | * bind DN, or <CODE>null</CODE> if no such mapping has been defined. |
| | | * bind DN, or {@code null} if no such mapping has been defined. |
| | | */ |
| | | public static DN getActualRootBindDN(DN alternateRootBindDN) |
| | | { |
| | |
| | | * @param alternateRootBindDN The alternate root bind DN to be deregistered. |
| | | * |
| | | * @return The actual root entry DN to which the provided alternate bind DN |
| | | * was mapped, or <CODE>null</CODE> if there was no mapping for the |
| | | * was mapped, or {@code null} if there was no mapping for the |
| | | * provided DN. |
| | | */ |
| | | public static DN deregisterAlternateRootBindDN(DN alternateRootBindDN) |
| | |
| | | * @return The set of backends that have been registered with the Directory |
| | | * Server. |
| | | */ |
| | | public static Map<String, Backend> getBackends() |
| | | public static Map<String, Backend<?>> getBackends() |
| | | { |
| | | return new TreeMap<String, Backend>(directoryServer.backends); |
| | | return new TreeMap<>(directoryServer.backends); |
| | | } |
| | | |
| | | /** |
| | |
| | | LocalizableMessage message = ERR_REGISTER_BACKEND_ALREADY_EXISTS.get(backendID); |
| | | throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message); |
| | | } |
| | | else |
| | | |
| | | newBackends.put(backendID, backend); |
| | | directoryServer.backends = newBackends; |
| | | |
| | | for (String oid : backend.getSupportedControls()) |
| | | { |
| | | newBackends.put(backendID, backend); |
| | | directoryServer.backends = newBackends; |
| | | |
| | | for (String oid : backend.getSupportedControls()) |
| | | { |
| | | registerSupportedControl(oid); |
| | | } |
| | | |
| | | for (String oid : backend.getSupportedFeatures()) |
| | | { |
| | | registerSupportedFeature(oid); |
| | | } |
| | | |
| | | BackendMonitor monitor = new BackendMonitor(backend); |
| | | monitor.initializeMonitorProvider(null); |
| | | backend.setBackendMonitor(monitor); |
| | | registerMonitorProvider(monitor); |
| | | registerSupportedControl(oid); |
| | | } |
| | | |
| | | for (String oid : backend.getSupportedFeatures()) |
| | | { |
| | | registerSupportedFeature(oid); |
| | | } |
| | | |
| | | BackendMonitor monitor = new BackendMonitor(backend); |
| | | monitor.initializeMonitorProvider(null); |
| | | backend.setBackendMonitor(monitor); |
| | | registerMonitorProvider(monitor); |
| | | } |
| | | } |
| | | |
| | |
| | | * |
| | | * @return The entire set of base DNs registered with the Directory Server. |
| | | */ |
| | | public static Map<DN,Backend> getBaseDNs() |
| | | public static Map<DN, Backend<?>> getBaseDNs() |
| | | { |
| | | return directoryServer.baseDnRegistry.getBaseDnMap(); |
| | | } |
| | |
| | | return directoryServer.rootDSEBackend; |
| | | } |
| | | |
| | | Map<DN,Backend> baseDNs = directoryServer.baseDnRegistry.getBaseDnMap(); |
| | | Map<DN, Backend<?>> baseDNs = directoryServer.baseDnRegistry.getBaseDnMap(); |
| | | Backend<?> b = baseDNs.get(entryDN); |
| | | while (b == null) |
| | | { |
| | |
| | | ifNull(baseDN); |
| | | |
| | | synchronized(directoryServer) { |
| | | |
| | | List<LocalizableMessage> warnings = |
| | | directoryServer.baseDnRegistry.deregisterBaseDN(baseDN); |
| | | |
| | |
| | | * |
| | | * @return The set of public naming contexts defined in the Directory Server. |
| | | */ |
| | | public static Map<DN,Backend> getPublicNamingContexts() |
| | | public static Map<DN, Backend<?>> getPublicNamingContexts() |
| | | { |
| | | return directoryServer.baseDnRegistry.getPublicNamingContextsMap(); |
| | | } |
| | |
| | | * @return The set of private naming contexts defined in the Directory |
| | | * Server. |
| | | */ |
| | | public static Map<DN,Backend> getPrivateNamingContexts() |
| | | public static Map<DN, Backend<?>> getPrivateNamingContexts() |
| | | { |
| | | return directoryServer.baseDnRegistry.getPrivateNamingContextsMap(); |
| | | } |
| | |
| | | * Retrieves the DN of the entry containing the server schema definitions. |
| | | * |
| | | * @return The DN of the entry containing the server schema definitions, or |
| | | * <CODE>null</CODE> if none has been defined (e.g., if no schema |
| | | * {@code null} if none has been defined (e.g., if no schema |
| | | * backend has been configured). |
| | | */ |
| | | public static DN getSchemaDN() |
| | |
| | | * |
| | | * @param entryDN |
| | | * The DN of the entry to retrieve. |
| | | * @return The requested entry, or <CODE>null</CODE> if it does not exist. |
| | | * @return The requested entry, or {@code null} if it does not exist. |
| | | * @throws DirectoryException |
| | | * If a problem occurs while attempting to retrieve the entry. |
| | | */ |
| | |
| | | * @return The set of extended operations that may be processed by the |
| | | * Directory Server. |
| | | */ |
| | | public static ConcurrentMap<String, ExtendedOperationHandler> |
| | | getSupportedExtensions() |
| | | public static ConcurrentMap<String, ExtendedOperationHandler<?>> getSupportedExtensions() |
| | | { |
| | | return directoryServer.extendedOperationHandlers; |
| | | } |
| | |
| | | * @param oid The OID of the extended operation to retrieve. |
| | | * |
| | | * @return The handler for the specified extended operation, or |
| | | * <CODE>null</CODE> if there is none. |
| | | * {@code null} if there is none. |
| | | */ |
| | | public static ExtendedOperationHandler getExtendedOperationHandler(String oid) |
| | | public static ExtendedOperationHandler<?> getExtendedOperationHandler(String oid) |
| | | { |
| | | return directoryServer.extendedOperationHandlers.get(oid); |
| | | } |
| | |
| | | * @param handler The extended operation handler to register with the |
| | | * Directory Server. |
| | | */ |
| | | public static void registerSupportedExtension(String oid, |
| | | ExtendedOperationHandler handler) |
| | | public static void registerSupportedExtension(String oid, ExtendedOperationHandler<?> handler) |
| | | { |
| | | directoryServer.extendedOperationHandlers.put(toLowerCase(oid), handler); |
| | | } |
| | |
| | | * @return The set of SASL mechanisms that are supported by the Directory |
| | | * Server. |
| | | */ |
| | | public static ConcurrentMap<String, SASLMechanismHandler> |
| | | getSupportedSASLMechanisms() |
| | | public static ConcurrentMap<String, SASLMechanismHandler<?>> getSupportedSASLMechanisms() |
| | | { |
| | | return directoryServer.saslMechanismHandlers; |
| | | } |
| | |
| | | * |
| | | * @param name The name of the SASL mechanism to retrieve. |
| | | * |
| | | * @return The handler for the specified SASL mechanism, or <CODE>null</CODE> |
| | | * @return The handler for the specified SASL mechanism, or {@code null} |
| | | * if there is none. |
| | | */ |
| | | public static SASLMechanismHandler getSASLMechanismHandler(String name) |
| | | public static SASLMechanismHandler<?> getSASLMechanismHandler(String name) |
| | | { |
| | | return directoryServer.saslMechanismHandlers.get(name); |
| | | } |
| | |
| | | * @param handler The SASL mechanism handler to register with the Directory |
| | | * Server. |
| | | */ |
| | | public static void registerSASLMechanismHandler(String name, |
| | | SASLMechanismHandler handler) |
| | | public static void registerSASLMechanismHandler(String name, SASLMechanismHandler<?> handler) |
| | | { |
| | | // FIXME -- Should we force this name to be lowercase? If so, then will |
| | | // that cause the lower name to be used in the root DSE? |
| | |
| | | */ |
| | | public static synchronized void registerSupportedLDAPVersion( |
| | | int supportedLDAPVersion, |
| | | ConnectionHandler connectionHandler) |
| | | ConnectionHandler<?> connectionHandler) |
| | | { |
| | | List<ConnectionHandler> handlers = directoryServer.supportedLDAPVersions.get(supportedLDAPVersion); |
| | | List<ConnectionHandler<?>> handlers = directoryServer.supportedLDAPVersions.get(supportedLDAPVersion); |
| | | if (handlers == null) |
| | | { |
| | | directoryServer.supportedLDAPVersions.put(supportedLDAPVersion, newLinkedList(connectionHandler)); |
| | | handlers = new LinkedList<>(); |
| | | handlers.add(connectionHandler); |
| | | directoryServer.supportedLDAPVersions.put(supportedLDAPVersion, handlers); |
| | | } |
| | | else if (!handlers.contains(connectionHandler)) |
| | | { |
| | |
| | | */ |
| | | public static synchronized void deregisterSupportedLDAPVersion( |
| | | int supportedLDAPVersion, |
| | | ConnectionHandler connectionHandler) |
| | | ConnectionHandler<?> connectionHandler) |
| | | { |
| | | List<ConnectionHandler> handlers = |
| | | directoryServer.supportedLDAPVersions.get(supportedLDAPVersion); |
| | | List<ConnectionHandler<?>> handlers = directoryServer.supportedLDAPVersions.get(supportedLDAPVersion); |
| | | if (handlers != null) |
| | | { |
| | | handlers.remove(connectionHandler); |
| | |
| | | * @return The set of identity mappers defined in the Directory Server |
| | | * configuration. |
| | | */ |
| | | public static ConcurrentMap<DN, IdentityMapper> getIdentityMappers() |
| | | public static ConcurrentMap<DN, IdentityMapper<?>> getIdentityMappers() |
| | | { |
| | | return directoryServer.identityMappers; |
| | | } |
| | |
| | | * @param configEntryDN The DN of the configuration entry for the identity |
| | | * mapper to retrieve. |
| | | * |
| | | * @return The requested identity mapper, or <CODE>null</CODE> if the |
| | | * @return The requested identity mapper, or {@code null} if the |
| | | * provided entry DN is not associated with an active identity |
| | | * mapper. |
| | | */ |
| | | public static IdentityMapper getIdentityMapper(DN configEntryDN) |
| | | public static IdentityMapper<?> getIdentityMapper(DN configEntryDN) |
| | | { |
| | | return directoryServer.identityMappers.get(configEntryDN); |
| | | } |
| | |
| | | * identity mapper definition resides. |
| | | * @param identityMapper The identity mapper to be registered. |
| | | */ |
| | | public static void registerIdentityMapper(DN configEntryDN, |
| | | IdentityMapper identityMapper) |
| | | public static void registerIdentityMapper(DN configEntryDN, IdentityMapper<?> identityMapper) |
| | | { |
| | | directoryServer.identityMappers.put(configEntryDN, identityMapper); |
| | | } |
| | |
| | | * |
| | | * @return The DN of the configuration entry for the identity mapper that |
| | | * should be used in conjunction with proxied authorization V2 |
| | | * controls, or <CODE>null</CODE> if none is defined. |
| | | * controls, or {@code null} if none is defined. |
| | | */ |
| | | public static DN getProxiedAuthorizationIdentityMapperDN() |
| | | { |
| | |
| | | * |
| | | * @return The identity mapper that should be used to resolve authorization |
| | | * IDs contained in proxied authorization V2 controls, or |
| | | * <CODE>null</CODE> if none is defined. |
| | | * {@code null} if none is defined. |
| | | */ |
| | | public static IdentityMapper getProxiedAuthorizationIdentityMapper() |
| | | public static IdentityMapper<?> getProxiedAuthorizationIdentityMapper() |
| | | { |
| | | if (directoryServer.proxiedAuthorizationIdentityMapperDN == null) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | return directoryServer.identityMappers.get( |
| | | directoryServer.proxiedAuthorizationIdentityMapperDN); |
| | | DN dnMapper = directoryServer.proxiedAuthorizationIdentityMapperDN; |
| | | return dnMapper != null ? directoryServer.identityMappers.get(dnMapper) : null; |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * @return The set of connection handlers configured in the Directory Server. |
| | | */ |
| | | public static List<ConnectionHandler> getConnectionHandlers() |
| | | public static List<ConnectionHandler<?>> getConnectionHandlers() |
| | | { |
| | | return directoryServer.connectionHandlers; |
| | | } |
| | |
| | | * @param handler The connection handler to register with the Directory |
| | | * Server. |
| | | */ |
| | | public static void registerConnectionHandler(ConnectionHandler<? extends ConnectionHandlerCfg> |
| | | handler) |
| | | public static void registerConnectionHandler(ConnectionHandler<? extends ConnectionHandlerCfg> handler) |
| | | { |
| | | synchronized (directoryServer.connectionHandlers) |
| | | { |
| | |
| | | * @param handler The connection handler to deregister with the Directory |
| | | * Server. |
| | | */ |
| | | public static void deregisterConnectionHandler(ConnectionHandler handler) |
| | | public static void deregisterConnectionHandler(ConnectionHandler<?> handler) |
| | | { |
| | | synchronized (directoryServer.connectionHandlers) |
| | | { |
| | |
| | | } |
| | | |
| | | // At this point, we should be ready to go. |
| | | for (ConnectionHandler handler : connectionHandlers) |
| | | for (ConnectionHandler<?> handler : connectionHandlers) |
| | | { |
| | | handler.start(); |
| | | } |
| | |
| | | * |
| | | * @return A reference to the Directory Server work queue. |
| | | */ |
| | | public static WorkQueue getWorkQueue() |
| | | public static WorkQueue<?> getWorkQueue() |
| | | { |
| | | return directoryServer.workQueue; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | user = clientConnection.getAuthenticationInfo() |
| | | .getAuthorizationDN(); |
| | | message = ERR_ENQUEUE_MUST_CHANGE_PASSWORD |
| | | .get(user != null ? user : "anonymous"); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, |
| | | message); |
| | | user = clientConnection.getAuthenticationInfo().getAuthorizationDN(); |
| | | message = ERR_ENQUEUE_MUST_CHANGE_PASSWORD.get(user != null ? user : "anonymous"); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, message); |
| | | } |
| | | |
| | | break; |
| | |
| | | } |
| | | |
| | | /** |
| | | * Deregisters the provided synchronization provider with the Directory |
| | | * Server. |
| | | * Deregisters the provided synchronization provider with the Directory Server. |
| | | * |
| | | * @param provider The synchronization provider to deregister. |
| | | */ |
| | | public static void deregisterSynchronizationProvider(SynchronizationProvider |
| | | provider) |
| | | public static void deregisterSynchronizationProvider(SynchronizationProvider<?> provider) |
| | | { |
| | | directoryServer.synchronizationProviders.remove(provider); |
| | | } |
| | |
| | | shutdownMonitor.start(); |
| | | |
| | | // Shut down the connection handlers. |
| | | for (ConnectionHandler handler : directoryServer.connectionHandlers) |
| | | for (ConnectionHandler<?> handler : directoryServer.connectionHandlers) |
| | | { |
| | | try |
| | | { |
| | | handler.finalizeConnectionHandler( |
| | | INFO_CONNHANDLER_CLOSED_BY_SHUTDOWN.get()); |
| | | handler.finalizeConnectionHandler(INFO_CONNHANDLER_CLOSED_BY_SHUTDOWN.get()); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | } |
| | | |
| | | // shutdown replication |
| | | for (SynchronizationProvider provider : |
| | | directoryServer.synchronizationProviders) |
| | | for (SynchronizationProvider<?> provider : directoryServer.synchronizationProviders) |
| | | { |
| | | provider.finalizeSynchronizationProvider(); |
| | | } |
| | |
| | | } |
| | | |
| | | // Shut down all of the alert handlers. |
| | | for (AlertHandler alertHandler : directoryServer.alertHandlers) |
| | | for (AlertHandler<?> alertHandler : directoryServer.alertHandlers) |
| | | { |
| | | alertHandler.finalizeAlertHandler(); |
| | | } |
| | |
| | | // Deregister all of the JMX MBeans. |
| | | if (directoryServer.mBeanServer != null) |
| | | { |
| | | Set mBeanSet = directoryServer.mBeanServer.queryMBeans(null, null); |
| | | Set<?> mBeanSet = directoryServer.mBeanServer.queryMBeans(null, null); |
| | | for (Object o : mBeanSet) |
| | | { |
| | | if (o instanceof DirectoryServerMBean) |
| | |
| | | } |
| | | |
| | | // Finalize all of the SASL mechanism handlers. |
| | | for (SASLMechanismHandler handler : |
| | | directoryServer.saslMechanismHandlers.values()) |
| | | for (SASLMechanismHandler<?> handler : directoryServer.saslMechanismHandlers.values()) |
| | | { |
| | | try |
| | | { |
| | |
| | | } |
| | | |
| | | // Finalize all of the extended operation handlers. |
| | | for (ExtendedOperationHandler handler : |
| | | directoryServer.extendedOperationHandlers.values()) |
| | | for (ExtendedOperationHandler<?> handler : directoryServer.extendedOperationHandlers.values()) |
| | | { |
| | | try |
| | | { |
| | |
| | | } |
| | | |
| | | // Finalize the access control handler |
| | | AccessControlHandler accessControlHandler = |
| | | AccessControlHandler<?> accessControlHandler = |
| | | AccessControlConfigManager.getInstance().getAccessControlHandler(); |
| | | if (accessControlHandler != null) |
| | | { |
| | |
| | | // NYI |
| | | |
| | | // Shut down the monitor providers. |
| | | for (MonitorProvider monitor : directoryServer.monitorProviders.values()) |
| | | for (MonitorProvider<?> monitor : directoryServer.monitorProviders.values()) |
| | | { |
| | | try |
| | | { |
| | |
| | | * @param provider The monitor provider for which a DN is desired. |
| | | * @return The DN of the monitor provider entry. |
| | | */ |
| | | public static DN getMonitorProviderDN(MonitorProvider provider) |
| | | public static DN getMonitorProviderDN(MonitorProvider<?> provider) |
| | | { |
| | | // Get a complete DN which could be a tree naming schema |
| | | return DN.valueOf("cn=" + provider.getMonitorInstanceName() + "," + DN_MONITOR_ROOT); |
| | |
| | | */ |
| | | private static int checkStartability(ArgumentParser argParser) |
| | | { |
| | | int returnValue; |
| | | boolean isServerRunning; |
| | | |
| | | BooleanArgument noDetach = |
| | |
| | | isServerRunning = true; |
| | | } |
| | | |
| | | boolean configuredAsService = isRunningAsWindowsService(); |
| | | |
| | | final boolean configuredAsWindowsService = isRunningAsWindowsService(); |
| | | if (isServerRunning) |
| | | { |
| | | if (configuredAsService && !windowsNetStartPresent) |
| | | if (configuredAsWindowsService && !windowsNetStartPresent) |
| | | { |
| | | returnValue = START_AS_WINDOWS_SERVICE; |
| | | return START_AS_WINDOWS_SERVICE; |
| | | } |
| | | else |
| | | { |
| | | returnValue = SERVER_ALREADY_STARTED; |
| | | return SERVER_ALREADY_STARTED; |
| | | } |
| | | } |
| | | else if (configuredAsWindowsService) |
| | | { |
| | | if (noDetachPresent) |
| | | { |
| | | // Conflicting arguments |
| | | System.err.println(ERR_DSCORE_ERROR_NODETACH_AND_WINDOW_SERVICE.get()); |
| | | return CHECK_ERROR; |
| | | } |
| | | else if (windowsNetStartPresent) |
| | | { |
| | | // start-ds.bat is being called through net start, so return |
| | | // START_AS_DETACH_CALLED_FROM_WINDOWS_SERVICE so that the batch |
| | | // file actually starts the server. |
| | | return START_AS_DETACH_CALLED_FROM_WINDOWS_SERVICE; |
| | | } |
| | | else |
| | | { |
| | | return START_AS_WINDOWS_SERVICE; |
| | | } |
| | | } |
| | | else if (noDetachPresent) |
| | | { |
| | | if (quietMode.isPresent()) |
| | | { |
| | | return START_AS_NON_DETACH_QUIET; |
| | | } |
| | | else |
| | | { |
| | | return START_AS_NON_DETACH; |
| | | } |
| | | } |
| | | else if (quietMode.isPresent()) |
| | | { |
| | | return START_AS_DETACH_QUIET; |
| | | } |
| | | else |
| | | { |
| | | if (configuredAsService) |
| | | { |
| | | if (noDetachPresent) |
| | | { |
| | | // Conflicting arguments |
| | | returnValue = CHECK_ERROR; |
| | | LocalizableMessage message = ERR_DSCORE_ERROR_NODETACH_AND_WINDOW_SERVICE.get(); |
| | | System.err.println(message); |
| | | |
| | | } |
| | | else |
| | | { |
| | | if (windowsNetStartPresent) |
| | | { |
| | | // start-ds.bat is being called through net start, so return |
| | | // START_AS_DETACH_CALLED_FROM_WINDOWS_SERVICE so that the batch |
| | | // file actually starts the server. |
| | | returnValue = START_AS_DETACH_CALLED_FROM_WINDOWS_SERVICE; |
| | | } |
| | | else |
| | | { |
| | | returnValue = START_AS_WINDOWS_SERVICE; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (noDetachPresent) |
| | | { |
| | | if (quietMode.isPresent()) |
| | | { |
| | | returnValue = START_AS_NON_DETACH_QUIET; |
| | | } |
| | | else |
| | | { |
| | | returnValue = START_AS_NON_DETACH; |
| | | } |
| | | } |
| | | else if (quietMode.isPresent()) |
| | | { |
| | | returnValue = START_AS_DETACH_QUIET; |
| | | } |
| | | else |
| | | { |
| | | returnValue = START_AS_DETACH; |
| | | } |
| | | } |
| | | return START_AS_DETACH; |
| | | } |
| | | return returnValue; |
| | | } |
| | | |
| | | /** |