Package ch.admin.bit.jeap.crypto.spring
Class AbstractCryptoBeanDefinitionRegistryPostProcessor
java.lang.Object
ch.admin.bit.jeap.crypto.spring.AbstractCryptoBeanDefinitionRegistryPostProcessor
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.config.BeanFactoryPostProcessor,org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor,org.springframework.context.EnvironmentAware
public abstract class AbstractCryptoBeanDefinitionRegistryPostProcessor
extends Object
implements org.springframework.context.EnvironmentAware, org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
A
BeanDefinitionRegistryPostProcessor that registers two beans per configured encrpytion key:
- A
CryptoServicenamed _keyName_CryptoService - A
KeyManagementServicenamed _keyName_KeyManagementService
This allows for injection of the crypto service for a specific encryption key using the bean name or a qualifier:
@Qualifier("myKeyCryptoService")
@Autowired
CryptoService cryptoService;
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidregisterBeans(org.springframework.beans.factory.support.BeanDefinitionRegistry registry, String keyId, KeyReference keyReference, JeapCryptoDataFormat dataFormat, String kmsBeanName) voidsetEnvironment(org.springframework.core.env.Environment environment) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor
postProcessBeanDefinitionRegistry, postProcessBeanFactory
-
Field Details
-
environment
protected org.springframework.core.env.Environment environment
-
-
Constructor Details
-
AbstractCryptoBeanDefinitionRegistryPostProcessor
public AbstractCryptoBeanDefinitionRegistryPostProcessor()
-
-
Method Details
-
registerBeans
protected void registerBeans(org.springframework.beans.factory.support.BeanDefinitionRegistry registry, String keyId, KeyReference keyReference, JeapCryptoDataFormat dataFormat, String kmsBeanName) -
setEnvironment
public void setEnvironment(org.springframework.core.env.Environment environment) - Specified by:
setEnvironmentin interfaceorg.springframework.context.EnvironmentAware
-