Class ItemFilterSet
java.lang.Object
org.apache.jackrabbit.vault.fs.api.FilterSet<ItemFilter>
org.apache.jackrabbit.vault.fs.api.ItemFilterSet
- All Implemented Interfaces:
Dumpable
The item filter set holds a set of item filters each attributes as include
or exclude filter. The evaluation of the set allows included items and
rejects excluded items.
Additionally it contains a "root" path for which the filters are evaluated. if an item has not the node addressed by the root path as ancestor, it is always excluded.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.jackrabbit.vault.fs.api.FilterSet
FilterSet.Entry<E extends Filter> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ItemFilterSetThe exclude all item filter setstatic final ItemFilterSetThe include all item filter set -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.ItemFilterSet(String root) Creates a new item filter set and sets the respective root path -
Method Summary
Methods inherited from class org.apache.jackrabbit.vault.fs.api.FilterSet
addAll, addExclude, addInclude, covers, dump, equals, getEntries, getImportMode, getRoot, hashCode, isAncestor, isEmpty, isSealed, seal, setImportMode, setRoot, toString
-
Field Details
-
INCLUDE_ALL
The include all item filter set -
EXCLUDE_ALL
The exclude all item filter set
-
-
Constructor Details
-
ItemFilterSet
public ItemFilterSet()Default constructor. initializes the root path to "/" -
ItemFilterSet
Creates a new item filter set and sets the respective root path- Parameters:
root- path
-
-
Method Details
-
contains
Evaluates the filters if this set doescoverthe given item. otherwisefalseis returned. The result of the evaluation is the polarity of the last matched item. If no filter matches it returnstrueif the first filter is an exclude filter or if no filter is defined;falseif the first filter is an include filter.- Parameters:
item- the item to checkdepth- the depth to check- Returns:
trueif this set matches the item- Throws:
RepositoryException- if an error occurs.
-
contains
Evaluates the filters if this set doescoverthe given item. otherwisefalseis returned. The result of the evaluation is the polarity of the last matched item. If no filter matches it returnstrueif the first filter is an exclude filter or if no filter is defined;falseif the first filter is an include filter.- Parameters:
item- the item to checkpath- of the item ornulldepth- the depth to check- Returns:
trueif this set matches the item- Throws:
RepositoryException- if an error occurs.
-