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,
String nodePath,
List<String> users,
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 nodePath, List<String> users, String message, boolean attachment) throws PathNotFoundException, AccessDeniedException, PrincipalAdapterException, RepositoryException, DatabaseException, IOException
NotificationModule
notify
in interface NotificationModule
nodePath
- The complete path to the node.users
- Array of users 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
Copyright © 2015. All Rights Reserved.