Class PluginCommentAddedContainsEvent
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<PluginGerritEvent>
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginGerritEvent
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginCommentAddedContainsEvent
-
- All Implemented Interfaces:
Describable<PluginGerritEvent>
,Serializable
public class PluginCommentAddedContainsEvent extends PluginGerritEvent implements Serializable
An event configuration that trigger the build when a comment is added and contains a message matching a configurable RegEx.- Author:
- Francois Visconte <f.visconte@criteo.com>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PluginCommentAddedContainsEvent.PluginCommentAddedContainsEventDescriptor
The descriptor for PluginCommentAddedContainsEvent.-
Nested classes/interfaces inherited from class com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginGerritEvent
PluginGerritEvent.PluginGerritEventDescriptor
-
-
Constructor Summary
Constructors Constructor Description PluginCommentAddedContainsEvent()
Empty constructor for serializer.PluginCommentAddedContainsEvent(String commentAddedCommentContains)
Standard DataBoundConstructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCommentAddedCommentContains()
Get the regular expression to match against comment.Class
getCorrespondingEventClass()
Gets related event class.boolean
match(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Check if the comment added match configured regular expression.-
Methods inherited from class com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginGerritEvent
shouldTriggerOn
-
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
-
-
-
Constructor Detail
-
PluginCommentAddedContainsEvent
public PluginCommentAddedContainsEvent()
Empty constructor for serializer.
-
PluginCommentAddedContainsEvent
@DataBoundConstructor public PluginCommentAddedContainsEvent(String commentAddedCommentContains)
Standard DataBoundConstructor.- Parameters:
commentAddedCommentContains
- a string containg a regular expression.
-
-
Method Detail
-
getCommentAddedCommentContains
public String getCommentAddedCommentContains()
Get the regular expression to match against comment.- Returns:
- a string containg a regex.
-
getCorrespondingEventClass
public Class getCorrespondingEventClass()
Gets related event class.- Specified by:
getCorrespondingEventClass
in classPluginGerritEvent
- Returns:
- a Class
-
match
public boolean match(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Check if the comment added match configured regular expression.- Parameters:
event
- a GerritTriggeredEvent.- Returns:
- true or false.
-
-