Class BuildPromotionNotificationCountHandlerImpl
- java.lang.Object
-
- jetbrains.buildServer.notification.impl.BuildPromotionNotificationCountHandlerImpl
-
- All Implemented Interfaces:
BuildPromotionNotificationCountHandler
public class BuildPromotionNotificationCountHandlerImpl extends Object implements BuildPromotionNotificationCountHandler
-
-
Constructor Summary
Constructors Constructor Description BuildPromotionNotificationCountHandlerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAttributeName(String notifierType)
Returns name of the build promotion attribute that holds the counter value.int
getCounter(BuildPromotion buildPromotion, String notifierType)
Returns number of notifications sent by this notifier in scope of a given build promotion.void
incrementCounter(BuildPromotion buildPromotion, String notifierType)
Updates number of notifications sent by this notifier in scope of a given build promotion.
-
-
-
Method Detail
-
getAttributeName
public String getAttributeName(String notifierType)
Description copied from interface:BuildPromotionNotificationCountHandler
Returns name of the build promotion attribute that holds the counter value.- Specified by:
getAttributeName
in interfaceBuildPromotionNotificationCountHandler
- Parameters:
notifierType
- unique identifier of the notifier.
-
getCounter
public int getCounter(BuildPromotion buildPromotion, String notifierType)
Description copied from interface:BuildPromotionNotificationCountHandler
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.- Specified by:
getCounter
in interfaceBuildPromotionNotificationCountHandler
- Parameters:
buildPromotion
- instance of a BuildPromotion class to be checked.
-
incrementCounter
public void incrementCounter(BuildPromotion buildPromotion, String notifierType)
Description copied from interface:BuildPromotionNotificationCountHandler
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.- Specified by:
incrementCounter
in interfaceBuildPromotionNotificationCountHandler
- Parameters:
buildPromotion
- instance of a BuildPromotion class to be updated.
-
-