NotificationService
, org.springframework.beans.factory.Aware
, org.springframework.context.ApplicationContextAware
public class NotificationServiceImpl extends Object implements NotificationService, org.springframework.context.ApplicationContextAware
Modifier and Type | Field | Description |
---|---|---|
static Integer |
DEFAULT_ISSUE_AGE |
Constructor | Description |
---|---|
NotificationServiceImpl() |
|
NotificationServiceImpl(EmailService emailService,
ProjectService projectService,
NotificationDAO notificationDao,
IssueActivityDAO issueActivityDao,
IssueDAO issueDao,
IssueService issueService) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
addIssueNotification(Notification notification) |
TODO: whats its use?
|
EmailService |
getEmailService() |
|
IssueActivityDAO |
getIssueActivityDao() |
|
IssueDAO |
getIssueDao() |
|
List<Notification> |
getIssueNotifications(Issue issue) |
Retrieves all notifications for an issue where the notification's user is also active.
|
List<Notification> |
getIssueNotifications(Issue issue,
boolean primaryOnly,
boolean activeOnly) |
|
String |
getIssueServiceName() |
|
List<Notification> |
getPrimaryIssueNotifications(Issue issue) |
Retrieves the primary issue notifications.
|
ProjectService |
getProjectService() |
|
boolean |
hasIssueNotification(Issue issue,
Integer userId) |
|
boolean |
hasIssueNotification(Issue issue,
Integer userId,
Notification.Role role) |
|
boolean |
hasIssueNotification(Issue issue,
String login) |
|
boolean |
hasIssueNotification(Issue issue,
String login,
Notification.Role role) |
|
boolean |
removeIssueNotification(Integer notificationId) |
Retrieves an array of issue notifications.
|
void |
sendNotification(Issue issue,
Notification.Type type,
String baseURL) |
|
void |
sendNotification(Issue issue,
Notification.Type type,
String baseURL,
javax.mail.internet.InternetAddress[] receipients,
Integer lastModifiedDays) |
|
void |
sendNotification(Notification notification,
Notification.Type type,
String url) |
|
void |
sendReminder(Issue issue,
User user,
String baseURL,
int issueAge) |
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
|
void |
setEmailService(EmailService emailService) |
|
void |
setIssueActivityDao(IssueActivityDAO issueActivityDao) |
|
void |
setIssueDao(IssueDAO issueDao) |
|
void |
setIssueService(IssueService issueService) |
|
void |
setIssueServiceName(String issueServiceName) |
|
void |
setNotificationDao(NotificationDAO notificationDao) |
|
void |
setProjectService(ProjectService projectService) |
|
void |
updateIssueActivityNotification(Issue issue,
Boolean notificationSent) |
public static final Integer DEFAULT_ISSUE_AGE
public NotificationServiceImpl()
public NotificationServiceImpl(EmailService emailService, ProjectService projectService, NotificationDAO notificationDao, IssueActivityDAO issueActivityDao, IssueDAO issueDao, IssueService issueService)
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public void sendNotification(Notification notification, Notification.Type type, String url)
sendNotification
in interface NotificationService
public void sendNotification(Issue issue, Notification.Type type, String baseURL)
sendNotification
in interface NotificationService
public void setEmailService(EmailService emailService)
public void sendReminder(Issue issue, User user, String baseURL, int issueAge)
sendReminder
in interface NotificationService
public void setIssueService(IssueService issueService)
public void updateIssueActivityNotification(Issue issue, Boolean notificationSent)
public boolean addIssueNotification(Notification notification)
NotificationService
IssueService
, could not find out the purpose of this method. What will happen with this added Notification
?addIssueNotification
in interface NotificationService
public List<Notification> getIssueNotifications(Issue issue, boolean primaryOnly, boolean activeOnly)
getIssueNotifications
in interface NotificationService
public List<Notification> getIssueNotifications(Issue issue)
NotificationService
getIssueNotifications
in interface NotificationService
issue
- the issue to find notifications forpublic List<Notification> getPrimaryIssueNotifications(Issue issue)
NotificationService
getPrimaryIssueNotifications
in interface NotificationService
issue
- the issue to find notifications forpublic boolean hasIssueNotification(Issue issue, Integer userId)
hasIssueNotification
in interface NotificationService
public boolean hasIssueNotification(Issue issue, String login)
hasIssueNotification
in interface NotificationService
public boolean hasIssueNotification(Issue issue, String login, Notification.Role role)
hasIssueNotification
in interface NotificationService
public boolean hasIssueNotification(Issue issue, Integer userId, Notification.Role role)
hasIssueNotification
in interface NotificationService
public boolean removeIssueNotification(Integer notificationId)
NotificationService
removeIssueNotification
in interface NotificationService
notificationId
- id of the notificationpublic void sendNotification(Issue issue, Notification.Type type, String baseURL, javax.mail.internet.InternetAddress[] receipients, Integer lastModifiedDays)
sendNotification
in interface NotificationService
public EmailService getEmailService()
public ProjectService getProjectService()
public void setProjectService(ProjectService projectService)
projectService
- the projectService to setpublic void setNotificationDao(NotificationDAO notificationDao)
notificationDao
- the notificationDao to setpublic IssueActivityDAO getIssueActivityDao()
public void setIssueActivityDao(IssueActivityDAO issueActivityDao)
issueActivityDao
- the issueActivityDao to setpublic IssueDAO getIssueDao()
public void setIssueDao(IssueDAO issueDao)
issueDao
- the issueDao to setpublic String getIssueServiceName()
public void setIssueServiceName(String issueServiceName)
Copyright © 2002–2019 itracker. All rights reserved.