Class MimeTypeFilter

java.lang.Object
org.alfresco.event.sdk.handling.filter.AbstractEventFilter
org.alfresco.event.sdk.handling.filter.MimeTypeFilter
All Implemented Interfaces:
EventFilter

public class MimeTypeFilter extends AbstractEventFilter
EventFilter that checks if an events makes reference to a content with a specific mime-type within a set of them.
  • Method Details

    • of

      public static MimeTypeFilter of(String... acceptedMimeTypes)
      Obtain a MimeTypeFilter for a specific mime-type.
      Parameters:
      acceptedMimeTypes - given list of mime-type's that must be accepted by the filter
      Returns:
      created MimeTypeFilter
    • test

      public boolean test(org.alfresco.repo.event.v1.model.RepoEvent<org.alfresco.repo.event.v1.model.DataAttributes<org.alfresco.repo.event.v1.model.Resource>> event)
      Description copied from interface: EventFilter
      Evaluates this predicate on the given argument.
      Parameters:
      event - the input argument
      Returns:
      true if the input argument matches the predicate, otherwise false