Package org.opends.server.extensions
Class ExactMatchIdentityMapper
java.lang.Object
org.opends.server.api.IdentityMapper<ExactMatchIdentityMapperCfg>
org.opends.server.extensions.ExactMatchIdentityMapper
- All Implemented Interfaces:
ConfigurationChangeListener<ExactMatchIdentityMapperCfg>
public final class ExactMatchIdentityMapper
extends IdentityMapper<ExactMatchIdentityMapperCfg>
implements ConfigurationChangeListener<ExactMatchIdentityMapperCfg>
This class provides an implementation of a Directory Server identity mapper that looks for the exact value provided
as the ID string to appear in an attribute of a user's entry. This mapper may be configured to look in one or more
attributes using zero or more search bases. In order for the mapping to be established properly, exactly one entry
must have an attribute that exactly matches (according to the equality matching rule associated with that attribute)
the ID value.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of this exact match identity mapper. -
Method Summary
Modifier and TypeMethodDescriptionapplyConfigurationChange(ExactMatchIdentityMapperCfg configuration) Applies the configuration changes to this change listener.voidPerforms any finalization that may be necessary for this identity mapper.getEntryForID(String id) Retrieves the user entry that was mapped to the provided identification string.voidinitializeIdentityMapper(ExactMatchIdentityMapperCfg configuration) Initializes this identity mapper based on the information in the provided configuration entry.booleanisConfigurationAcceptable(ExactMatchIdentityMapperCfg configuration, List<LocalizableMessage> unacceptableReasons) Indicates whether the provided configuration is acceptable for this identity mapper.booleanisConfigurationChangeAcceptable(ExactMatchIdentityMapperCfg configuration, List<LocalizableMessage> unacceptableReasons) Indicates whether the proposed change to the configuration is acceptable to this change listener.Methods inherited from class org.opends.server.api.IdentityMapper
getEntryForID, getServerContext, setServerContext
-
Constructor Details
-
ExactMatchIdentityMapper
public ExactMatchIdentityMapper()Creates a new instance of this exact match identity mapper. All initialization should be performed in theinitializeIdentityMappermethod.
-
-
Method Details
-
initializeIdentityMapper
public void initializeIdentityMapper(ExactMatchIdentityMapperCfg configuration) throws ConfigException Description copied from class:IdentityMapperInitializes this identity mapper based on the information in the provided configuration entry.- Specified by:
initializeIdentityMapperin classIdentityMapper<ExactMatchIdentityMapperCfg>- Parameters:
configuration- The configuration for the identity mapper.- Throws:
ConfigException- If an unrecoverable problem arises in the process of performing the initialization.
-
finalizeIdentityMapper
public void finalizeIdentityMapper()Description copied from class:IdentityMapperPerforms any finalization that may be necessary for this identity mapper. By default, no finalization is performed.- Overrides:
finalizeIdentityMapperin classIdentityMapper<ExactMatchIdentityMapperCfg>
-
getEntryForID
Retrieves the user entry that was mapped to the provided identification string.- Specified by:
getEntryForIDin classIdentityMapper<ExactMatchIdentityMapperCfg>- Parameters:
id- The identification string that is to be mapped to a user.- Returns:
- The user entry that was mapped to the provided identification, or
nullif no users were found that could be mapped to the provided ID. - Throws:
LdapException- If a problem occurs while attempting to map the given ID to a user entry, or if there are multiple user entries that could map to the provided ID.
-
isConfigurationAcceptable
public boolean isConfigurationAcceptable(ExactMatchIdentityMapperCfg configuration, List<LocalizableMessage> unacceptableReasons) Description copied from class:IdentityMapperIndicates whether the provided configuration is acceptable for this identity mapper. It should be possible to call this method on an uninitialized identity mapper instance in order to determine whether the identity mapper would be able to use the provided configuration.- Overrides:
isConfigurationAcceptablein classIdentityMapper<ExactMatchIdentityMapperCfg>- Parameters:
configuration- The identity mapper configuration for which to make the determination.unacceptableReasons- A list that may be used to hold the reasons that the provided configuration is not acceptable.- Returns:
trueif the provided configuration is acceptable for this identity mapper, orfalseif not.
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(ExactMatchIdentityMapperCfg 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<ExactMatchIdentityMapperCfg>- 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<ExactMatchIdentityMapperCfg>- Parameters:
configuration- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-