Class DeclaringTypeItemFilter

    • 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 check
        propsOnly - if true only properties are checked
        minDepth - the minimal depth
        maxDepth - 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 check
        propsOnly - if true only 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 - if true only properties are checked.
      • matches

        public boolean matches​(Item item)
                        throws RepositoryException
        Returns true. 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 and propsOnly flag is true it returns false.
        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