Class NameItemFilter
java.lang.Object
org.apache.jackrabbit.vault.fs.filter.DepthItemFilter
org.apache.jackrabbit.vault.fs.filter.NameItemFilter
- All Implemented Interfaces:
Dumpable,Filter,ItemFilter
Filters items according to their names.
-
Field Summary
Fields inherited from interface org.apache.jackrabbit.vault.fs.api.ItemFilter
ALL, NONE -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorNameItemFilter(String name) Creates a new name filter with the given name.NameItemFilter(String name, int minDepth, int maxDepth) Creates a new name filter with the given name and depths -
Method Summary
Methods inherited from class org.apache.jackrabbit.vault.fs.filter.DepthItemFilter
matches, setMaxDepth, setMinDepth
-
Constructor Details
-
NameItemFilter
public NameItemFilter()Default constructor -
NameItemFilter
Creates a new name filter with the given name and depths- Parameters:
name- the name to filter onminDepth- the minimal depthmaxDepth- the maximal depth
-
NameItemFilter
Creates a new name filter with the given name.- Parameters:
name- the name to filter on
-
-
Method Details
-
setName
Sets the name- Parameters:
name- the name
-
matches
Returnstrue. Subclasses can override to implement something useful that is dependant of the depth. Returnstrueif the name of the given item is equal to the configured name.- Overrides:
matchesin classDepthItemFilter- Parameters:
item- the item to match- Returns:
trueif the item matches;falseotherwise.- Throws:
RepositoryException- if an error occurs.
-
dump
Dumps some human readable information using the given context.- Specified by:
dumpin interfaceDumpable- Overrides:
dumpin classDepthItemFilter- Parameters:
ctx- the dump contextisLast- specifies if this is the last element to dump on this level
-