public class NodeTypeItemFilter extends DepthItemFilter
ALL, NONE| Constructor and Description |
|---|
NodeTypeItemFilter()
Default constructor
|
NodeTypeItemFilter(String nodeType,
boolean respectSupertype)
Creates a new node type filter.
|
NodeTypeItemFilter(String nodeType,
boolean respectSupertype,
int minDepth,
int maxDepth)
Creates a new node type filter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dump(DumpContext ctx,
boolean isLast)
Dumps some human readable information using the given context.
|
boolean |
matches(Item item)
Returns
true. |
void |
setNodeType(String nodeType)
Sets the node type to filter on
|
void |
setRespectSupertype(String respectSupertype)
Sets the flag that indicates if super type should be respected.
|
matches, setMaxDepth, setMinDepthpublic NodeTypeItemFilter()
public NodeTypeItemFilter(String nodeType, boolean respectSupertype, int minDepth, int maxDepth)
nodeType - the node type to filter onrespectSupertype - indicates if super type should be respectedminDepth - the minimal depthmaxDepth - the maximal depthpublic NodeTypeItemFilter(String nodeType, boolean respectSupertype)
nodeType - the node type to filter onrespectSupertype - indicates if super type should be respectedpublic void setNodeType(String nodeType)
nodeType - the node typepublic void setRespectSupertype(String respectSupertype)
respectSupertype - if true, super types are respected.public boolean matches(Item item) throws RepositoryException
true. Subclasses can override to implement something
useful that is dependant of the depth.
Returns true if the item is a node and if the configured
node type is equal to the primary type of the node. if super types are
respected it also returns true if the items node type
extends from the configured node type (Node.isNodeType() check).matches in class DepthItemFilteritem - the item to matchtrue if the item matches; false otherwise.RepositoryException - if an error occurs.public void dump(DumpContext ctx, boolean isLast)
dump in interface Dumpabledump in class DepthItemFilterctx - the dump contextisLast - specifies if this is the last element to dump on this levelCopyright © 2010 - 2020 Adobe. All Rights Reserved