Class PluginHashtagsChangedEvent
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<PluginGerritEvent>
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginGerritEvent
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginHashtagsChangedEvent
-
- 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PluginHashtagsChangedEvent.PluginHashtagsChangedEventDescriptor
The descriptor for PluginHashtagChangedEvent.-
Nested classes/interfaces inherited from class com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginGerritEvent
PluginGerritEvent.PluginGerritEventDescriptor
-
-
Constructor Summary
Constructors Constructor Description PluginHashtagsChangedEvent()
Empty Default constructor for Serializer.PluginHashtagsChangedEvent(String hashtagChanged)
Standard dataBoundConstructor for configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class
getCorrespondingEventClass()
Get class for watched gerrit event.String
getHashtagChanged()
Get a regular expression to show in jenkins page.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
-
-
-
-
Constructor Detail
-
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 Detail
-
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 classPluginGerritEvent
- 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 classPluginGerritEvent
- Parameters:
event
- The event to validate.- Returns:
- true if it should trigger on the specified event, otherwise false.
-
-