Class IncludeByUrlItemFilter

  • All Implemented Interfaces:
    ItemFilter

    public class IncludeByUrlItemFilter
    extends Object
    implements ItemFilter
    ItemFilter that rejects an item if its URL doesn't match any one of a list of regexes.
    Author:
    avasquez
    • Constructor Detail

      • IncludeByUrlItemFilter

        public IncludeByUrlItemFilter​(String[] includeRegexes)
    • Method Detail

      • runBeforeProcessing

        public boolean runBeforeProcessing()
        Description copied from interface: ItemFilter
        Returns true if the filter should be executed before any item is processed (basically, before any ItemProcessor is called).
        Specified by:
        runBeforeProcessing in interface ItemFilter
      • runAfterProcessing

        public boolean runAfterProcessing()
        Description copied from interface: ItemFilter
        Returns true if the filter should be executed after all items are processed (basically, after all ItemProcessor are called).
        Specified by:
        runAfterProcessing in interface ItemFilter
      • accepts

        public boolean accepts​(Item item,
                               List<Item> acceptedItems,
                               List<Item> rejectedItems,
                               boolean runningBeforeProcessing)
        Description copied from interface: ItemFilter
        Return true if the given item is accepted by the filter.
        Specified by:
        accepts in interface ItemFilter
        Parameters:
        item - the item to accept or reject
        acceptedItems - the list of the currently accepted items
        rejectedItems - the list of the currently rejected items
        runningBeforeProcessing - if the filter is running before processing (true) or after processing (false)