|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.transaction.ResourceSetListenerImpl
public class ResourceSetListenerImpl
Default implementation of a resource-set listener, useful for extending to implement only the callbacks of interest to the client.
ResourceSetChangeEvent| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.eclipse.emf.transaction.ResourceSetListener |
|---|
ResourceSetListener.Internal |
| Constructor Summary | |
|---|---|
protected |
ResourceSetListenerImpl()
Initializes me with the default filter. |
protected |
ResourceSetListenerImpl(NotificationFilter filter)
Initializes me with the specified filter. |
| Method Summary | |
|---|---|
NotificationFilter |
getFilter()
Provides a filter to select which notifications should be sent to this listener. |
protected TransactionalEditingDomain |
getTarget()
Queries the transactional editing domain, if any, to which I am listening. |
boolean |
isAggregatePrecommitListener()
By default, assume that we want individual transaction pre-commit. |
boolean |
isPostcommitOnly()
By default, assume that we do not only want post-commit events but also pre-commit events. |
boolean |
isPrecommitOnly()
By default, assume that we do not only want pre-commit events but also post-commit events. |
void |
resourceSetChanged(ResourceSetChangeEvent event)
The default implementation of this method does nothing. |
void |
setTarget(TransactionalEditingDomain domain)
Remembers the new editing domain that I am now listening to, if it is not null. |
Command |
transactionAboutToCommit(ResourceSetChangeEvent event)
The default implementation of this method does nothing, returning no trigger command. |
void |
unsetTarget(TransactionalEditingDomain domain)
If the specified domain is the one that I remembered, then I forget it because I am no longer listening to it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ResourceSetListenerImpl()
protected ResourceSetListenerImpl(NotificationFilter filter)
filter - a filter, or null to request the default| Method Detail |
|---|
public NotificationFilter getFilter()
ResourceSetListenerNotificationFilter.NOT_TOUCH filter.
Note that, if a listener's filter does not match any of the
notifications that were received during a transaction, then it is not
invoked at all. Thus, the notification lists received in the
ResourceSetChangeEvents will never be empty.
Note also that a listener's filter must not change over time, or unpredictable behaviour will occur. In particular, the editing domain is free to obtain the filter from the listener only once when the listener is added and never request it thereafter. Also, it is not expected the the same filter object's condition can change over time.
getFilter in interface ResourceSetListenernull to
obtain the default
public Command transactionAboutToCommit(ResourceSetChangeEvent event)
throws RollbackException
transactionAboutToCommit in interface ResourceSetListenerevent - the event object describing the changes that occurred in
the resource set
null if no changes are required
RollbackException - to force a roll-back of the current transactionpublic void resourceSetChanged(ResourceSetChangeEvent event)
resourceSetChanged in interface ResourceSetListenerevent - the event object describing the changes that occurred in
the resource setpublic boolean isAggregatePrecommitListener()
isAggregatePrecommitListener in interface ResourceSetListenertrue if I should be invoked only for pre-commit of
the root transaction; false, otherwisepublic boolean isPrecommitOnly()
isPrecommitOnly in interface ResourceSetListenertrue if I only am interested in pre-commit events;
false, otherwisepublic boolean isPostcommitOnly()
isPostcommitOnly in interface ResourceSetListenertrue if I only am interested in post-commit events;
false, otherwiseprotected TransactionalEditingDomain getTarget()
null if nonepublic void setTarget(TransactionalEditingDomain domain)
null.
setTarget in interface ResourceSetListener.Internaldomain - an editing domain to which I have been attached. Note that
nothing precludes the addition of a listener to more than
one editing domainpublic void unsetTarget(TransactionalEditingDomain domain)
unsetTarget in interface ResourceSetListener.Internaldomain - an editing domain from which I have been detached. Note
that I may very will still be attached to other domains
than this
|
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 | |||||||||