Class NameItemFilter

    • Field Summary

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

        ALL, NONE
    • Constructor Summary

      Constructors 
      Constructor Description
      NameItemFilter()
      Default constructor
      NameItemFilter​(java.lang.String name)
      Creates a new name filter with the given name.
      NameItemFilter​(java.lang.String name, int minDepth, int maxDepth)
      Creates a new name filter with the given name and depths
    • Constructor Detail

      • NameItemFilter

        public NameItemFilter()
        Default constructor
      • NameItemFilter

        public NameItemFilter​(java.lang.String name,
                              int minDepth,
                              int maxDepth)
        Creates a new name filter with the given name and depths
        Parameters:
        name - the name to filter on
        minDepth - the minimal depth
        maxDepth - the maximal depth
      • NameItemFilter

        public NameItemFilter​(java.lang.String name)
        Creates a new name filter with the given name.
        Parameters:
        name - the name to filter on
    • Method Detail

      • setName

        public void setName​(java.lang.String name)
        Sets the name
        Parameters:
        name - the name
      • 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 name of the given item is equal to the configured name.
        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