public class DbNotificationModule extends Object implements NotificationModule
| Constructor and Description |
|---|
DbNotificationModule() |
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getSubscriptors(String token,
String nodePath)
Get user subscriptions from am item (document or folder).
|
void |
notify(String token,
List<String> nodesIds,
List<String> users,
List<String> mails,
String message,
boolean attachment) |
void |
notify(String token,
String nodeId,
List<String> users,
List<String> mails,
String message,
boolean attachment)
Send a notification message to an user list.
|
void |
subscribe(String token,
String nodePath)
Add user subscription to a node.
|
void |
unsubscribe(String token,
String nodePath)
Remove an user subscription from a node.
|
public void subscribe(String token, String nodePath) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
NotificationModulesubscribe in interface NotificationModulenodePath - The complete path to the node.PathNotFoundException - If the node defined by nodePath do not exists.AccessDeniedException - If the token authorization information is not valid.RepositoryException - If there is any error accessing to the repository.DatabaseExceptionpublic void unsubscribe(String token, String nodePath) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
NotificationModuleunsubscribe in interface NotificationModulenodePath - The complete path to the node.PathNotFoundException - If the node defined by nodePath do not exists.AccessDeniedException - If the token authorization information is not valid.RepositoryException - If there is any error accessing to the repository.DatabaseExceptionpublic Set<String> getSubscriptors(String token, String nodePath) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
NotificationModulegetSubscriptors in interface NotificationModulenodePath - The complete path to the node.PathNotFoundException - If the node defined by nodePath do not exists.AccessDeniedException - If the token authorization information is not valid.RepositoryException - If there is any error accessing to the repository.DatabaseExceptionpublic void notify(String token, String nodeId, List<String> users, List<String> mails, String message, boolean attachment) throws PathNotFoundException, AccessDeniedException, PrincipalAdapterException, RepositoryException, DatabaseException, IOException
NotificationModulenotify in interface NotificationModulenodeId - The complete path to the node or its UUID.users - Array of users to notify.mails - Array of external mails to notify.message - An String with the notification message.PathNotFoundException - If the node defined by nodePath do not exists.AccessDeniedException - If the token authorization information is not valid.RepositoryException - If there is any error accessing to the repository.PrincipalAdapterExceptionDatabaseExceptionIOExceptionpublic void notify(String token, List<String> nodesIds, List<String> users, List<String> mails, String message, boolean attachment) throws PathNotFoundException, AccessDeniedException, PrincipalAdapterException, RepositoryException, DatabaseException, IOException
Copyright © 2016. All rights reserved.