|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.transaction.NotificationFilter
public abstract class NotificationFilter
A filter that determines which Notification
s will be passed to
ResourceSetListener
s. Filters can be combined using simple
boolean operations.
The default filter for listeners that do not otherwise declare one is
NOT_TOUCH
.
Note that ResourceSetListener
s never receive
Notification.REMOVING_ADAPTER
notifications because these are
intended only to inform an adapter that it is being removed; they are
not broadcast to all adapters of an object. Besides which, resource set
listeners are not adapters.
ResourceSetListener
,
Notification
Field Summary | |
---|---|
static NotificationFilter |
ANY
As its name implies, this filter matches any notification. |
static NotificationFilter |
NOT_TOUCH
Matches only notifications that are not "touches." |
static NotificationFilter |
READ
Matches any notification that can occur during the normal course of a read-only transaction. |
static NotificationFilter |
RESOURCE_LOADED
A filter matching "resource loaded" events. |
static NotificationFilter |
RESOURCE_UNLOADED
A filter matching "resource unloaded" events. |
Method Summary | |
---|---|
NotificationFilter |
and(NotificationFilter other)
Creates a new filter combining me with another as a boolean conjunction. |
static NotificationFilter |
createEventTypeFilter(int eventType)
Creates a filter matching any notification of the specified type. |
static NotificationFilter |
createFeatureFilter(Class<?> ownerType,
int featureId)
Creates a filter matching any notification from the specified feature. |
static NotificationFilter |
createFeatureFilter(EClassifier ownerType,
int featureId)
Creates a filter matching any notification from the specified feature. |
static NotificationFilter |
createFeatureFilter(EStructuralFeature feature)
Creates a filter matching any notification from the specified feature. |
static NotificationFilter |
createNotifierFilter(Object notifier)
Creates a filter matching any notification from the specified notifier. |
static NotificationFilter |
createNotifierTypeFilter(Class<?> type)
Creates a filter matching notifications from any instance of the specified type. |
static NotificationFilter |
createNotifierTypeFilter(EClassifier type)
Creates a filter matching notifications from any instance of the specified type. |
static NotificationFilter |
createResourceContentTypeFilter(String contentType)
Creates a filter matches any notification from a resource of the specified content type. |
abstract boolean |
matches(Notification notification)
Determines whether a notification matches my filtering criteria. |
NotificationFilter |
negated()
Creates a new filter that is the boolean negation of me. |
NotificationFilter |
or(NotificationFilter other)
Creates a new filter combining me with another as a boolean disjunction. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final NotificationFilter ANY
public static final NotificationFilter NOT_TOUCH
Notification.isTouch()
public static final NotificationFilter READ
resources
list of a resource setisLoaded
, isModified
,
URI
, errors
, warnings
, and
resourceSet
features of a resourcecontents
of
a resource while it is loading or unloading
public static final NotificationFilter RESOURCE_LOADED
public static final NotificationFilter RESOURCE_UNLOADED
Method Detail |
---|
public static NotificationFilter createResourceContentTypeFilter(String contentType)
contentType
- the content type identifier to match
IllegalArgumentException
- if the specified content type is not
definedIContentType
public static NotificationFilter createNotifierFilter(Object notifier)
notifier
- a notifier (usually an EObject
, Resource
,
or ResourceSet
public static NotificationFilter createEventTypeFilter(int eventType)
eventType
- the notification type (as defined by the
Notification
interface)
public static NotificationFilter createFeatureFilter(EStructuralFeature feature)
feature
- a structural feature meta-object
public static NotificationFilter createFeatureFilter(Class<?> ownerType, int featureId)
ownerType
- the notifier type as a Java class or interfacefeatureId
- the feature's numeric ID
public static NotificationFilter createFeatureFilter(EClassifier ownerType, int featureId)
EClass
es. For example, this supports the features of the
Resource
data type.
ownerType
- the notifier type as an Ecore classifierfeatureId
- the feature's numeric ID
public static NotificationFilter createNotifierTypeFilter(Class<?> type)
type
- the notifier type as a Java class or interface
public static NotificationFilter createNotifierTypeFilter(EClassifier type)
type
- the notifier type as an Ecore classifier
public final NotificationFilter and(NotificationFilter other)
other
filter is not
consulted when I (the first filter) do not match.
other
- another filter (must not be null
)
public final NotificationFilter or(NotificationFilter other)
other
filter is not
consulted when I (the first filter) match.
other
- another filter (must not be null
)
public final NotificationFilter negated()
public abstract boolean matches(Notification notification)
notification
- a notification
true
if the notification should be passed to my
listener; 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 |