Interface BuildPromotionNotificationCountHandler

    • Method Detail

      • getAttributeName

        String getAttributeName​(String notifierType)
        Returns name of the build promotion attribute that holds the counter value.
        Parameters:
        notifierType - unique identifier of the notifier.
      • getCounter

        int getCounter​(BuildPromotion buildPromotion,
                       String notifierType)
        Returns number of notifications sent by this notifier in scope of a given build promotion. May optionally be used by notifier implementation to enforce limit on number of notifications sent, in conjunction with `incrementNotificationsCounter` method.
        Parameters:
        buildPromotion - instance of a BuildPromotion class to be checked.
      • incrementCounter

        void incrementCounter​(BuildPromotion buildPromotion,
                              String notifierType)
        Updates number of notifications sent by this notifier in scope of a given build promotion. The value is persisted in DB and will survive a restart. May optionally be used by notifier implementation to enforce limit on number of notifications sent, in conjunction with `getNotificationsCounter` method.
        Parameters:
        buildPromotion - instance of a BuildPromotion class to be updated.