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
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe descriptor for PluginCommentAddedContainsEvent.Nested classes/interfaces inherited from class com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginGerritEvent
PluginGerritEvent.PluginGerritEventDescriptor -
Constructor Summary
ConstructorsConstructorDescriptionEmpty constructor for serializer.PluginCommentAddedContainsEvent(String commentAddedCommentContains) Standard DataBoundConstructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the regular expression to match against comment.Gets related event class.booleanmatch(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
shouldTriggerOnMethods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
PluginCommentAddedContainsEvent
public PluginCommentAddedContainsEvent()Empty constructor for serializer. -
PluginCommentAddedContainsEvent
Standard DataBoundConstructor.- Parameters:
commentAddedCommentContains- a string containg a regular expression.
-
-
Method Details
-
getCommentAddedCommentContains
Get the regular expression to match against comment.- Returns:
- a string containg a regex.
-
getCorrespondingEventClass
Gets related event class.- Specified by:
getCorrespondingEventClassin 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.
-