public abstract class AuditingBeanDefinitionRegistrarSupport extends Object implements org.springframework.context.annotation.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 org.springframework.beans.factory.support.BeanDefinitionBuilder |
configureDefaultAuditHandlerAttributes(AuditingConfiguration configuration,
org.springframework.beans.factory.support.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 org.springframework.beans.factory.support.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(org.springframework.core.type.AnnotationMetadata annotationMetadata)
Retrieve auditing configuration from the given
AnnotationMetadata . |
protected abstract void |
registerAuditListenerBeanDefinition(org.springframework.beans.factory.config.BeanDefinition auditingHandlerDefinition,
org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
Register the listener to eventually trigger the
AuditingHandler . |
void |
registerBeanDefinitions(org.springframework.core.type.AnnotationMetadata annotationMetadata,
org.springframework.beans.factory.support.BeanDefinitionRegistry registry) |
protected void |
registerInfrastructureBeanWithId(org.springframework.beans.factory.support.AbstractBeanDefinition definition,
String id,
org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
Registers the given
AbstractBeanDefinition as infrastructure bean under the given id. |
public AuditingBeanDefinitionRegistrarSupport()
public void registerBeanDefinitions(org.springframework.core.type.AnnotationMetadata annotationMetadata, org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
registerBeanDefinitions
in interface org.springframework.context.annotation.ImportBeanDefinitionRegistrar
protected org.springframework.beans.factory.support.BeanDefinitionBuilder getAuditHandlerBeanDefinitionBuilder(AuditingConfiguration configuration)
BeanDefinitionBuilder
to ease the definition of store specific AuditingHandler
implementations.configuration
- must not be null.protected org.springframework.beans.factory.support.BeanDefinitionBuilder configureDefaultAuditHandlerAttributes(AuditingConfiguration configuration, org.springframework.beans.factory.support.BeanDefinitionBuilder builder)
BeanDefinitionBuilder
with the default attributes from the given
AuditingConfiguration
.configuration
- must not be null.builder
- must not be null.protected AuditingConfiguration getConfiguration(org.springframework.core.type.AnnotationMetadata annotationMetadata)
AnnotationMetadata
.annotationMetadata
- will never be null.protected abstract Class<? extends Annotation> getAnnotation()
protected abstract void registerAuditListenerBeanDefinition(org.springframework.beans.factory.config.BeanDefinition auditingHandlerDefinition, org.springframework.beans.factory.support.BeanDefinitionRegistry registry)
AuditingHandler
.auditingHandlerDefinition
- will never be null.registry
- will never be null.protected abstract String getAuditingHandlerBeanName()
AuditingHandler
under.protected void registerInfrastructureBeanWithId(org.springframework.beans.factory.support.AbstractBeanDefinition definition, String id, org.springframework.beans.factory.support.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–2017 Pivotal Software, Inc.. All rights reserved.