Class NotificationService
- java.lang.Object
-
- fr.paris.lutece.plugins.crm.service.notification.NotificationService
-
public class NotificationService extends Object
NotificationService
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intcreate(Notification notification)Create a notificationList<Notification>findAll()Find all notificationsList<Notification>findByFilter(NotificationFilter nFilter)Find notifications by a filterNotificationfindByPrimaryKey(int nIdNotification)Find the notification by its primary keyintgetNumberNotifications(int nIdDemand)Get the number of notifications of a demandintgetNumberUnreadNotifications(int nIdDemand)Get the number of unread notifications of a demandstatic NotificationServicegetService()Get the instance ofNotificationServicevoidremove(int nIdNotification)Remove the notificationvoidremoveByIdDemand(int nIdDemand)Remove the notifications from a given ID demandvoidupdate(Notification notification)Update the notification
-
-
-
Method Detail
-
getService
public static NotificationService getService()
Get the instance ofNotificationService- Returns:
- the instance of
NotificationService
-
findByPrimaryKey
public Notification findByPrimaryKey(int nIdNotification)
Find the notification by its primary key- Parameters:
nIdNotification- the id notification- Returns:
- a
Notification
-
create
public int create(Notification notification)
Create a notification- Parameters:
notification- the notification- Returns:
- the newly created notification id
-
update
public void update(Notification notification)
Update the notification- Parameters:
notification- the notification
-
remove
public void remove(int nIdNotification)
Remove the notification- Parameters:
nIdNotification- the id notification
-
removeByIdDemand
public void removeByIdDemand(int nIdDemand)
Remove the notifications from a given ID demand- Parameters:
nIdDemand- the id demand
-
findAll
public List<Notification> findAll()
Find all notifications- Returns:
- a list of
Notification
-
findByFilter
public List<Notification> findByFilter(NotificationFilter nFilter)
Find notifications by a filter- Parameters:
nFilter- the filter- Returns:
- a list of
Notification
-
getNumberUnreadNotifications
public int getNumberUnreadNotifications(int nIdDemand)
Get the number of unread notifications of a demand- Parameters:
nIdDemand- the id demand- Returns:
- the number of unread notifications
-
getNumberNotifications
public int getNumberNotifications(int nIdDemand)
Get the number of notifications of a demand- Parameters:
nIdDemand- the id demand- Returns:
- the number of notifications
-
-