|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.castor.ddlgen.KeyGeneratorRegistry
public final class KeyGeneratorRegistry
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.
| Constructor Summary | |
|---|---|
KeyGeneratorRegistry(DDLGenConfiguration config)
Construct an instance of each key generator factory specified in given configuration. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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.| Method Detail |
|---|
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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||