java.lang.Object
hudson.model.AbstractDescribableImpl<PluginGerritEvent>
com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginGerritEvent
All Implemented Interfaces:
Describable<PluginGerritEvent>
Direct Known Subclasses:
PluginChangeAbandonedEvent, PluginChangeMergedEvent, PluginChangeRestoredEvent, PluginCommentAddedContainsEvent, PluginCommentAddedEvent, PluginDraftPublishedEvent, PluginHashtagsChangedEvent, PluginPatchsetCreatedEvent, PluginPrivateStateChangedEvent, PluginRefUpdatedEvent, PluginRerunCheckEvent, PluginTopicChangedEvent, PluginWipStateChangedEvent

public abstract class PluginGerritEvent extends AbstractDescribableImpl<PluginGerritEvent>
Super class to all the events that can be configured to trigger on.
Author:
Tomas Westling <tomas.westling@sonymobile.com>
  • Constructor Details

    • PluginGerritEvent

      public PluginGerritEvent()
  • Method Details

    • getCorrespondingEventClass

      public abstract Class getCorrespondingEventClass()
      Getter for the corresponding gerrit event class.
      Returns:
      the gerrit event class.
    • shouldTriggerOn

      public boolean shouldTriggerOn(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
      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.
      Parameters:
      event - The event to validate.
      Returns:
      true if it should trigger on the specified event, otherwise false.