org.castor.ddlgen
Class KeyGeneratorRegistry
java.lang.Object
org.castor.ddlgen.KeyGeneratorRegistry
public final class KeyGeneratorRegistry
extends java.lang.Object
Registry for key generator factory implementations obtained from the configuration.
In addition this is also a registry for key generators that holds default key
generators as well as key generators defined through mapping.
$Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
KeyGeneratorRegistry
public KeyGeneratorRegistry(DDLGenConfiguration config)
Construct an instance of each key generator factory specified in given
configuration. If key generator does not require mandatory parameters a default
instance of the key generator will also be created.
config
- The configuration to obtain the key generator factory classes from.
Also used for all key generator instances to obtain configuration
properties from.
createKeyGenerator
public KeyGenerator createKeyGenerator(KeyGeneratorDef definition)
throws GeneratorException
Create an instance of the key generator specifed by given definiton. The name
of the definition is used as algorithm to lookup the key generator factory. The
is used to create a key generator initialized with the given definition and the
configuration that has been passed to the constructor of this registry. At least
the key generator is added to the registry assoziated by its alias.
definition
- The definition to initialize the key generator.
- A key generator instance initialized with given definition.
getKeyGenerator
public KeyGenerator getKeyGenerator(String alias)
throws GeneratorException
Returns key generator with given alias.
alias
- Alias of the key generator.
- Generator with given alias.
getKeyGeneratorAliases
public Collection getKeyGeneratorAliases()
Returns a collection of the aliasses of current registered key generators.
- Aliasses of current registered key generators.
getKeyGeneratorFactories
public Collection getKeyGeneratorFactories()
Returns a collection of the current configured key generator factories.
- Collection of the current configured key generator factories.
getKeyGeneratorFactory
public KeyGeneratorFactory getKeyGeneratorFactory(String algorithm)
throws GeneratorException
Returns key generator factory with given algorithm.
algorithm
- Algorithm of the key generator factory.
- Key generator factory with algorithm.
getKeyGeneratorFactoryAlgorithms
public Collection getKeyGeneratorFactoryAlgorithms()
Returns a collection of the algorithms of current configured key generator
factories.
- Algorithms of current configured key generator factories.
getKeyGenerators
public Collection getKeyGenerators()
Returns a collection of the current registered key generators.
- Collection of the current registered key generators.
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com