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 AccessControlConfigManagerGet the single application-wide access control manager instance.booleanisConfigurationAddAcceptable(AccessControlHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons) Indicates whether the proposed addition of a new configuration is acceptable to this add listener.booleanisConfigurationChangeAcceptable(AccessControlHandlerCfg configuration, List<LocalizableMessage> unacceptableReasons) Indicates whether the proposed change to the configuration is acceptable to this change listener.booleanisConfigurationDeleteAcceptable(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, waitMethods 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:ConfigurationAddListenerIndicates whether the proposed addition of a new configuration is acceptable to this add listener.- Specified by:
isConfigurationAddAcceptablein 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
trueif the proposed addition is acceptable, orfalseif it is not.
-
applyConfigurationAdd
Description copied from interface:ConfigurationAddListenerAdds a new configuration to this add listener.- Specified by:
applyConfigurationAddin 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:ConfigurationChangeListenerIndicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptablein 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
trueif the proposed change is acceptable, orfalseif it is not.
-
applyConfigurationChange
Description copied from interface:ConfigurationChangeListenerApplies the configuration changes to this change listener.- Specified by:
applyConfigurationChangein 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:ConfigurationDeleteListenerIndicates whether the proposed deletion of an existing configuration is acceptable to this delete listener.- Specified by:
isConfigurationDeleteAcceptablein 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
trueif the proposed deletion is acceptable, orfalseif it is not.
-
applyConfigurationDelete
Description copied from interface:ConfigurationDeleteListenerDeletes an existing configuration from this delete listener.- Specified by:
applyConfigurationDeletein 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:AlertGeneratorRetrieves the DN of the configuration entry with which this alert generator is associated.- Specified by:
getComponentEntryDNin interfaceAlertGenerator- Returns:
- The DN of the configuration entry with which this alert generator is associated.
-
getAlerts
Description copied from interface:AlertGeneratorRetrieves 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:
getAlertsin interfaceAlertGenerator- Returns:
- Information about the set of alerts that this generator may produce.
-