Interface INotificationEventHandler


public interface INotificationEventHandler
  • Method Details

    • getTargets

      Set<String> getTargets()
    • getTargetsMap

      @NotNull Map<String,ITarget> getTargetsMap()
      Returns a map of targets where the key is the target name and the value is the ITarget object itself.
      Since:
      3.20.2
    • handleEvent

      IAnnouncement handleEvent(INotificationEvent event, String subject, Element element)
    • handleEvents

      IAnnouncement[] handleEvents(List events)
    • handleEventPerUser

      IAnnouncement[] handleEventPerUser(INotificationEvent event, String subject, Element element)
    • getConfigElements

      List<Element> getConfigElements(INotificationEvent event)
      Since:
      3.3.0
    • getConfigElements

      List<Element> getConfigElements(String eventId, IProject project)
      Fetch XML elements from configuration for specific notification event
      Parameters:
      eventId - ID of notification event which elements will be fetched for
      project - if null then elements will be read from global configuration, otherwise if configuration exist on project level then this will be used
      Returns:
      list of org.w3c.dom.Element elements
    • getNotificationSettings

      NotificationSettings getNotificationSettings()
      Polarion global notification settings (smtp host, sender email address, subject prefix)
      Returns:
      NotificationSettings
    • getTargetEmails

      String[] getTargetEmails(INotificationEvent event, Element configElement)
      For a specific event and element that will return a set of emails fetched from the targets.
      Parameters:
      event - notification event
      configElement - XML element from configuration
      Returns:
      array of unique emails (or empty array)