Class Notification
- java.lang.Object
-
- com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.notification.Notification
-
- All Implemented Interfaces:
INotification
- Direct Known Subclasses:
NotificationBuildCompleted
,NotificationBuildStarted
public abstract class Notification extends Object implements INotification
Abstract class for Notification send to Gerrit.
-
-
Field Summary
Fields Modifier and Type Field Description protected com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent
gerritEvent
The Gerrit event.protected ParameterExpander
parameterExpander
The parameter expander.
-
Constructor Summary
Constructors Constructor Description Notification(ParameterExpander parameterExpander, com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent gerritEvent)
Abstract constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent
createEventTopicChange(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, com.sonymobile.tools.gerrit.gerritevents.dto.attr.Change change, com.sonymobile.tools.gerrit.gerritevents.dto.attr.PatchSet patchSet)
Returns a GerritTrigger event with event information based on change and patchset.boolean
isVoteSameTopic()
Returns true if voteSameTopic is enabled, otherwise false.Map<com.sonymobile.tools.gerrit.gerritevents.dto.attr.Change,com.sonymobile.tools.gerrit.gerritevents.dto.attr.PatchSet>
queryTopicChanges()
Returns a map of changes and patchsets which are assigned to a topic.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sonyericsson.hudson.plugins.gerrit.trigger.gerritnotifier.notification.INotification
getCommands, isValid
-
-
-
-
Field Detail
-
gerritEvent
protected com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent gerritEvent
The Gerrit event.
-
parameterExpander
protected ParameterExpander parameterExpander
The parameter expander.
-
-
Constructor Detail
-
Notification
public Notification(ParameterExpander parameterExpander, com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent gerritEvent)
Abstract constructor.- Parameters:
parameterExpander
- the parameter expander.gerritEvent
- the gerrit event.
-
-
Method Detail
-
isVoteSameTopic
public boolean isVoteSameTopic()
Returns true if voteSameTopic is enabled, otherwise false.- Specified by:
isVoteSameTopic
in interfaceINotification
- Returns:
- true of false based on Gerrit config.
-
queryTopicChanges
public Map<com.sonymobile.tools.gerrit.gerritevents.dto.attr.Change,com.sonymobile.tools.gerrit.gerritevents.dto.attr.PatchSet> queryTopicChanges()
Returns a map of changes and patchsets which are assigned to a topic.- Returns:
- Map of changes and patchsets assigned to a topic
-
createEventTopicChange
protected com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent createEventTopicChange(com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent event, com.sonymobile.tools.gerrit.gerritevents.dto.attr.Change change, com.sonymobile.tools.gerrit.gerritevents.dto.attr.PatchSet patchSet)
Returns a GerritTrigger event with event information based on change and patchset.- Parameters:
event
- the event.change
- the change.patchSet
- the patchset.- Returns:
- Returns GerritTrigger event
-
-