Commit Graph

9 Commits

Author SHA1 Message Date
Oliver Gierke
e9bcca11be DATACMNS-365 - Enhanced auditing subsystem to work with accessor annotations.
Added a MappingAuditableBeanWrapperFactory to be able to use themapping metamodel to lookup annotations on persistent properties. This propagates into AuditingHandler and IsNewAwareAuditingHandler getting new constructors taking a MappingContext to set themselves up correctly. This will probably need store specific updates in the setup of the auditing infrastructure for namespace implementations and annotation based JavaConfig.

Introduced ….getPersistentProperty(Class<? extends Annotation> annotationType) on PersistentEntity to be able to access properties with a given annotation.

Updated SonarGraph architecture description and moved auditing related config classes into auditing.config package.
2014-03-18 19:56:45 +01:00
Oliver Gierke
324cee8cf0 DATACMNS-461 - Refactorings in auditing configuration support.
Cleaned up configuration setup. AuditingBeanDefinitionRegistrarSupport now exposes a getAuditingHandlerBeanName() method to determine the bean name to be used for the AuditingHandler.
2014-03-05 19:10:32 +01:00
Oliver Gierke
51b128fac1 DATACMNS-411 - Add support for Java 8 date/time types in auditing.
The auditing subsystem now supports the usage of JDK 8 date time types when running on Spring 4.0.1 or better. To achieve that switched to use the DefaultFormattingConversionService which registers the relevant converters needed. We also modified the SPI CurrentDateTimeProvider to return a Calendar instance as it carries time-zone information to be able to convert the instance into time-zone based JDK 8 date/time types.

This also allows us to make the use of JodaTime optional and only rely on it in case of the usage of Auditable or any of the JodaTime types used in the annotation based scenario. Added support to set LocalDateTime as well.
2014-01-12 19:23:35 +01:00
Oliver Gierke
05f303c2be DATACMNS-414 - Removed unnecessary generic types for AuditingHandler.
Removed the unnecessary type arguments for AuditingHandler so that the setter taking an AuditorAware<T> can be successfully wired against implementations other than AuditorAware<Object> with Spring 4. The type argument was superfluous anyway as internally the type wasn't referred to and the handler is not used on a by-type basis.
2014-01-12 19:23:22 +01:00
Oliver Gierke
a438d1ef17 DATACMNS-389 - Polishing of @Enable…Auditing support.
JavaDoc and assertion fixes.

Original pull requests: #26, #53.
2013-11-11 20:04:52 +01:00
Thomas Darimont
a7d909846c DATACMNS-389 - Support for JavaConfig in auditing.
Basic infrastructure for supporting annotation based auditing configuration.

Introduces AuditingBeanDefinitionRegistrarSupport for store specific auditing configuration enhancements. An AuditorAware instance is wired into the Auditing handler automatically if it's present in the ApplicationContext. The auditorAwareRef attribute of the enabling annotation can be used to disambiguate in case multiple AuditorAware instances are present in the configuration.

Original pull requests: #26, #53.
2013-11-11 20:04:40 +01:00
Oliver Gierke
04d6859354 DATACMNS-355 - ReflectionAuditingBeanWrapper now uses a ConversionService.
We're not manually converting the DateTime instance into the user field type but delegate to a ConversionService instance. This will allow us to automatically adhere to enhancements in conversion capabilities to the DefaultConversionService.
2013-08-07 13:48:19 +02:00
Oliver Gierke
ed32d83ab3 DATACMNS-287 - Added missing package-info.java files. 2013-02-19 12:47:01 +01:00
Oliver Gierke
ac256f9921 DATACMNS-266 - Use new common Maven build infrastructure.
Simplified project setup to be a single module build again. Using Spring Data Build parent POM to simplify project setup. See https://github.com/SpringSource/spring-data-build#spring-data-build-infrastructure
2013-01-16 15:15:24 +01:00