Class RejectDuplicatesItemFilter

  • All Implemented Interfaces:
    org.craftercms.core.service.ItemFilter

    public class RejectDuplicatesItemFilter
    extends Object
    implements org.craftercms.core.service.ItemFilter
    Simple ItemFilter that checks the accepted items list to check if the same item is not already there (some processors can generate the same item twice for different URLs). If the item is already there, it's rejected.
    Author:
    avasquez
    • Constructor Detail

      • RejectDuplicatesItemFilter

        public RejectDuplicatesItemFilter()
    • Method Detail

      • runBeforeProcessing

        public boolean runBeforeProcessing()
        Specified by:
        runBeforeProcessing in interface org.craftercms.core.service.ItemFilter
      • runAfterProcessing

        public boolean runAfterProcessing()
        Specified by:
        runAfterProcessing in interface org.craftercms.core.service.ItemFilter
      • accepts

        public boolean accepts​(org.craftercms.core.service.Item item,
                               List<org.craftercms.core.service.Item> acceptedItems,
                               List<org.craftercms.core.service.Item> rejectedItems,
                               boolean runningBeforeProcessing)
        Specified by:
        accepts in interface org.craftercms.core.service.ItemFilter