public interface NotificationRulesHolder
NotificationRulesManager
Modifier and Type | Method and Description |
---|---|
long |
addNewRule(java.lang.String notifierType,
NotificationRule rule)
Adds new rule to the rules of specified user for specified notifier type.
|
void |
applyOrder(java.lang.String notifierType,
long[] ruleIds)
Sorts the notification rules in the specified order.
|
java.util.Collection<java.lang.Long> |
findConflictingRules(java.lang.String notifierType,
WatchedBuilds watch)
Searches for rules which intersect with specified watched builds.
|
NotificationRule |
findRuleById(long ruleId)
Searches for a rule with specified id.
|
java.util.List<NotificationRulesHolder> |
getAllParentRulesHolders()
Returns all (direct and inherited) parent notification rules holders
|
java.util.List<NotificationRule> |
getNotificationRules(java.lang.String notifierType)
Returns the notification rules for specified notifier for this holder (user or group).
|
java.util.List<NotificationRulesHolder> |
getParentRulesHolders()
Returns direct parent notification rules holders
|
void |
removeRule(long ruleId)
Removes the rule with specified id.
|
void |
removeRule(NotificationRule rule)
Removes the rule.
|
void |
setNotificationRules(java.lang.String notifierType,
java.util.List<NotificationRule> rules)
Sets the notification rules for specified notifier.
|
@NotNull java.util.List<NotificationRule> getNotificationRules(@NotNull java.lang.String notifierType)
notifierType
- type of the notifiervoid setNotificationRules(@NotNull java.lang.String notifierType, @NotNull java.util.List<NotificationRule> rules)
notifierType
- type of the notifierrules
- rules to savevoid removeRule(long ruleId)
ruleId
- id of the rulevoid removeRule(@NotNull NotificationRule rule)
NotificationRuleChangedException
if notification rule with same id was already changed. Does nothing if notification rule doesn't exist.rule
- rule to removevoid applyOrder(@NotNull java.lang.String notifierType, @NotNull long[] ruleIds)
notifierType
- type of the notifierruleIds
- ids of the rules in the required orderlong addNewRule(@NotNull java.lang.String notifierType, @NotNull NotificationRule rule) throws DuplicateNotificationRuleException
notifierType
- type of the notifierrule
- rule to addDuplicateNotificationRuleException
- if similar rule already exists@Nullable java.util.Collection<java.lang.Long> findConflictingRules(@NotNull java.lang.String notifierType, @NotNull WatchedBuilds watch)
notifierType
- type of the notifierwatch
- watched builds@Nullable NotificationRule findRuleById(long ruleId)
ruleId
- id of the rule@NotNull java.util.List<NotificationRulesHolder> getParentRulesHolders()
@NotNull java.util.List<NotificationRulesHolder> getAllParentRulesHolders()