Class NotificationService
java.lang.Object
fr.paris.lutece.plugins.crm.service.notification.NotificationService
NotificationService
-
Method Summary
Modifier and TypeMethodDescriptionintcreate(Notification notification) Create a notificationfindAll()Find all notificationsfindByFilter(NotificationFilter nFilter) Find notifications by a filterfindByPrimaryKey(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 NotificationServiceGet the instance ofNotificationServicevoidremove(int nIdNotification) Remove the notificationvoidremoveByIdDemand(int nIdDemand) Remove the notifications from a given ID demandvoidupdate(Notification notification) Update the notification
-
Method Details
-
getService
Get the instance ofNotificationService- Returns:
- the instance of
NotificationService
-
findByPrimaryKey
Find the notification by its primary key- Parameters:
nIdNotification- the id notification- Returns:
- a
Notification
-
create
Create a notification- Parameters:
notification- the notification- Returns:
- the newly created notification id
-
update
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
Find all notifications- Returns:
- a list of
Notification
-
findByFilter
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
-