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
    The Gerrit event.
    The parameter expander.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Notification(ParameterExpander parameterExpander, com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent gerritEvent)
    Abstract constructor.
  • Method Summary

    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
    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>
    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 Details

    • gerritEvent

      protected com.sonymobile.tools.gerrit.gerritevents.dto.events.GerritTriggeredEvent gerritEvent
      The Gerrit event.
    • parameterExpander

      protected ParameterExpander parameterExpander
      The parameter expander.
  • Constructor Details

    • 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 Details

    • isVoteSameTopic

      public boolean isVoteSameTopic()
      Returns true if voteSameTopic is enabled, otherwise false.
      Specified by:
      isVoteSameTopic in interface INotification
      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