Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: javax/ide/model/java/source/write/TreeTransaction.java


1   /*
2    * @(#)TreeTransaction.java
3    */
4   
5   package javax.ide.model.java.source.write;
6   
7   import javax.swing.undo.UndoableEdit;
8   
9   /**
10   * A TreeTransaction is a set of changes made to the Tree model that are
11   * logically grouped into a single undoable change. <p/>
12   *
13   * @author Andy Yu
14   */
15  public interface TreeTransaction
16  {
17    /**
18     * Aborts this multi-tree transaction. All changes are undone and
19     * all acquired resources are released.
20     * 
21     * @throws TreeTransactionException if this transaction has already
22     *                                  ended.
23     */
24    public void abort();
25    
26    /**
27     * Logically ends a transaction, writes changes to the underlying
28     * file (if any), and releases all acquired resources.
29     * 
30     * @return An UndoableEdit that can undo all the changes made during
31     * this transaction.
32     * 
33     * @throws TreeTransactionException if this transaction has already
34     *                                  ended.
35     */
36    public UndoableEdit commit();
37  
38    /**
39     * Gets the owning manager.
40     *
41     * @return The owning manager.
42     */
43    public TreeManager getOwningManager();
44  }