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
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>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PluginGerritEvent.PluginGerritEventDescriptor
The Descriptor for the PluginGerritEvent.
-
Constructor Summary
Constructors Constructor Description PluginGerritEvent()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Class
getCorrespondingEventClass()
Getter for the corresponding gerrit event class.boolean
shouldTriggerOn(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
-
-
-
-
Method Detail
-
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.
-
-