|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.transaction.ResourceSetListenerImpl org.eclipse.emf.transaction.TriggerListener
public abstract class TriggerListener
A convenient superclass for listeners that implement "triggers" to process
Notification
s one at a time, generating a command for each that will
make dependent updates to the model.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.eclipse.emf.transaction.ResourceSetListener |
---|
ResourceSetListener.Internal |
Constructor Summary | |
---|---|
TriggerListener()
Initializes me with the default filter. |
|
TriggerListener(NotificationFilter filter)
Initializes me with the specified filter. |
Method Summary | |
---|---|
boolean |
isPrecommitOnly()
I want only ppre-commit events, not post-commit events. |
Command |
transactionAboutToCommit(ResourceSetChangeEvent event)
Implements the trigger callback by processing the event 's
notifications one by one, delegating to the trigger(org.eclipse.emf.transaction.TransactionalEditingDomain, org.eclipse.emf.common.notify.Notification) method for each to
generate a command. |
protected abstract Command |
trigger(TransactionalEditingDomain domain,
Notification notification)
Implemented by subclasses to provide a trigger command for a single change in the model. |
Methods inherited from class org.eclipse.emf.transaction.ResourceSetListenerImpl |
---|
getFilter, getTarget, isAggregatePrecommitListener, isPostcommitOnly, resourceSetChanged, setTarget, unsetTarget |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TriggerListener()
public TriggerListener(NotificationFilter filter)
filter
- a notification filter, or null
for the defaultMethod Detail |
---|
public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException
event
's
notifications one by one, delegating to the trigger(org.eclipse.emf.transaction.TransactionalEditingDomain, org.eclipse.emf.common.notify.Notification)
method for each to
generate a command. The commands created by the subclass are chained in
the order that they are received from the subclass.
transactionAboutToCommit
in interface ResourceSetListener
transactionAboutToCommit
in class ResourceSetListenerImpl
event
- the event object describing the changes that occurred in
the resource set
trigger(org.eclipse.emf.transaction.TransactionalEditingDomain, org.eclipse.emf.common.notify.Notification)
method
RollbackException
- to force a roll-back of the current transactionprotected abstract Command trigger(TransactionalEditingDomain domain, Notification notification)
domain
- the editing domainnotification
- the notification describing a change in the model
null
if none is required for this
particular notificationpublic boolean isPrecommitOnly()
isPrecommitOnly
in interface ResourceSetListener
isPrecommitOnly
in class ResourceSetListenerImpl
true
if I only am interested in pre-commit events;
false
, otherwise
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |