Class ActivitiesTransactionListener

  • All Implemented Interfaces:
    TransactionListener, org.alfresco.util.transaction.TransactionListener

    public class ActivitiesTransactionListener
    extends java.lang.Object
    implements 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 Detail

      • ActivitiesTransactionListener

        public ActivitiesTransactionListener​(java.lang.String activityType,
                                             ActivityInfo activityInfo,
                                             java.lang.String tenantDomain,
                                             java.lang.String appTool,
                                             org.alfresco.sync.repo.Client client,
                                             ActivityPoster poster,
                                             RetryingTransactionHelper retryingTransactionHelper)
    • Method Detail

      • afterCommit

        public void afterCommit()
        Description copied from interface: TransactionListener
        Invoked 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:
        afterCommit in interface TransactionListener
        Specified by:
        afterCommit in interface org.alfresco.util.transaction.TransactionListener
      • beforeCommit

        public void beforeCommit​(boolean readOnly)
        Description copied from interface: TransactionListener
        Called before a transaction is committed.

        All transaction resources are still available.

        Specified by:
        beforeCommit in interface TransactionListener
        Specified by:
        beforeCommit in interface org.alfresco.util.transaction.TransactionListener
        Parameters:
        readOnly - true if the transaction is read-only
      • afterRollback

        public void afterRollback()
        Description copied from interface: TransactionListener
        Invoked 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:
        afterRollback in interface TransactionListener
        Specified by:
        afterRollback in interface org.alfresco.util.transaction.TransactionListener