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
public class DeclaringTypeItemFilter extends DepthItemFilter
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
Constructors Constructor Description DeclaringTypeItemFilter()Default 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddump(DumpContext ctx, boolean isLast)Dumps some human readable information using the given context.booleanmatches(Item item)Returnstrue.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 Detail
-
DeclaringTypeItemFilter
public DeclaringTypeItemFilter()
Default constructor.
-
DeclaringTypeItemFilter
public DeclaringTypeItemFilter(String nodeType, boolean propsOnly, int minDepth, int maxDepth)
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
public DeclaringTypeItemFilter(String nodeType, boolean propsOnly)
Creates a new filter for the given node type and flags- Parameters:
nodeType- the node type name to checkpropsOnly- iftrueonly properties are checked
-
-
Method Detail
-
setNodeType
public void setNodeType(String nodeType)
Sets the node type to match the declaring one of the item- Parameters:
nodeType- the node type
-
setPropsOnly
public void setPropsOnly(String propsOnly)
Sets the flag that indicates if only properties are to be checked.- Parameters:
propsOnly- iftrueonly properties are checked.
-
matches
public boolean matches(Item item) throws RepositoryException
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
public void dump(DumpContext ctx, boolean isLast)
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
-
-