Class PluginCommentAddedContainsEvent

java.lang.Object
hudson.model.AbstractDescribableImpl<PluginGerritEvent>
com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginGerritEvent
com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent
All Implemented Interfaces:
Describable<PluginGerritEvent>, Serializable

public class PluginCommentAddedContainsEvent extends PluginGerritEvent implements Serializable
An event configuration that trigger the build when a comment is added and contains a message matching a configurable RegEx.
Author:
Francois Visconte <f.visconte@criteo.com>
See Also:
  • Constructor Details

    • PluginCommentAddedContainsEvent

      public PluginCommentAddedContainsEvent()
      Empty constructor for serializer.
    • PluginCommentAddedContainsEvent

      @DataBoundConstructor public PluginCommentAddedContainsEvent(String commentAddedCommentContains)
      Standard DataBoundConstructor.
      Parameters:
      commentAddedCommentContains - a string containg a regular expression.
  • Method Details

    • getCommentAddedCommentContains

      public String getCommentAddedCommentContains()
      Get the regular expression to match against comment.
      Returns:
      a string containg a regex.
    • getCorrespondingEventClass

      public Class getCorrespondingEventClass()
      Gets related event class.
      Specified by:
      getCorrespondingEventClass in class PluginGerritEvent
      Returns:
      a Class
    • match

      public boolean match(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
      Check if the comment added match configured regular expression.
      Parameters:
      event - a GerritTriggeredEvent.
      Returns:
      true or false.