Spring Data MongoDB

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

Constructor Summary
AuditingEventListener(IsNewAwareAuditingHandler<Object> auditingHandler)
          Creates a new AuditingEventListener using the given MappingContext and AuditingHandler.
 
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(IsNewAwareAuditingHandler<Object> auditingHandler)
Creates a new AuditingEventListener using the given MappingContext and AuditingHandler.

Parameters:
auditingHandler - must not be null.
Method Detail

onApplicationEvent

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

Spring Data MongoDB

Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.