Class NodeTypeItemFilter

    • Field Summary

      • Fields inherited from interface org.apache.jackrabbit.vault.fs.api.ItemFilter

        ALL, NONE
    • Constructor Summary

      Constructors 
      Constructor Description
      NodeTypeItemFilter()
      Default constructor
      NodeTypeItemFilter​(java.lang.String nodeType, boolean respectSupertype)
      Creates a new node type filter.
      NodeTypeItemFilter​(java.lang.String nodeType, boolean respectSupertype, int minDepth, int maxDepth)
      Creates a new node type filter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void dump​(DumpContext ctx, boolean isLast)
      Dumps some human readable information using the given context.
      boolean matches​(Item item)
      Returns true.
      void setNodeType​(java.lang.String nodeType)
      Sets the node type to filter on
      void setRespectSupertype​(java.lang.String respectSupertype)
      Sets the flag that indicates if super type should be respected.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NodeTypeItemFilter

        public NodeTypeItemFilter()
        Default constructor
      • NodeTypeItemFilter

        public NodeTypeItemFilter​(java.lang.String nodeType,
                                  boolean respectSupertype,
                                  int minDepth,
                                  int maxDepth)
        Creates a new node type filter.
        Parameters:
        nodeType - the node type to filter on
        respectSupertype - indicates if super type should be respected
        minDepth - the minimal depth
        maxDepth - the maximal depth
      • NodeTypeItemFilter

        public NodeTypeItemFilter​(java.lang.String nodeType,
                                  boolean respectSupertype)
        Creates a new node type filter.
        Parameters:
        nodeType - the node type to filter on
        respectSupertype - indicates if super type should be respected
    • Method Detail

      • setNodeType

        public void setNodeType​(java.lang.String nodeType)
        Sets the node type to filter on
        Parameters:
        nodeType - the node type
      • setRespectSupertype

        public void setRespectSupertype​(java.lang.String respectSupertype)
        Sets the flag that indicates if super type should be respected.
        Parameters:
        respectSupertype - if true, super types are respected.
      • matches

        public boolean matches​(Item item)
                        throws RepositoryException
        Returns 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).
        Overrides:
        matches in class DepthItemFilter
        Parameters:
        item - the item to match
        Returns:
        true if the item matches; false otherwise.
        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:
        dump in interface Dumpable
        Overrides:
        dump in class DepthItemFilter
        Parameters:
        ctx - the dump context
        isLast - specifies if this is the last element to dump on this level