OKMUserConfig
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".
On special cases you might be "promoted as Administrator" using the "administrator token".
String systemToken = DbSessionManager.getInstance().getSystemToken();
Methods
setHome
Description:
Method | Return values | Description |
---|---|---|
setHome(String token, String path) |
void |
Sets the user home. |
By default user home value is "/okm:root".
|
Example:
package com.openkm;
import com.openkm.api.OKMUserConfig;
public class Test {
public static void main(String[] args) {
try {
OKMUserConfig.getInstance().setHome(null,"/okm:root/test");
} catch (Exception e) {
e.printStackTrace();
}
}
}
getConfig
Description:
Method | Return values | Description |
---|---|---|
getConfig(String token) |
UserConfig |
Return the user configuration. |
Returned values are:
|
Example:
package com.openkm;
import com.openkm.api.OKMUserConfig;
import com.openkm.dao.bean.UserConfig;
public class Test {
public static void main(String[] args) {
try {
UserConfig uc = OKMUserConfig.getInstance().getConfig(null);
System.out.println(uc);
} catch (Exception e) {
e.printStackTrace();
}
}
}