Class DeclaringTypeItemFilter
java.lang.Object
org.apache.jackrabbit.vault.fs.filter.DepthItemFilter
org.apache.jackrabbit.vault.fs.filter.DeclaringTypeItemFilter
- All Implemented Interfaces:
Dumpable,Filter,ItemFilter
Filter that checks the declared type of an item
-
Field Summary
Fields inherited from interface org.apache.jackrabbit.vault.fs.api.ItemFilter
ALL, NONE -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.DeclaringTypeItemFilter(String nodeType, boolean propsOnly) Creates a new filter for the given node type and flagsDeclaringTypeItemFilter(String nodeType, boolean propsOnly, int minDepth, int maxDepth) Creates a new filter for the given node type and flags. -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(DumpContext ctx, boolean isLast) Dumps some human readable information using the given context.booleanReturnstrue.voidsetNodeType(String nodeType) Sets the node type to match the declaring one of the itemvoidsetPropsOnly(String propsOnly) Sets the flag that indicates if only properties are to be checked.Methods inherited from class org.apache.jackrabbit.vault.fs.filter.DepthItemFilter
matches, setMaxDepth, setMinDepth
-
Constructor Details
-
DeclaringTypeItemFilter
public DeclaringTypeItemFilter()Default constructor. -
DeclaringTypeItemFilter
Creates a new filter for the given node type and flags.- Parameters:
nodeType- the node type name to checkpropsOnly- iftrueonly properties are checkedminDepth- the minimal depthmaxDepth- the maximal depth
-
DeclaringTypeItemFilter
Creates a new filter for the given node type and flags- Parameters:
nodeType- the node type name to checkpropsOnly- iftrueonly properties are checked
-
-
Method Details
-
setNodeType
Sets the node type to match the declaring one of the item- Parameters:
nodeType- the node type
-
setPropsOnly
Sets the flag that indicates if only properties are to be checked.- Parameters:
propsOnly- iftrueonly properties are checked.
-
matches
Returnstrue. Subclasses can override to implement something useful that is dependant of the depth. Matches if the declaring node type of the item is equal to the one specified in this filter. If the item is a node andpropsOnlyflag istrueit returnsfalse.- 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
-