Interface WebhookFilterService

All Known Implementing Classes:
DefaultWebhookFilterService

public interface WebhookFilterService
A service for filtering items being sent to a webhook. Implementations can provide logic for which items should be sent to a webhook and which should be excluded from that process.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends ItemModel>
    Optional<T>
    filter(T item, String scriptUri)
    Evaluates the item and filters out, if item does not match the filtering logic criteria.
  • Method Details

    • filter

      <T extends ItemModel> Optional<T> filter(T item, String scriptUri)
      Evaluates the item and filters out, if item does not match the filtering logic criteria.
      Type Parameters:
      T - The type of the ItemModel
      Parameters:
      item - an item being sent to a webhook.
      scriptUri - a URI for the item filter logic (script) location. See Scripting Engine documentation
      Returns:
      an Optional containing the item to send to the webhook, if the item passes the filter; or an Optional.empty(), if the item is filtered out from the webhook notification.