All Implemented Interfaces:
Describable<PluginGerritEvent>, Serializable

public class PluginHashtagsChangedEvent extends PluginGerritEvent implements Serializable
An event configuration that causes the build to be triggered when a hashTag changed which matching a configurable RegEx.
See Also:
  • Constructor Details

    • PluginHashtagsChangedEvent

      public PluginHashtagsChangedEvent()
      Empty Default constructor for Serializer.
    • PluginHashtagsChangedEvent

      @DataBoundConstructor public PluginHashtagsChangedEvent(String hashtagChanged)
      Standard dataBoundConstructor for configuration.
      Parameters:
      hashtagChanged - String contains a regular expression to match changed hasgtag.
  • Method Details

    • getHashtagChanged

      public String getHashtagChanged()
      Get a regular expression to show in jenkins page.
      Returns:
      String contains a regular expression to match changed hasgtag.
    • getCorrespondingEventClass

      public Class getCorrespondingEventClass()
      Get class for watched gerrit event.
      Specified by:
      getCorrespondingEventClass in class PluginGerritEvent
      Returns:
      Hashtag changed event class
    • shouldTriggerOn

      public boolean shouldTriggerOn(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
      Description copied from class: PluginGerritEvent
      Return if it should trigger build for the specified event. Default implementation only check if the specified event is an instance of the corresponding event class. Sub class can override to add additional validation.
      Overrides:
      shouldTriggerOn in class PluginGerritEvent
      Parameters:
      event - The event to validate.
      Returns:
      true if it should trigger on the specified event, otherwise false.