public class RandomPasswordGenerator extends PasswordGenerator<RandomPasswordGeneratorCfg> implements ConfigurationChangeListener<RandomPasswordGeneratorCfg>
Constructor and Description |
---|
RandomPasswordGenerator() |
Modifier and Type | Method and Description |
---|---|
org.forgerock.opendj.config.server.ConfigChangeResult |
applyConfigurationChange(RandomPasswordGeneratorCfg configuration)
Applies the configuration changes to this change listener.
|
void |
finalizePasswordGenerator()
Performs any finalization work that may be necessary when this
password generator is taken out of service.
|
org.forgerock.opendj.ldap.ByteString |
generatePassword(Entry userEntry)
Generates a password for the user whose account is contained in the
specified entry.
|
void |
initializePasswordGenerator(RandomPasswordGeneratorCfg configuration)
Initializes this password generator based on the information in
the provided configuration entry.
|
boolean |
isConfigurationAcceptable(PasswordGeneratorCfg configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the provided configuration is acceptable for
this password generator.
|
boolean |
isConfigurationChangeAcceptable(RandomPasswordGeneratorCfg configuration,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is
acceptable to this change listener.
|
public RandomPasswordGenerator()
public void initializePasswordGenerator(RandomPasswordGeneratorCfg configuration) throws org.forgerock.opendj.config.server.ConfigException, InitializationException
initializePasswordGenerator
in class PasswordGenerator<RandomPasswordGeneratorCfg>
configuration
- The configuration to use to initialize
this password validator.org.forgerock.opendj.config.server.ConfigException
- If an unrecoverable problem arises in
the process of performing the
initialization.InitializationException
- If a problem occurs during
initialization that is not
related to the server
configuration.public void finalizePasswordGenerator()
finalizePasswordGenerator
in class PasswordGenerator<RandomPasswordGeneratorCfg>
public org.forgerock.opendj.ldap.ByteString generatePassword(Entry userEntry) throws DirectoryException
generatePassword
in class PasswordGenerator<RandomPasswordGeneratorCfg>
userEntry
- The entry for the user for whom the password is to be
generated.DirectoryException
- If a problem occurs while attempting to
generate the password.public boolean isConfigurationAcceptable(PasswordGeneratorCfg configuration, List<LocalizableMessage> unacceptableReasons)
isConfigurationAcceptable
in class PasswordGenerator<RandomPasswordGeneratorCfg>
configuration
- The password generator 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.true
if the provided configuration is acceptable
for this password generator, or false
if not.public boolean isConfigurationChangeAcceptable(RandomPasswordGeneratorCfg configuration, List<LocalizableMessage> unacceptableReasons)
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<RandomPasswordGeneratorCfg>
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.true
if the proposed change is
acceptable, or false
if it is not.public org.forgerock.opendj.config.server.ConfigChangeResult applyConfigurationChange(RandomPasswordGeneratorCfg configuration)
applyConfigurationChange
in interface ConfigurationChangeListener<RandomPasswordGeneratorCfg>
configuration
- The new configuration containing the changes.Copyright © 2010-2016 ForgeRock AS. All Rights Reserved.