Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Interface TransactionalCommandStack

All Superinterfaces:
All Known Subinterfaces:
InternalTransactionalCommandStack, IWorkspaceCommandStack
All Known Implementing Classes:
AbstractTransactionalCommandStack, TransactionalCommandStackImpl, WorkspaceCommandStackImpl

public interface TransactionalCommandStack
extends CommandStack

Extension of the basic CommandStack API providing additional control over (and feed-back from) the transactions used to execute commands.

Method Summary
 void execute ( Command command, Map<?,?> options)
          Executes the specified command in a read/write transaction.
  ExceptionHandler getExceptionHandler ()
          Obtains my exception handler.
 void setExceptionHandler ( ExceptionHandler handler)
          Sets an exception handler.
Methods inherited from interface org.eclipse.emf.common.command. CommandStack
addCommandStackListener, canRedo, canUndo, execute, flush, getMostRecentCommand, getRedoCommand, getUndoCommand, redo, removeCommandStackListener, undo

Method Detail


void execute(
Command command,
Map<?,?> options)
Executes the specified command in a read/write transaction. This method is preferred over the inherited CommandStack.execute(Command) method because it provides feed-back when a command fails to complete. The implementation of this latter method simply suppresses (but logs) any checked exception that occurs.

Note that this method will block the caller until a read/write transaction can be started (if other transactions are currently active).

command - the command to execute
options - the options to apply to the command's transaction, or null to select the defaults
InterruptedException - if the current thread is interrupted while waiting to start a read/write transaction for the command execution
RollbackException - if the changes performed by the command are rolled back by validation of the transaction


void setExceptionHandler(
ExceptionHandler handler)
Sets an exception handler. This object will be notified when exceptions occur, but is not really expected to be able to do anything about them. Its intended purpose is to support an user feed-back mechanism appropriate to the environment.

handler - the exception handler to set


ExceptionHandler getExceptionHandler()
Obtains my exception handler.

my exception handler, or null if none
See Also:

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

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire