org.castor.ddlgen.keygenerator
Class UUIDKeyGeneratorFactory

java.lang.Object
  extended by org.castor.ddlgen.keygenerator.UUIDKeyGeneratorFactory
All Implemented Interfaces:
KeyGeneratorFactory

public final class UUIDKeyGeneratorFactory
extends java.lang.Object
implements KeyGeneratorFactory

Factory class for UUID key generators.

Since:
1.1
Version:
$Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
Author:
Le Duc Bao, Ralf Joachim

Constructor Summary
UUIDKeyGeneratorFactory()
           
 
Method Summary
 KeyGenerator createKeyGenerator()
          Create a default key generator instance with the algorithm the factory is responsible for.
 KeyGenerator createKeyGenerator(KeyGeneratorDef definition)
          Create a key generator instance from the given definition with the algorithm the factory is responsible for.
 java.lang.String getAlgorithmName()
          Get name of key generator algorithm.
 boolean hasMandatoryParameters()
          Does the algorithm has mandatory parameters and therefore requires a key generator definition in mapping file?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UUIDKeyGeneratorFactory

public UUIDKeyGeneratorFactory()
Method Detail

getAlgorithmName

public java.lang.String getAlgorithmName()
Get name of key generator algorithm.

Specified by:
getAlgorithmName in interface KeyGeneratorFactory
Returns:
Name of key generator algorithm.

hasMandatoryParameters

public boolean hasMandatoryParameters()
Does the algorithm has mandatory parameters and therefore requires a key generator definition in mapping file?

Specified by:
hasMandatoryParameters in interface KeyGeneratorFactory
Returns:
true if algorithm has mandatory parameters and therefore requires a key generator definition in mapping file. false if algorithm does not require parameters or has only optional parameters.

createKeyGenerator

public KeyGenerator createKeyGenerator()
Create a default key generator instance with the algorithm the factory is responsible for. This is only possible for those algorithms that do not require mandatory parameters.

Specified by:
createKeyGenerator in interface KeyGeneratorFactory
Returns:
A default key generator instance with the algorithm the factory is responsible for.

createKeyGenerator

public KeyGenerator createKeyGenerator(KeyGeneratorDef definition)
                                throws GeneratorException
Create a key generator instance from the given definition with the algorithm the factory is responsible for.

Specified by:
createKeyGenerator in interface KeyGeneratorFactory
Parameters:
definition - The definition to initialize the key generator.
Returns:
A key generator instance initialized with given definition with the algorithm the factory is responsible for.
Throws:
GeneratorException - If failed to create a key generator instance.


Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com