org.alfresco.repo.avm
Class PurgeVersionTxnListener

java.lang.Object
  extended by org.alfresco.repo.transaction.TransactionListenerAdapter
      extended by org.alfresco.repo.avm.PurgeVersionTxnListener
All Implemented Interfaces:
TransactionListener

public class PurgeVersionTxnListener
extends TransactionListenerAdapter

Transaction listener that fires purge version events.


Constructor Summary
PurgeVersionTxnListener()
          Default constructor.
 
Method Summary
 void addCallback(PurgeVersionCallback cb)
          Register a callback.
 void afterCommit()
          Invoked after transaction commit.
 void afterRollback()
          Invoked after transaction rollback.
 void versionPurged(java.lang.String storeName, int versionID)
          During the transaction somebody is responsible for calling this.
 
Methods inherited from class org.alfresco.repo.transaction.TransactionListenerAdapter
beforeCommit, beforeCompletion, flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PurgeVersionTxnListener

public PurgeVersionTxnListener()
Default constructor.

Method Detail

afterCommit

public void afterCommit()
Description copied from class: TransactionListenerAdapter
Invoked after transaction commit.

Any exceptions generated here will cause the transaction to rollback.

Although all transaction resources are still available, this method should be used only for cleaning up resources after a commit has occured.

Specified by:
afterCommit in interface TransactionListener
Overrides:
afterCommit in class TransactionListenerAdapter

afterRollback

public void afterRollback()
Description copied from class: TransactionListenerAdapter
Invoked after transaction rollback.

Although all transaction resources are still available, this method should be used only for cleaning up resources after a rollback has occured.

Specified by:
afterRollback in interface TransactionListener
Overrides:
afterRollback in class TransactionListenerAdapter

versionPurged

public void versionPurged(java.lang.String storeName,
                          int versionID)
During the transaction somebody is responsible for calling this.

Parameters:
storeName - The name of the store that just created a new version
versionID - The id of the new version.

addCallback

public void addCallback(PurgeVersionCallback cb)
Register a callback.

Parameters:
cb - The callback.


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.