Interface ServiceDeskEmailReplyMatcher


@ParametersAreNonnullByDefault public interface ServiceDeskEmailReplyMatcher
The matcher to implement, in order to participate in the Incoming Email reply stripping process.

Implementations of this, will be included when CUSTOM Email Reply (comment) Stripping is enabled for service projects, and invoked initially on the text part of the email body, and additionally on the converted wiki markup version of the content, if this conversion is also enabled for service projects.

Since:
v3.4.1
  • Method Details

    • shouldStripText

      boolean shouldStripText(@Nonnull List<String> textBlock)
      Evalute the current text block and return whether the message should be stripped from this point onwards.

      A maximum of 5 lines of text will be provided at a time, until the end of the message, moving down 1 line at a time. For example:

      First invocation

      • 1st line
      • 2nd line
      • 3rd line
      • 4th line
      • 5th line
      Second invocation
      • 2nd line
      • 3rd line
      • 4th line
      • 5th line
      • 6th line
      and so on until the last line ....

      One thing to note is that the implementation should ideally handle the text and potential wiki markup versions of the message content, as while every effort is made to accurately line up a stripped text mail part with it's html mail part equivalent before performing the wiki markup conversion, this is not always possible. Hence, the requirement to support a second flow through the stripping matchers on the wiki markup.

      Parameters:
      textBlock - contains up to 5 lines of text
      Returns:
      true if the block is the START of a match that should be stripped from this point, otherwise return false
    • shouldStripTextOnIssueCreation

      default boolean shouldStripTextOnIssueCreation(@Nonnull List<String> textBlock)
      Same as shouldStripText(List) but when this matcher is executed on issue creation.

      By default this will return false, as Email Reply Matchers were originally intended only for comment matching.

      However if would like your implementation to also execute on issue creation (ie. description) then implement this method.

      Parameters:
      textBlock - contains up to 5 lines of text
      Returns:
      true if the block is the START of a match that should be stripped from this point, otherwise return false
      Since:
      v3.10.0