Package com.simplicite.util.tools
Class NotificationTool
- java.lang.Object
-
- com.simplicite.util.tools.NotificationTool
-
public class NotificationTool extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description NotificationTool()
Default contructor (using system admin grant)NotificationTool(Grant g, Notification n)
ConstructorNotificationTool(Notification n)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.String>
getNotificationIdsForGroup(java.lang.String groupName)
Retrieves a list of notification IDs associated with a specified group.void
push(ObjectDB o)
Push notification to all configured channels and recipientsvoid
pushInternalNotification(ObjectDB o)
Push notification on internal canalvoid
pushMailNotification(ObjectDB o)
Push mail notificationvoid
sendFirebaseNotification(ObjectDB o)
Send notification via firebase channelvoid
subscribeUser(java.lang.String userId, java.lang.String configId)
Subscribe user to a notification (Recipient channel)
-
-
-
Constructor Detail
-
NotificationTool
public NotificationTool()
Default contructor (using system admin grant)
-
NotificationTool
public NotificationTool(Grant g, Notification n)
Constructor- Parameters:
g
- Grant (null means using system admin grant)
-
NotificationTool
public NotificationTool(Notification n)
Constructor- Parameters:
n
-
-
-
Method Detail
-
push
public void push(ObjectDB o)
Push notification to all configured channels and recipients- Parameters:
o
- Object triggering notification
-
pushInternalNotification
public void pushInternalNotification(ObjectDB o)
Push notification on internal canal- Parameters:
o
- object triggering event
-
pushMailNotification
public void pushMailNotification(ObjectDB o)
Push mail notification- Parameters:
o
- object triggering event
-
sendFirebaseNotification
public void sendFirebaseNotification(ObjectDB o)
Send notification via firebase channel- Parameters:
o
- ObjectDB carrying notification
-
subscribeUser
public void subscribeUser(java.lang.String userId, java.lang.String configId)
Subscribe user to a notification (Recipient channel)- Parameters:
userId
-configId
- id of N-N object NotiGroupChannels (link between Recipient and channel)
-
getNotificationIdsForGroup
public static java.util.List<java.lang.String> getNotificationIdsForGroup(java.lang.String groupName)
Retrieves a list of notification IDs associated with a specified group.- Parameters:
groupName
- The name of the group for which notification IDs are requested.- Returns:
- A List containing the notification IDs for the specified group.
-
-