## org.eclipse.emf.transaction.impl
Interface InternalTransactionalCommandStack

All Superinterfaces:
  CommandStack, TransactionalCommandStack

All Known Implementing Classes:
  AbstractTransactionalCommandStack, TransactionalCommandStackImpl, WorkspaceCommandStackImpl

    public interface InternalTransactionalCommandStack

extends TransactionalCommandStack

An internal interface that must be provided by any implementation of the public `TransactionalCommandStack` interface, in order to function correctly in the transactional editing domain framework.

Method Summary
`EMFCommandTransaction` `createTransaction(Command command, Map<?,?> options)` Creates a read/write transaction in my editing domain for the purpose of executing the specified command.
`void` `dispose()` Disposes of my state and any additional resources that I may be retaining.
`void` `executeTriggers(Command command, List<Command> triggers, Map<?,?> options)` Executes the specified list of trigger commands.
`InternalTransactionalEditingDomain` `getDomain()` Obtains the editing domain in which I create transactions.
`void` `setEditingDomain(InternalTransactionalEditingDomain domain)` Assigns the editing domain in which I create transactions.

Methods inherited from interface org.eclipse.emf.transaction.TransactionalCommandStack
`execute, getExceptionHandler, setExceptionHandler`

Methods inherited from interface org.eclipse.emf.common.command.CommandStack
`addCommandStackListener, canRedo, canUndo, execute, flush, getMostRecentCommand, getRedoCommand, getUndoCommand, redo, removeCommandStackListener, undo`

Method Detail

### getDomain

    InternalTransactionalEditingDomain getDomain()

  Obtains the editing domain in which I create transactions.

  Returns:
    my editing domain
  See Also:
    `createTransaction(Command, Map)`

### setEditingDomain

    void setEditingDomain(InternalTransactionalEditingDomain domain)

  Assigns the editing domain in which I create transactions.

  Parameters:
    `domain` - my editing domain
  See Also:
    `createTransaction(Command, Map)`

### createTransaction

    EMFCommandTransaction createTransaction(Command command,
                                            Map<?,?> options)
                                            throws InterruptedException

  Creates a read/write transaction in my editing domain for the purpose of executing the specified command. The resulting transaction is expected to be started when it is returned (hence the possibility of interruption).

  Parameters:
    `command` - a command that I need to execute
    `options` - the options to apply to the resulting transaction
  Returns:
    the command transaction
  Throws:
    `InterruptedException` - if the current thread is interrupted while waiting for the transaction to start
  See Also:
    `getDomain()`

### executeTriggers

    void executeTriggers(Command command,
                         List<Command> triggers,
                         Map<?,?> options)
                         throws InterruptedException,
                                RollbackException

  Executes the specified list of trigger commands. All of the commands are executed within a single child transaction of the transaction that executed the triggering `command`; they must not be "piggy-backed" on the currently active transaction.

  Parameters:
    `command` - the command whose execution triggered additional commands (from pre-commit listeners)
    `triggers` - a list of zero or more `Command`s to execute. If there are none, then no transaction needs to be started
    `options` - the options to apply to the child transaction
  Throws:
    `InterruptedException` - if the current thread is interrupted while waiting for the trigger transaction to start
    `RollbackException` - if the trigger transaction rolls back on commit
  See Also:
    `ResourceSetListener.transactionAboutToCommit(org.eclipse.emf.transaction.ResourceSetChangeEvent)`, `createTransaction(Command, Map)`

### dispose

    void dispose()

  Disposes of my state and any additional resources that I may be retaining. I am only disposed when my `editing domain` is disposed.

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.