Ir al contenido
Otras versiones

Cargando…

OKMNote

Esta página aún no está disponible en tu idioma.

On most methods you’ll see parameter named “nodeId”. The value of this parameter can be a valid document, folder, mail or record UUID or path.

Also on all methods you’ll see parameter named “token”. When accessing application across SOAP the login process returns a token, what is used to identify the user on all the exposed methods. From default application execution context you must use “null” value what indicates to the application must use the “user session”.

Description:

Method Return values Description
add(String token, String nodeId, String text) Note Adds a note to a node and returns an object Note.

Example:

package com.openkm;
import com.openkm.api.OKMNote;
import com.openkm.bean.Note;
public class Test {
public static void main(String[] args) {
try {
Note note = OKMNote.getInstance().add(null, "/okm:root/logo.png", "the note text");
System.out.println(note);
} catch (Exception e) {
e.printStackTrace();
}
}
}

Description:

Method Return values Description
get(String token, String noteId) Note Retrieves the note.

Example:

package com.openkm;
import com.openkm.api.OKMNote;
import com.openkm.bean.Note;
public class Test {
public static void main(String[] args) {
try {
for (Note note : OKMNote.getInstance().list(null, "/okm:root/logo.png")) {
Note data = OKMNote.getInstance().get(null, note.getPath());
System.out.println(data);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}

Description:

Method Return values Description
delete(String token, String noteId) void Delete a note.

Example:

package com.openkm;
import com.openkm.api.OKMNote;
import com.openkm.bean.Note;
public class Test {
public static void main(String[] args) {
try {
for (Note note : OKMNote.getInstance().list(null, "/okm:root/logo.png")) {
OKMNote.getInstance().delete(null, note.getPath());
}
} catch (Exception e) {
e.printStackTrace();
}
}
}

Description:

Method Return values Description
set(String token, String noteId, String text) void Changes the note text.

Example:

package com.openkm;
import com.openkm.api.OKMNote;
import com.openkm.bean.Note;
public class Test {
public static void main(String[] args) {
try {
for (Note note : OKMNote.getInstance().list(null, "/okm:root/logo.png")) {
OKMNote.getInstance().set(null, note.getPath());
}
} catch (Exception e) {
e.printStackTrace();
}
}
}

Description:

Method Return values Description
list(String token, String nodeId) List Retrieves a list of all the notes of a node.

Example:

package com.openkm;
import com.openkm.api.OKMNote;
import com.openkm.bean.Note;
public class Test {
public static void main(String[] args) {
try {
for (Note note : OKMNote.getInstance().list(null, "/okm:root/logo.png")) {
OKMNote.getInstance().set(null, note.getPath());
}
} catch (Exception e) {
e.printStackTrace();
}
}
}