|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface NotificationRulesManager
Manages user notification rules.
UserGroupNotificationRulesManager| Method Summary | |
|---|---|
void |
addListener(NotificationRulesListener<java.lang.Long> listener)
Registers new user notification rules listener |
long |
addNewRule(long userId,
java.lang.String notifierType,
NotificationRule rule)
Adds new rule to the rules of specified user for specified notifier type. |
void |
applyOrder(long userId,
java.lang.String notifierType,
long[] ruleIds)
Sort notification rules in the specified order |
java.util.Collection<java.lang.Long> |
findConflictingRules(long userId,
java.lang.String notifierType,
WatchedBuilds watch)
Searches for rules which intersect with specified watched builds in the list of user rules for specified notifier type. |
NotificationRule |
findRuleById(long userId,
long ruleId)
Searches for a rule with specified id among rules of specified user |
java.util.Map<java.lang.Long,java.util.List<NotificationRule>> |
findRulesByNotificatorType(java.lang.String notifierType)
Returns map of user id to list of notification rules for specified notifier type. |
java.util.Map<java.lang.Long,java.util.List<NotificationRule>> |
getAllRulesByNotificatorType(java.lang.String notifierType)
Returns a map of user id to list of all notification rules (including the rules of all groups containing the user) for the specified notifier type. |
java.util.List<NotificationRule> |
getAllUserNotificationRules(long userId,
java.lang.String notifierType)
Returns all user notification rules (including the rules of all groups containing the user) for the specified notifier type. |
java.util.List<NotificationRule> |
getUserNotificationRules(long userId,
java.lang.String notifierType)
Returns user notification rules for specified notifier. |
boolean |
isRulesWithEventsConfigured(long userId,
java.lang.String notifierType)
Returns true if specified user has notification rules with one or more events configured for specified notifier type. |
void |
removeRule(long userId,
long ruleId)
Removes rule with specified id from the list of rules of specified user. |
void |
setUserNotificationRules(long userId,
java.lang.String notifierType,
java.util.List<NotificationRule> rules)
Sets user notification rules for specified notifier |
| Method Detail |
|---|
@NotNull
java.util.List<NotificationRule> getUserNotificationRules(long userId,
@NotNull
java.lang.String notifierType)
throws UserNotFoundException
userId - id of the usernotifierType - type of the notifier
UserNotFoundException - if user with specified id does not exist in
current login domain UserModel.findUserById(long).
boolean isRulesWithEventsConfigured(long userId,
@NotNull
java.lang.String notifierType)
throws UserNotFoundException
userId - id of the usernotifierType - type of the notifier
UserNotFoundException - if user does not exist
void setUserNotificationRules(long userId,
@NotNull
java.lang.String notifierType,
@NotNull
java.util.List<NotificationRule> rules)
throws UserNotFoundException
userId - id of the usernotifierType - type of the notifierrules - rules to save
UserNotFoundException - if user with specified id does not exist in
current login domain UserModel.findUserById(long).
java.util.Map<java.lang.Long,java.util.List<NotificationRule>> findRulesByNotificatorType(@NotNull
java.lang.String notifierType)
notifierType - type of the notifier
void removeRule(long userId,
long ruleId)
throws UserNotFoundException
userId - id of the userruleId - id of the rule
UserNotFoundException - if user with specified id does not exist in
current login domain UserModel.findUserById(long).
void applyOrder(long userId,
@NotNull
java.lang.String notifierType,
@NotNull
long[] ruleIds)
userId - id of the usernotifierType - type of the notifierruleIds - ids of the rules in the required order
long addNewRule(long userId,
@NotNull
java.lang.String notifierType,
@NotNull
NotificationRule rule)
throws UserNotFoundException,
DuplicateNotificationRuleException
userId - id of the usernotifierType - type of the notifierrule - rule to add
UserNotFoundException - if user with specified id does not exist in
current login domain UserModel.findUserById(long).
DuplicateNotificationRuleException - if similar rule already exists
@Nullable
java.util.Collection<java.lang.Long> findConflictingRules(long userId,
@NotNull
java.lang.String notifierType,
@NotNull
WatchedBuilds watch)
throws UserNotFoundException
userId - id of the usernotifierType - type of the notifierwatch - watched builds
UserNotFoundException - if user does not exist
@Nullable
NotificationRule findRuleById(long userId,
long ruleId)
throws UserNotFoundException
userId - id of the userruleId - id of the rule
UserNotFoundException - if user does not exist
void addListener(@NotNull
NotificationRulesListener<java.lang.Long> listener)
listener - new listener.
@NotNull
java.util.Map<java.lang.Long,java.util.List<NotificationRule>> getAllRulesByNotificatorType(@NotNull
java.lang.String notifierType)
The rules corresponding to one usergroup are grouped together, but the order of usergroups isn't well-defined. User rules are guaranteed to preceed group rules.
notifierType - type of the notifier
@NotNull
java.util.List<NotificationRule> getAllUserNotificationRules(long userId,
@NotNull
java.lang.String notifierType)
throws UserNotFoundException
userId - id of the usernotifierType - type of the notifier
UserNotFoundException - if user with specified id does not exist in
current login domain UserModel.findUserById(long).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||