Class PluginPatchsetCreatedEvent
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<PluginGerritEvent>
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginGerritEvent
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginPatchsetCreatedEvent
-
- All Implemented Interfaces:
Describable<PluginGerritEvent>
,Serializable
public class PluginPatchsetCreatedEvent extends PluginGerritEvent implements Serializable
An event configuration that causes the build to be triggered when a patchset is created.- Author:
- Tomas Westling <tomas.westling@sonymobile.com>
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PluginPatchsetCreatedEvent.PluginPatchsetCreatedEventDescriptor
The Descriptor for the PluginPatchsetCreatedEvent.-
Nested classes/interfaces inherited from class com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.events.PluginGerritEvent
PluginGerritEvent.PluginGerritEventDescriptor
-
-
Constructor Summary
Constructors Constructor Description PluginPatchsetCreatedEvent()
Default constructor.PluginPatchsetCreatedEvent(boolean excludeDrafts, boolean excludeTrivialRebase, boolean excludeNoCodeChange)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCommitMessageContainsRegEx()
Getter for commitMessageContains field.Class
getCorrespondingEventClass()
Getter for the corresponding gerrit event class.Descriptor<PluginGerritEvent>
getDescriptor()
Getter for the Descriptor.String
getUploaderNameContainsRegEx()
Getter for uploaderNameContainsRegEx field.boolean
isExcludeDrafts()
Getter for the excludeDrafts field.boolean
isExcludeNoCodeChange()
Getter for the excludeNoCodeChange field.boolean
isExcludePrivateState()
Getter for the excludePrivateState field.boolean
isExcludeTrivialRebase()
Getter for the excludeTrivialRebase field.boolean
isExcludeWipState()
Getter for the excludeWipState field.void
setCommitMessageContainsRegEx(String commitMessageContainsRegEx)
Setter for commitMessageContains.void
setExcludeDrafts(boolean excludeDrafts)
Setter for excludeDrafts.void
setExcludeNoCodeChange(boolean excludeNoCodeChange)
Setter for excludeNoCodeChange.void
setExcludePrivateState(boolean excludePrivateState)
Setter for excludePrivateState.void
setExcludeTrivialRebase(boolean excludeTrivialRebase)
Setter for excludeTrivialRebase.void
setExcludeWipState(boolean excludeWipState)
Setter for excludeWipState.void
setUploaderNameContainsRegEx(String uploaderNameContainsRegEx)
Setter for uploaderNameContainsRegEx.boolean
shouldTriggerOn(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event)
Return if it should trigger build for the specified event.
-
-
-
Constructor Detail
-
PluginPatchsetCreatedEvent
@DataBoundConstructor public PluginPatchsetCreatedEvent()
Default constructor.
-
PluginPatchsetCreatedEvent
@Deprecated public PluginPatchsetCreatedEvent(boolean excludeDrafts, boolean excludeTrivialRebase, boolean excludeNoCodeChange)
Deprecated.Standard DataBoundConstructor.- Parameters:
excludeDrafts
- if drafts should be excluded or not.excludeTrivialRebase
- if trivial rebases should be excluded or not.excludeNoCodeChange
- if message-only changes should be excluded.
-
-
Method Detail
-
setExcludeDrafts
@DataBoundSetter public void setExcludeDrafts(boolean excludeDrafts)
Setter for excludeDrafts.- Parameters:
excludeDrafts
- if drafts should be excluded or not.
-
setExcludeTrivialRebase
@DataBoundSetter public void setExcludeTrivialRebase(boolean excludeTrivialRebase)
Setter for excludeTrivialRebase.- Parameters:
excludeTrivialRebase
- if trivial rebases should be excluded or not.
-
setExcludeNoCodeChange
@DataBoundSetter public void setExcludeNoCodeChange(boolean excludeNoCodeChange)
Setter for excludeNoCodeChange.- Parameters:
excludeNoCodeChange
- if message-only changes should be excluded.
-
setExcludePrivateState
@DataBoundSetter public void setExcludePrivateState(boolean excludePrivateState)
Setter for excludePrivateState.- Parameters:
excludePrivateState
- if private state changes should be excluded.
-
setExcludeWipState
@DataBoundSetter public void setExcludeWipState(boolean excludeWipState)
Setter for excludeWipState.- Parameters:
excludeWipState
- if wip state changes should be excluded.
-
setCommitMessageContainsRegEx
@DataBoundSetter public void setCommitMessageContainsRegEx(String commitMessageContainsRegEx)
Setter for commitMessageContains.- Parameters:
commitMessageContainsRegEx
- Trigger if this text is included in the commit message
-
setUploaderNameContainsRegEx
@DataBoundSetter public void setUploaderNameContainsRegEx(String uploaderNameContainsRegEx)
Setter for uploaderNameContainsRegEx.- Parameters:
uploaderNameContainsRegEx
- Trigger if uploader name is validated against this RegEx.
-
getDescriptor
public Descriptor<PluginGerritEvent> getDescriptor()
Getter for the Descriptor.- Specified by:
getDescriptor
in interfaceDescribable<PluginGerritEvent>
- Overrides:
getDescriptor
in classAbstractDescribableImpl<PluginGerritEvent>
- Returns:
- the Descriptor for the PluginPatchsetCreatedEvent.
-
getCorrespondingEventClass
public Class getCorrespondingEventClass()
Description copied from class:PluginGerritEvent
Getter for the corresponding gerrit event class.- Specified by:
getCorrespondingEventClass
in classPluginGerritEvent
- Returns:
- the gerrit event class.
-
isExcludeDrafts
public boolean isExcludeDrafts()
Getter for the excludeDrafts field.- Returns:
- excludeDrafts
-
isExcludeTrivialRebase
public boolean isExcludeTrivialRebase()
Getter for the excludeTrivialRebase field.- Returns:
- excludeTrivialRebase
-
isExcludeNoCodeChange
public boolean isExcludeNoCodeChange()
Getter for the excludeNoCodeChange field.- Returns:
- excludeNoCodeChange
-
isExcludePrivateState
public boolean isExcludePrivateState()
Getter for the excludePrivateState field.- Returns:
- excludePrivateState
-
isExcludeWipState
public boolean isExcludeWipState()
Getter for the excludeWipState field.- Returns:
- excludeWipState
-
getCommitMessageContainsRegEx
public String getCommitMessageContainsRegEx()
Getter for commitMessageContains field.- Returns:
- commitMessageContains
-
getUploaderNameContainsRegEx
public String getUploaderNameContainsRegEx()
Getter for uploaderNameContainsRegEx field.- Returns:
- uploaderNameContainsRegEx
-
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.
-
-