public class JackrabbitEventFilter extends Object
The parameters of the filter can then be set by chaining the set methods,
since each method returns the same EventFilter with the indicated parameter set.
Once the filter is configured, it and an EventListener object are
passed to
JackrabbitObservationManager.addEventListener(javax.jcr.observation.EventListener, JackrabbitEventFilter).
The filter restricts which events are sent to the EventListener according to the
following parameters. Note that the term associated parent node of an event means the
parent node of the item at (or formerly at) the path returned by
Event.getPath().
eventTypes:
A bitwise OR of the event types to be listened to. See
Event for details.
absPath, absPaths, excludedPaths,
isDeep: Only events whose associated parent node is at one
of the paths in absPath or absPaths (or within
its subgraph, if isDeep is true) will be received
except if the associated parent node is at one of the paths in
excludedPaths or its subgraph.
It is permissible to register a listener for a path where no node currently
exists.
uuid:
Only events whose associated parent node has one of
the identifiers in this list will be received. If his parameter is
null then no identifier-related restriction is placed on
events received. Note that specifying an empty array instead of
null would result in no nodes being listened to. The term
"UUID" is used for compatibility with JCR 1.0.
nodeTypeName:
Only events whose associated parent node has
one of the node types (or a subtype of one of the node types) in this
list will be received. If his parameter is null then no node
type-related restriction is placed on events received. Note that
specifying an empty array instead of null would result in no
nodes types being listened to.
noLocal: if true, then events
generated by the session through which the listener was registered are
ignored. Otherwise, they are not ignored.
noExternal: if true, then events
from external cluster nodes are ignored. Otherwise, they are not ignored.
noInternal: if true, then events
from this cluster node are ignored. Otherwise, they are not ignored.
| Constructor and Description |
|---|
JackrabbitEventFilter() |
| Modifier and Type | Method and Description |
|---|---|
String |
getAbsPath()
Returns the
absPath parameter of the filter. |
String[] |
getAdditionalPaths()
Returns the
absPaths parameter of the filter. |
int |
getEventTypes()
Returns the
eventTypes parameter of the filter. |
String[] |
getExcludedPaths()
Returns the
excludedPaths parameter of the filter. |
String[] |
getIdentifiers()
Returns the
uuids parameter of the filter. |
boolean |
getIsDeep()
Returns the
isDeep parameter of the filter. |
String[] |
getNodeTypes()
Returns the
nodeTypeName parameter of the filter. |
boolean |
getNoExternal()
Returns the
noExternal parameter of the filter. |
boolean |
getNoInternal()
Returns the
noInternal parameter of the filter. |
boolean |
getNoLocal()
Returns the
noLocal parameter of the filter. |
JackrabbitEventFilter |
setAbsPath(String absPath)
Sets the
absPath parameter of the filter. |
JackrabbitEventFilter |
setAdditionalPaths(String... absPaths)
Sets the
absPaths parameter of the filter. |
JackrabbitEventFilter |
setEventTypes(int eventTypes)
Sets the
eventTypes parameter of the filter. |
JackrabbitEventFilter |
setExcludedPaths(String... excludedPaths)
Sets the
excludedPaths parameter of the filter. |
JackrabbitEventFilter |
setIdentifiers(String[] identifiers)
Sets the
identifiers parameter of the filter. |
JackrabbitEventFilter |
setIsDeep(boolean isDeep)
Sets the
isDeep parameter of the filter. |
JackrabbitEventFilter |
setNodeTypes(String[] nodeTypeNames)
Sets the
nodeTypeNames parameter of the filter. |
JackrabbitEventFilter |
setNoExternal(boolean noExternal)
Sets the
noExternal parameter of the filter. |
JackrabbitEventFilter |
setNoInternal(boolean noInternal)
Sets the
noInternal parameter of the filter. |
JackrabbitEventFilter |
setNoLocal(boolean noLocal)
Sets the
noLocal parameter of the filter. |
public JackrabbitEventFilter setEventTypes(int eventTypes)
eventTypes parameter of the filter.
If left unset, this parameter defaults to 0.eventTypes - an int.eventTypes parameter set.public int getEventTypes()
eventTypes parameter of the filter.int.public JackrabbitEventFilter setAbsPath(String absPath)
absPath parameter of the filter.
If left unset, this parameter defaults to null.absPath - an absolute path String.absPath parameter set.public String getAbsPath()
absPath parameter of the filter.String.public JackrabbitEventFilter setIsDeep(boolean isDeep)
isDeep parameter of the filter.
If left unset, this parameter defaults to false.isDeep - a boolean.isDeep parameter set.public boolean getIsDeep()
isDeep parameter of the filter.boolean.public JackrabbitEventFilter setIdentifiers(String[] identifiers)
identifiers parameter of the filter.
If left unset, this parameter defaults to null.identifiers - a String array.identifiers parameter set.public String[] getIdentifiers()
uuids parameter of the filter.String array.public JackrabbitEventFilter setNodeTypes(String[] nodeTypeNames)
nodeTypeNames parameter of the filter.
If left unset, this parameter defaults to null.nodeTypeNames - a String array.nodeTypes parameter set.public String[] getNodeTypes()
nodeTypeName parameter of the filter.String array.public JackrabbitEventFilter setNoLocal(boolean noLocal)
noLocal parameter of the filter.
If left unset, this parameter defaults to false.noLocal - a boolean.noLocal parameter set.public boolean getNoLocal()
noLocal parameter of the filter.boolean.public JackrabbitEventFilter setAdditionalPaths(String... absPaths)
absPaths parameter of the filter.
If left unset, this parameter defaults to an empty array.absPaths - an absolute path String array.absPaths parameter set.public String[] getAdditionalPaths()
absPaths parameter of the filter.String array.public JackrabbitEventFilter setExcludedPaths(String... excludedPaths)
excludedPaths parameter of the filter.
If left unset, this parameter defaults to an empty array.excludedPaths - an absolute path String array.excludedPaths parameter set.public String[] getExcludedPaths()
excludedPaths parameter of the filter.String array.public JackrabbitEventFilter setNoExternal(boolean noExternal)
noExternal parameter of the filter.
If left unset, this parameter defaults to false.noExternal - a boolean.noExternal parameter set.public boolean getNoExternal()
noExternal parameter of the filter.boolean.public JackrabbitEventFilter setNoInternal(boolean noInternal)
noInternal parameter of the filter.
If left unset, this parameter defaults to false.noInternal - a boolean.noExternal parameter set.public boolean getNoInternal()
noInternal parameter of the filter.boolean.Copyright © 2004–2020 The Apache Software Foundation. All rights reserved.