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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigChangeResultapplyConfigurationAdd(AccessControlHandlerCfg configuration)Adds a new configuration to this add listener.ConfigChangeResultapplyConfigurationChange(AccessControlHandlerCfg configuration)Applies the configuration changes to this change listener.ConfigChangeResultapplyConfigurationDelete(AccessControlHandlerCfg configuration)Deletes an existing configuration from this delete listener.AccessControlHandler<?>getAccessControlHandler()Get the active access control handler.Map<String,String>getAlerts()Retrieves information about the set of alerts that this generator may produce.DngetComponentEntryDN()Retrieves the DN of the configuration entry with which this alert generator is associated.static AccessControlConfigManagergetInstance()Get 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, wait
-
Methods inherited from interface org.opends.server.api.AlertGenerator
getClassName
-
-
-
-
Method Detail
-
getInstance
public static AccessControlConfigManager getInstance()
Get the single application-wide access control manager instance.- Returns:
- The access control manager.
-
getAccessControlHandler
public AccessControlHandler<?> 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
public ConfigChangeResult applyConfigurationAdd(AccessControlHandlerCfg configuration)
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
public ConfigChangeResult applyConfigurationChange(AccessControlHandlerCfg configuration)
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
public ConfigChangeResult applyConfigurationDelete(AccessControlHandlerCfg configuration)
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
public Dn 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
public Map<String,String> 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.
-
-