public final class KeyGeneratorRegistry extends Object
Constructor and Description |
---|
KeyGeneratorRegistry(DDLGenConfiguration config)
Construct an instance of each key generator factory specified in given
configuration.
|
Modifier and Type | Method and Description |
---|---|
KeyGenerator |
createKeyGenerator(KeyGeneratorDef definition)
Create an instance of the key generator specifed by given definiton.
|
KeyGenerator |
getKeyGenerator(String alias)
Returns key generator with given alias.
|
Collection<String> |
getKeyGeneratorAliases()
Returns a collection of the aliasses of current registered key generators.
|
Collection<KeyGeneratorFactory> |
getKeyGeneratorFactories()
Returns a collection of the current configured key generator factories.
|
KeyGeneratorFactory |
getKeyGeneratorFactory(String algorithm)
Returns key generator factory with given algorithm.
|
Collection<String> |
getKeyGeneratorFactoryAlgorithms()
Returns a collection of the algorithms of current configured key generator
factories.
|
Collection<KeyGenerator> |
getKeyGenerators()
Returns a collection of the current registered key generators.
|
public KeyGeneratorRegistry(DDLGenConfiguration config)
config
- The configuration to obtain the key generator factory classes from.
Also used for all key generator instances to obtain configuration
properties from.public KeyGenerator createKeyGenerator(KeyGeneratorDef definition) throws GeneratorException
definition
- The definition to initialize the key generator.GeneratorException
- If failed to create a key generator instance.public KeyGeneratorFactory getKeyGeneratorFactory(String algorithm) throws GeneratorException
algorithm
- Algorithm of the key generator factory.GeneratorException
- If no key generator factory with given algorithm can
be found.public Collection<KeyGeneratorFactory> getKeyGeneratorFactories()
public Collection<String> getKeyGeneratorFactoryAlgorithms()
public KeyGenerator getKeyGenerator(String alias) throws GeneratorException
alias
- Alias of the key generator.GeneratorException
- If no generator for alias can be found.public Collection<KeyGenerator> getKeyGenerators()
public Collection<String> getKeyGeneratorAliases()
Copyright © 2016. All rights reserved.