OKMNotification

From OpenKM Documentation
Jump to: navigation, search

Contents


Methods related to notifications.

void subscribe(String token, String nodePath)

Add user subscription to a node.

Parameters

  • token - The session authorization token.
  • nodePath - The complete path to the node.

Returns

  • None

Throws

  • 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.

void unsubscribe(String token, String nodePath)

Remove an user subscription from a node.

Parameters

  • token - The session authorization token.
  • nodePath - The complete path to the node.

Returns

  • None

Throws

  • 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.

String[] getSubscriptors(String token, String nodePath)

Get user subscriptions from am item (document or folder).

Parameters

  • token - The session authorization token.
  • nodePath - The complete path to the node.

Returns

  • An array of subscribed users.

Throws

  • 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.

void notify(String token, String nodePath, StringArray users, String message)

Send a notification message to an user list.

Parameters

  • token - The session authorization token.
  • nodePath - The complete path to the node.
  • users - Array of users to notify.
  • message - An String with the notification message.

Returns

  • None

Throws

  • 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.