Class PathFilter
java.lang.Object
org.apache.jackrabbit.oak.spi.filter.PathFilter
Filter which determines whether given path should be included for processing
or not
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPathFilter(@NotNull Iterable<String> includes, @NotNull Iterable<String> excludes) Constructs the predicate with given included and excluded paths -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck whether this node and all descendants are included in this filter.Determines whether given path is to be included or notstatic PathFilterfrom(@NotNull NodeBuilder defn) Constructs the predicate based on given definition state.getStrings(org.apache.jackrabbit.oak.api.PropertyState ps, Set<String> defaultValues) toString()
-
Field Details
-
PROP_INCLUDED_PATHS
Multi value property name used to determine list of paths to be included- See Also:
-
PROP_EXCLUDED_PATHS
Multi value property name used to determine list of paths to be excluded- See Also:
-
-
Constructor Details
-
PathFilter
public PathFilter(@NotNull @NotNull Iterable<String> includes, @NotNull @NotNull Iterable<String> excludes) Constructs the predicate with given included and excluded pathsIf both are empty then all paths would be considered to be included
- Parameters:
includes- list of paths which should be includedexcludes- list of paths which should not be included
-
-
Method Details
-
from
Constructs the predicate based on given definition state. It looks for multi value property with namesPROP_INCLUDED_PATHSandPROP_EXCLUDED_PATHS. Both the properties are optional. If the properties are defined as String instead of Strings, then they are interpreted as a single-element list.- Parameters:
defn- nodestate representing the configuration. Generally it would be the nodestate representing the index definition- Returns:
- predicate based on the passed definition state
-
getStrings
-
filter
Determines whether given path is to be included or not- Parameters:
path- path to check- Returns:
- result indicating if the path needs to be included, excluded or just traversed
-
getIncludedPaths
-
getExcludedPaths
-
toString
-
areAllDescendantsIncluded
Check whether this node and all descendants are included in this filter.- Parameters:
path- the path- Returns:
- true if this and all descendants of this path are included in the filter
-