|
||||||||
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(java.lang.String alias)
Returns key generator with given alias. |
java.util.Collection |
getKeyGeneratorAliases()
Returns a collection of the aliasses of current registered key generators. |
java.util.Collection |
getKeyGeneratorFactories()
Returns a collection of the current configured key generator factories. |
KeyGeneratorFactory |
getKeyGeneratorFactory(java.lang.String algorithm)
Returns key generator factory with given algorithm. |
java.util.Collection |
getKeyGeneratorFactoryAlgorithms()
Returns a collection of the algorithms of current configured key generator factories. |
java.util.Collection |
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(java.lang.String algorithm) throws GeneratorException
algorithm
- Algorithm of the key generator factory.
GeneratorException
- If no key generator factory with given algorithm can
be found.public java.util.Collection getKeyGeneratorFactories()
public java.util.Collection getKeyGeneratorFactoryAlgorithms()
public KeyGenerator getKeyGenerator(java.lang.String alias) throws GeneratorException
alias
- Alias of the key generator.
GeneratorException
- If no generator for alias can be found.public java.util.Collection getKeyGenerators()
public java.util.Collection getKeyGeneratorAliases()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |