org.eclipse.emf.transaction.impl
Class EditingDomainManager

java.lang.Object
  extended by org.eclipse.emf.transaction.impl.EditingDomainManager

public class EditingDomainManager
extends Object

The editing domain manager initializes editing domain instances from the org.eclipse.emf.transaction.editingDomains extension point. It also configures listeners from the org.eclipse.emf.transaction.listeners point.


Method Summary
 void assertDynamicallyRegistered(String id)
          Asserts that the specified editing domain ID is dynamically registered, not statically registered on the extension point.
 void configureListeners(String id, TransactionalEditingDomain domain)
          Creates (if necessary) listeners registered against the specified editing domain ID and and adds them to it.
 TransactionalEditingDomain createEditingDomain(String id)
          Creates the editing domain registered on the extension point under the specified id, if an appropriate extension exists.
 void deconfigureListeners(String id, TransactionalEditingDomain domain)
          Removes from the editing domain the listeners that are registered against its ID.
static EditingDomainManager getInstance()
          Gets the singleton instance.
 boolean isStaticallyRegistered(String id)
          Queries whether the specified editing domain ID is statically registered on our extension point.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static EditingDomainManager getInstance()
Gets the singleton instance.

Returns:
the instance

createEditingDomain

public TransactionalEditingDomain createEditingDomain(String id)
Creates the editing domain registered on the extension point under the specified id, if an appropriate extension exists.

Parameters:
id - the editing domain ID to initialize
Returns:
the corresponding editing domain, or null if no such extension was found

isStaticallyRegistered

public boolean isStaticallyRegistered(String id)
Queries whether the specified editing domain ID is statically registered on our extension point.

Parameters:
id - the domain ID to query
Returns:
whether it is statically registered

assertDynamicallyRegistered

public void assertDynamicallyRegistered(String id)
Asserts that the specified editing domain ID is dynamically registered, not statically registered on the extension point.

Parameters:
id - the ID of an editing domain
Throws:
IllegalArgumentException - if the specified ID is statically registered
Since:
1.3

configureListeners

public void configureListeners(String id,
                               TransactionalEditingDomain domain)
Creates (if necessary) listeners registered against the specified editing domain ID and and adds them to it. Note that this includes listeners registered against all domains (by not specifying an ID).

At most a single instance of any registered listener is created.

Parameters:
id - the editing domain ID
domain - the editing domain to which to add the listeners

deconfigureListeners

public void deconfigureListeners(String id,
                                 TransactionalEditingDomain domain)
Removes from the editing domain the listeners that are registered against its ID. Note that this includes listeners registered against all domains (by not specifying an ID).

Parameters:
id - the editing domain ID
domain - the editing domain from which to remove the listeners

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