TrashListener

public class TrashListener extends BaseListener<TrashService> implements DeleteLifecycleListener

The trash listener which listens to delete events. Before an object gets delete this listener will act based on the configured trash mode. If the trash mode is set to using trash, it will move this object to the trash bin using the org.motechproject.mds.service.TrashService. If trash mode is not set and deletes are permanent, this listener will remove the object history. Listener operations are executed in one transaction with the actual delete.

Methods

getServiceClass

protected Class<TrashService> getServiceClass()

postDelete

public void postDelete(InstanceLifecycleEvent event)

preDelete

public void preDelete(InstanceLifecycleEvent event)