public abstract class AuditingBeanDefinitionRegistrarSupport extends Object implements ImportBeanDefinitionRegistrar
ImportBeanDefinitionRegistrar
that serves as a base class for store specific implementations for
configuring audit support. Registers a AuditingHandler
based on the provided configuration(
AuditingConfiguration
).Constructor and Description |
---|
AuditingBeanDefinitionRegistrarSupport() |
Modifier and Type | Method and Description |
---|---|
protected BeanDefinitionBuilder |
configureDefaultAuditHandlerAttributes(AuditingConfiguration configuration,
BeanDefinitionBuilder builder)
Configures the given
BeanDefinitionBuilder with the default attributes from the given
AuditingConfiguration . |
protected abstract Class<? extends Annotation> |
getAnnotation()
Return the annotation type to lookup configuration values from.
|
protected BeanDefinitionBuilder |
getAuditHandlerBeanDefinitionBuilder(AuditingConfiguration configuration)
Creates a
BeanDefinitionBuilder to ease the definition of store specific AuditingHandler
implementations. |
protected abstract String |
getAuditingHandlerBeanName()
Return the name to be used to register the
AuditingHandler under. |
protected AuditingConfiguration |
getConfiguration(AnnotationMetadata annotationMetadata)
Retrieve auditing configuration from the given
AnnotationMetadata . |
protected abstract void |
registerAuditListenerBeanDefinition(BeanDefinition auditingHandlerDefinition,
BeanDefinitionRegistry registry)
Register the listener to eventually trigger the
AuditingHandler . |
void |
registerBeanDefinitions(AnnotationMetadata annotationMetadata,
BeanDefinitionRegistry registry) |
protected void |
registerInfrastructureBeanWithId(AbstractBeanDefinition definition,
String id,
BeanDefinitionRegistry registry)
Registers the given
AbstractBeanDefinition as infrastructure bean under the given id. |
public AuditingBeanDefinitionRegistrarSupport()
public void registerBeanDefinitions(AnnotationMetadata annotationMetadata, BeanDefinitionRegistry registry)
registerBeanDefinitions
in interface ImportBeanDefinitionRegistrar
protected BeanDefinitionBuilder getAuditHandlerBeanDefinitionBuilder(AuditingConfiguration configuration)
BeanDefinitionBuilder
to ease the definition of store specific AuditingHandler
implementations.configuration
- must not be null.protected BeanDefinitionBuilder configureDefaultAuditHandlerAttributes(AuditingConfiguration configuration, BeanDefinitionBuilder builder)
BeanDefinitionBuilder
with the default attributes from the given
AuditingConfiguration
.configuration
- must not be null.builder
- must not be null.protected AuditingConfiguration getConfiguration(AnnotationMetadata annotationMetadata)
AnnotationMetadata
.annotationMetadata
- will never be null.protected abstract Class<? extends Annotation> getAnnotation()
protected abstract void registerAuditListenerBeanDefinition(BeanDefinition auditingHandlerDefinition, BeanDefinitionRegistry registry)
AuditingHandler
.auditingHandlerDefinition
- will never be null.registry
- will never be null.protected abstract String getAuditingHandlerBeanName()
AuditingHandler
under.protected void registerInfrastructureBeanWithId(AbstractBeanDefinition definition, String id, BeanDefinitionRegistry registry)
AbstractBeanDefinition
as infrastructure bean under the given id.definition
- must not be null.id
- must not be null or empty.registry
- must not be null.Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.