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
NotificationModule
subscribe
in interface NotificationModule
nodePath
- 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.DatabaseException
public void unsubscribe(String token, String nodePath) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
NotificationModule
unsubscribe
in interface NotificationModule
nodePath
- 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.DatabaseException
public Set<String> getSubscriptors(String token, String nodePath) throws PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException
NotificationModule
getSubscriptors
in interface NotificationModule
nodePath
- 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.DatabaseException
public void notify(String token, String nodeId, List<String> users, List<String> mails, String message, boolean attachment) throws PathNotFoundException, AccessDeniedException, PrincipalAdapterException, RepositoryException, DatabaseException, IOException
NotificationModule
notify
in interface NotificationModule
nodeId
- 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.PrincipalAdapterException
DatabaseException
IOException
public 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.