Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.core.listener.impl
Class TestTransactedListener

java.lang.Object
  extended by org.nuxeo.ecm.core.listener.AbstractEventListener
      extended by org.nuxeo.ecm.core.listener.impl.TestTransactedListener
All Implemented Interfaces:
EventListener, OnSaveListener, PostCommitListener, PreCommitListener, TransactedListener

public class TestTransactedListener
extends AbstractEventListener
implements PostCommitListener, OnSaveListener, PreCommitListener

This is a test listener that prints out transacted notifications.

Author:
Bogdan Stefanescu

Constructor Summary
TestTransactedListener()
           
 
Method Summary
 void aboutToCommit(CoreEvent[] events)
          Current transaction is about to commit.
 void aboutToCommit(Operation<?>[] events)
          Current transaction is about to commit.
 void onCommit(CoreEvent[] events)
          Current transaction was committed.
 void onCommit(Operation<?>[] events)
          Current transaction was committed.
 void onSave(CoreEvent[] events)
          Notify Last save in current transaction.
 void onSave(Operation<?>[] events)
          Notify Last save in current transaction.
 
Methods inherited from class org.nuxeo.ecm.core.listener.AbstractEventListener
accepts, addEventId, getName, getOrder, handleEvent, notifyEvent, operationStarted, operationTerminated, removeEventId, setName, setOrder
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestTransactedListener

public TestTransactedListener()
Method Detail

onCommit

public void onCommit(CoreEvent[] events)
Description copied from interface: PostCommitListener
Current transaction was committed.

This method should be used by listeners using the CoreEvent model and ignored by the one using Operation events.

Specified by:
onCommit in interface PostCommitListener
Parameters:
events - all core events collected in current transaction.

onCommit

public void onCommit(Operation<?>[] events)
Description copied from interface: PostCommitListener
Current transaction was committed.

This method should be used by listeners using the Operation events and ignored by the one using CoreEvent events.

Specified by:
onCommit in interface PostCommitListener
Parameters:
events - all operation events collected in current transaction

onSave

public void onSave(CoreEvent[] events)
Description copied from interface: OnSaveListener
Notify Last save in current transaction.

This method should be used by listeners using the CoreEvent model and ignored by the one using Operation events.

Specified by:
onSave in interface OnSaveListener
Parameters:
events - all core events collected in current transaction.

onSave

public void onSave(Operation<?>[] events)
Description copied from interface: OnSaveListener
Notify Last save in current transaction.

This method should be used by listeners using the Operation events and ignored by the one using CoreEvent events.

Specified by:
onSave in interface OnSaveListener
Parameters:
events - all operation events collected in current transaction

aboutToCommit

public void aboutToCommit(CoreEvent[] events)
Description copied from interface: PreCommitListener
Current transaction is about to commit.

This method should be used by listeners using the CoreEvent model and ignored by the one using Operation events.

Specified by:
aboutToCommit in interface PreCommitListener
Parameters:
events - all core events collected in current transaction.

aboutToCommit

public void aboutToCommit(Operation<?>[] events)
Description copied from interface: PreCommitListener
Current transaction is about to commit.

This method should be used by listeners using the Operation events and ignored by the one using CoreEvent events.

Specified by:
aboutToCommit in interface PreCommitListener
Parameters:
events - all operation events collected in current transaction

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.