CV
- The type of the CipherVersion
to be created.CipherVersionFactoryImpl
public interface CipherVersionFactory<CV extends CipherVersion> extends org.refcodes.factory.ContextLookupFactory<CV,String,String>
CipherVersion
instances with
additional attributes or functionality; the CipherVersionFactory
can
be replaced with a custom implementation instantiating CipherVersion
(sub-)types with the additional required attributes or functionality.
Additional attributes might be a validity date useful for housekeeping or
management purposes.
In case you provide your custom CipherVersionFactory
implementation,
make sure the cipher version (sub-)type you return fits with the
CipherVersion
(sub-)type of your custom
CipherVersionGenerator
. A good approach is to make your custom
CipherVersionGenerator
make use your custom
CipherVersionFactory
.
See the default implementations CipherVersionGeneratorImpl
, the
AbstractCipherVersionGenerator
and the
CipherVersionFactoryImpl
.
Modifier and Type | Method | Description |
---|---|---|
CV |
createInstance(String aCipherUid,
String aCipher) |
Factory method to be implemented by subclasses.
|
CV createInstance(String aCipherUid, String aCipher)
CipherVersion
objects.createInstance
in interface org.refcodes.factory.ContextLookupFactory<CV extends CipherVersion,String,String>
aCipherUid
- The UID for the cipher to be stored in the
CipherVersion
aCipher
- The cipher to be stored in the CipherVersion
.CipherVersion
with the cipher UID and the cipherCopyright © 2018. All rights reserved.