Class ActivitiesTransactionListener
java.lang.Object
org.alfresco.service.cmr.activities.ActivitiesTransactionListener
- All Implemented Interfaces:
TransactionListener,org.alfresco.util.transaction.TransactionListener
A Transaction Listener to post activities once the transaction has been committed,
or at the end of a read-only transaction.
- Author:
- Gethin James
-
Constructor Summary
ConstructorsConstructorDescriptionActivitiesTransactionListener(String activityType, ActivityInfo activityInfo, String tenantDomain, String appTool, org.alfresco.sync.repo.Client client, ActivityPoster poster, RetryingTransactionHelper retryingTransactionHelper) -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked after transaction commit.voidInvoked after transaction rollback.voidbeforeCommit(boolean readOnly) Called before a transaction is committed.voidInvoked before transaction commit/rollback.voidflush()
-
Constructor Details
-
ActivitiesTransactionListener
public ActivitiesTransactionListener(String activityType, ActivityInfo activityInfo, String tenantDomain, String appTool, org.alfresco.sync.repo.Client client, ActivityPoster poster, RetryingTransactionHelper retryingTransactionHelper)
-
-
Method Details
-
afterCommit
public void afterCommit()Description copied from interface:TransactionListenerInvoked after transaction commit.Any exceptions generated here will only be logged and will have no effect on the state of the transaction.
Although all transaction resources are still available, this method should be used only for cleaning up resources after a commit has occured.
- Specified by:
afterCommitin interfaceTransactionListener- Specified by:
afterCommitin interfaceorg.alfresco.util.transaction.TransactionListener
-
flush
public void flush()- Specified by:
flushin interfaceTransactionListener
-
beforeCommit
public void beforeCommit(boolean readOnly) Description copied from interface:TransactionListenerCalled before a transaction is committed.All transaction resources are still available.
- Specified by:
beforeCommitin interfaceTransactionListener- Specified by:
beforeCommitin interfaceorg.alfresco.util.transaction.TransactionListener- Parameters:
readOnly- true if the transaction is read-only
-
beforeCompletion
public void beforeCompletion()Description copied from interface:TransactionListenerInvoked before transaction commit/rollback. Will be called afterTransactionListener.beforeCommit(boolean)even ifTransactionListener.beforeCommit(boolean)failed.All transaction resources are still available.
- Specified by:
beforeCompletionin interfaceTransactionListener- Specified by:
beforeCompletionin interfaceorg.alfresco.util.transaction.TransactionListener
-
afterRollback
public void afterRollback()Description copied from interface:TransactionListenerInvoked after transaction rollback.Any exceptions generated here will only be logged and will have no effect on the state of the transaction.
Although all transaction resources are still available, this method should be used only for cleaning up resources after a rollback has occured.
- Specified by:
afterRollbackin interfaceTransactionListener- Specified by:
afterRollbackin interfaceorg.alfresco.util.transaction.TransactionListener
-