Framework Professional Edition Package


org.mbs.services.transaction.file
Interface FileTransaction

All Known Implementing Classes:
FileTransactionPlain

public interface FileTransaction

This interface defines the common business logic for a proxy, that would implement the transaction behaviour within one transaction.

Author:
Valentin Valchev

Method Summary
 void commit()
          Commits the changes.
 void init(TransactionContext transaction)
          This method is called by the FileTransactionResource class, right after, the implementing class is instantiated.
 void mark(int operation, java.io.File file)
          Marks a file, that operation is being performed on it.
 void rollback()
          Rolls back the changes, restoring the old contents and removed files.
 

Method Detail

init

void init(TransactionContext transaction)
This method is called by the FileTransactionResource class, right after, the implementing class is instantiated.

Parameters:
transaction - the current transaction context.

mark

void mark(int operation,
          java.io.File file)
          throws java.io.IOException
Marks a file, that operation is being performed on it.

Parameters:
operation - the operation that will be performed on the file.
file - the file itself.
Throws:
java.io.IOException - on I/O error
See Also:
FileTransactionResource.FILE_CREATE, FileTransactionResource.FILE_CREATE_TEMP, FileTransactionResource.FILE_MODIFY, FileTransactionResource.FILE_REMOVE

commit

void commit()
Commits the changes. Also cleans up the garbage and operation log.


rollback

void rollback()
Rolls back the changes, restoring the old contents and removed files.


Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved