Spring Data MongoDB - Core

org.springframework.data.mongodb.core.mapping.event
Class AuditingEventListener

java.lang.Object
  extended by org.springframework.data.mongodb.core.mapping.event.AuditingEventListener
All Implemented Interfaces:
EventListener, ApplicationListener<BeforeConvertEvent<Object>>

public class AuditingEventListener
extends Object
implements ApplicationListener<BeforeConvertEvent<Object>>

Event listener to populate auditing related fields on an entity about to be saved.

Author:
Oliver Gierke, Thomas Darimont

Constructor Summary
AuditingEventListener(ObjectFactory<IsNewAwareAuditingHandler> auditingHandlerFactory)
          Creates a new AuditingEventListener using the given MappingContext and AuditingHandler provided by the given ObjectFactory.
 
Method Summary
 void onApplicationEvent(BeforeConvertEvent<Object> event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuditingEventListener

public AuditingEventListener(ObjectFactory<IsNewAwareAuditingHandler> auditingHandlerFactory)
Creates a new AuditingEventListener using the given MappingContext and AuditingHandler provided by the given ObjectFactory.

Parameters:
auditingHandlerFactory - must not be null.
Method Detail

onApplicationEvent

public void onApplicationEvent(BeforeConvertEvent<Object> event)
Specified by:
onApplicationEvent in interface ApplicationListener<BeforeConvertEvent<Object>>

Spring Data MongoDB - Core

Copyright © 2011-2014–2014 Pivotal Software, Inc.. All rights reserved.