Package org.opends.server.core
Class AccessControlConfigManager
java.lang.Object
org.opends.server.core.AccessControlConfigManager
- All Implemented Interfaces:
ConfigurationAddListener<AccessControlHandlerCfg>
,ConfigurationChangeListener<AccessControlHandlerCfg>
,ConfigurationDeleteListener<AccessControlHandlerCfg>
,AlertGenerator
public final class AccessControlConfigManager
extends Object
implements AlertGenerator, ConfigurationAddListener<AccessControlHandlerCfg>, ConfigurationChangeListener<AccessControlHandlerCfg>, ConfigurationDeleteListener<AccessControlHandlerCfg>
This class manages the application-wide access-control configuration.
When access control is disabled a default "permissive" access control implementation is used, which permits all operations regardless of the identity of the user.
-
Method Summary
Modifier and TypeMethodDescriptionapplyConfigurationAdd
(AccessControlHandlerCfg configuration) Adds a new configuration to this add listener.applyConfigurationChange
(AccessControlHandlerCfg configuration) Applies the configuration changes to this change listener.applyConfigurationDelete
(AccessControlHandlerCfg configuration) Deletes an existing configuration from this delete listener.Get the active access control handler.Retrieves information about the set of alerts that this generator may produce.Retrieves the DN of the configuration entry with which this alert generator is associated.static AccessControlConfigManager
Get the single application-wide access control manager instance.boolean
isConfigurationAddAcceptable
(AccessControlHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons) Indicates whether the proposed addition of a new configuration is acceptable to this add listener.boolean
isConfigurationChangeAcceptable
(AccessControlHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons) Indicates whether the proposed change to the configuration is acceptable to this change listener.boolean
isConfigurationDeleteAcceptable
(AccessControlHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons) Indicates whether the proposed deletion of an existing configuration is acceptable to this delete listener.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.opends.server.api.AlertGenerator
getClassName
-
Method Details
-
getInstance
Get the single application-wide access control manager instance.- Returns:
- The access control manager.
-
getAccessControlHandler
Get the active access control handler.When access control is disabled, this method returns a default access control implementation which permits all operations.
- Returns:
- The active access control handler (never
null
).
-
isConfigurationAddAcceptable
public boolean isConfigurationAddAcceptable(AccessControlHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons) Description copied from interface:ConfigurationAddListener
Indicates whether the proposed addition of a new configuration is acceptable to this add listener.- Specified by:
isConfigurationAddAcceptable
in interfaceConfigurationAddListener<AccessControlHandlerCfg>
- Parameters:
configuration
- The configuration that will be added.unacceptableReasons
- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
true
if the proposed addition is acceptable, orfalse
if it is not.
-
applyConfigurationAdd
Description copied from interface:ConfigurationAddListener
Adds a new configuration to this add listener.- Specified by:
applyConfigurationAdd
in interfaceConfigurationAddListener<AccessControlHandlerCfg>
- Parameters:
configuration
- The configuration that will be added.- Returns:
- Returns information about the result of adding the configuration.
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(AccessControlHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons) Description copied from interface:ConfigurationChangeListener
Indicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptable
in interfaceConfigurationChangeListener<AccessControlHandlerCfg>
- Parameters:
configuration
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
true
if the proposed change is acceptable, orfalse
if it is not.
-
applyConfigurationChange
Description copied from interface:ConfigurationChangeListener
Applies the configuration changes to this change listener.- Specified by:
applyConfigurationChange
in interfaceConfigurationChangeListener<AccessControlHandlerCfg>
- Parameters:
configuration
- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-
isConfigurationDeleteAcceptable
public boolean isConfigurationDeleteAcceptable(AccessControlHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons) Description copied from interface:ConfigurationDeleteListener
Indicates whether the proposed deletion of an existing configuration is acceptable to this delete listener.- Specified by:
isConfigurationDeleteAcceptable
in interfaceConfigurationDeleteListener<AccessControlHandlerCfg>
- Parameters:
configuration
- The configuration that will be deleted.unacceptableReasons
- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
true
if the proposed deletion is acceptable, orfalse
if it is not.
-
applyConfigurationDelete
Description copied from interface:ConfigurationDeleteListener
Deletes an existing configuration from this delete listener.- Specified by:
applyConfigurationDelete
in interfaceConfigurationDeleteListener<AccessControlHandlerCfg>
- Parameters:
configuration
- The existing configuration that will be deleted.- Returns:
- Returns information about the result of deleting the configuration.
-
getComponentEntryDN
Description copied from interface:AlertGenerator
Retrieves the DN of the configuration entry with which this alert generator is associated.- Specified by:
getComponentEntryDN
in interfaceAlertGenerator
- Returns:
- The DN of the configuration entry with which this alert generator is associated.
-
getAlerts
Description copied from interface:AlertGenerator
Retrieves information about the set of alerts that this generator may produce. The map returned should be between the notification type for a particular notification and the human-readable description for that notification. This alert generator must not generate any alerts with types that are not contained in this list.- Specified by:
getAlerts
in interfaceAlertGenerator
- Returns:
- Information about the set of alerts that this generator may produce.
-