Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

oracle.javatools.parser.java.v2.write
Interface SourceTransaction


public interface SourceTransaction

A logical grouping of write operations on a SourceFile.


Method Summary
 void abort()
          Rolls back changes to the beginning of the transaction and releases all locked resources.
 void addListener(SourceTransactionListener listener)
          Registers the given observer to begin receiving notifications when changes are made on this SourceFile or when this SourceFile is invalidated.
 javax.swing.undo.UndoableEdit commit()
          Logically ends this transaction.
 SourceFile getOwningSourceFile()
           
 void removeListener(SourceTransactionListener listener)
          Unregisters the given observer.
 void rollback()
          Rolls back all changes made in this transaction, but keeps the transaction open.
 void rollback(SourceSavepoint savepoint)
          Rolls back changes up to the given savepoint.
 SourceSavepoint savepoint()
           
 

Method Detail

getOwningSourceFile

SourceFile getOwningSourceFile()
Returns:
The SourceFile this transaction is attached to.

savepoint

SourceSavepoint savepoint()
Returns:
A savepoint that can be used with rollback.

rollback

void rollback(SourceSavepoint savepoint)
Rolls back changes up to the given savepoint.


rollback

void rollback()
Rolls back all changes made in this transaction, but keeps the transaction open. Compare with abort() which closes the transaction.


commit

javax.swing.undo.UndoableEdit commit()
Logically ends this transaction. Commits the transaction's changes and releases all locked resources.

Returns:
Null if this transaction involved no changes.

abort

void abort()
Rolls back changes to the beginning of the transaction and releases all locked resources.


addListener

void addListener(SourceTransactionListener listener)
Registers the given observer to begin receiving notifications when changes are made on this SourceFile or when this SourceFile is invalidated. If the input listener is already registered with this SourceFile, no action is taken.

Parameters:
listener - The listener to be added.

removeListener

void removeListener(SourceTransactionListener listener)
Unregisters the given observer. Equality is determined by ==. If the input listener is not registered with this SourceFile, no action is taken.

Parameters:
listener - The listener to be removed.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.1.0)

E17493-02

Copyright © 1997, 2011, Oracle. All rights reserved.