Class PluginGerritEvent
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
Super class to all the events that can be configured to trigger on.
- Author:
- Tomas Westling <tomas.westling@sonymobile.com>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe Descriptor for the PluginGerritEvent. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract ClassGetter for the corresponding gerrit event class.booleanshouldTriggerOn(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event) Return if it should trigger build for the specified event.Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
PluginGerritEvent
public PluginGerritEvent()
-
-
Method Details
-
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.
-