Package lumis.portal.serialization
Class FileCopyTransactionObserver
- java.lang.Object
-
- lumis.portal.serialization.FileCopyTransactionObserver
-
- All Implemented Interfaces:
ITransactionObserver
public class FileCopyTransactionObserver extends Object implements ITransactionObserver
Implementation ofITransactionObserver
that performs a file copy operation that can be rolled back. The file copy operation will be executed only at the first transaction´s commit and/or rollback.- Since:
- 4.0.8
- Version:
- $Revision: 16814 $ $Date: 2015-01-23 11:33:18 -0200 (Fri, 23 Jan 2015) $
-
-
Constructor Summary
Constructors Constructor Description FileCopyTransactionObserver(String sourceFilePath, IDirectory sourceDirectory, String destinationFilePath, IPortalBaseFolder destinationRelativePathType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterCommit()
Called by the observed transaction just after the commit operation.void
afterRollback()
Called by the observed transaction just after the rollback operation.boolean
beforeCommit()
Called by the observed transaction just before the commit operation.void
beforeRollback()
Called by the observed transaction just before the rollback operation.
-
-
-
Constructor Detail
-
FileCopyTransactionObserver
public FileCopyTransactionObserver(String sourceFilePath, IDirectory sourceDirectory, String destinationFilePath, IPortalBaseFolder destinationRelativePathType)
-
-
Method Detail
-
beforeCommit
public boolean beforeCommit() throws PortalException
Description copied from interface:ITransactionObserver
Called by the observed transaction just before the commit operation.- Specified by:
beforeCommit
in interfaceITransactionObserver
- Returns:
- true to indicate success; false to indicate fail, and cause the transaction to cancel commiting.
- Throws:
PortalException
-
afterCommit
public void afterCommit() throws PortalException
Description copied from interface:ITransactionObserver
Called by the observed transaction just after the commit operation.- Specified by:
afterCommit
in interfaceITransactionObserver
- Throws:
PortalException
-
beforeRollback
public void beforeRollback() throws PortalException
Description copied from interface:ITransactionObserver
Called by the observed transaction just before the rollback operation.- Specified by:
beforeRollback
in interfaceITransactionObserver
- Throws:
PortalException
-
afterRollback
public void afterRollback() throws PortalException
Description copied from interface:ITransactionObserver
Called by the observed transaction just after the rollback operation.- Specified by:
afterRollback
in interfaceITransactionObserver
- Throws:
PortalException
-
-