Notification samples
Basics
Section titled “Basics”On most methods, you’ll see a parameter named “nodeId”. The value of this parameter can be a valid document, folder, mail, or record UUID or path.
Methods
Section titled “Methods”notify
Section titled “notify”Description:
| Method | Return values | Description |
|---|---|---|
| notify(String nodeId, List |
void | Send a mail notification. |
Example:
package com.openkm;
import java.util.ArrayList;import java.util.List;
import com.openkm.sdk4j.OKMWebservices;import com.openkm.sdk4j.OKMWebservicesFactory;
public class Test {
public static void main(String[] args) { String host = "http://localhost:8080/OpenKM"; String user = "okmAdmin"; String password = "admin"; OKMWebservices ws = OKMWebservicesFactory.newInstance(host, user, password);
try { String nodeId = "b153c4b7-3d1c-4589-bd42-0ed0f34fd338";
List<String> users = new ArrayList<>(); users.add("test"); users.add("gnujavasergio");
List<String> mails = new ArrayList<>(); mails.add("test@openkm.com"); mails.add("test@gmail.com");
String message = "Body of the message"; ws.notify(nodeId, users, mails, message, false); } catch (Exception e) { e.printStackTrace(); } }}