OKMDashboard
Basics
In all methods you'll see a parameter named "token". Because Cron tasks are executed in the background without authentication, the methods used in this scenario might use the token parameter. From the default application execution context you must use the value "null", which indicates to the application that it must use the "user session".
In special cases you might be "promoted to Administrator" using the "administrator token".
String systemToken = DbSessionManager.getInstance().getSystemToken();
Methods
getUserCheckedOutDocuments
Description:
Method | Return values | Description |
---|---|---|
getUserCheckedOutDocuments(String token, long offset, long limit) |
DashboardDocumentResultSet |
Get the list of documents checked out by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
import com.openkm.ws.rest.util.DashboardDocumentResultSet;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardDocumentResultSet resultSet = okmDashboard.getUserCheckedOutDocuments(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardDocumentResult dashboardDocumentResult : resultSet.getResults()) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLastModifiedDocuments
Description:
Method | Return values | Description |
---|---|---|
getUserLastModifiedDocuments(String token, long offset, long limit) |
DashboardDocumentResultSet |
Get the list of documents most recently modified by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
import com.openkm.ws.rest.util.DashboardDocumentResultSet;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardDocumentResultSet resultSet = okmDashboard.getUserLastModifiedDocuments(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardDocumentResult dashboardDocumentResult : resultSet.getResults()) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLockedDocuments
Description:
Method | Return values | Description |
---|---|---|
getUserLockedDocuments(String token, long offset, long limit) |
DashboardDocumentResultSet |
Get the list of documents locked by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
import com.openkm.ws.rest.util.DashboardDocumentResultSet;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardDocumentResultSet resultSet = okmDashboard.getUserLockedDocuments(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardDocumentResult dashboardDocumentResult : resultSet.getResults()) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLockedRecords
Description:
Method | Return values | Description |
---|---|---|
getUserLockedRecords(String token, long offset, long limit) |
DashboardRecordResultSet |
Get the list of records locked by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardRecordResult;
import com.openkm.bean.DashboardRecordResultSet;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardRecordResultSet resultSet = okmDashboard.getUserLockedRecords(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardRecordResult dashboardRecordResult : resultSet.getResults()) {
System.out.println(dashboardRecordResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLockedFolders
Description:
Method | Return values | Description |
---|---|---|
getUserLockedFolders(int offset, int limit) |
DashboardResultSet |
Returns a list of the folders locked by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.sdk4j.bean.DashboardResult;
import com.openkm.sdk4j.bean.DashboardResultSet;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardResultSet resultSet = okmDashboard.getUserLockedFolders(0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardResult dashboardResult : resultSet.getResults()) {
System.out.println(dashboardResult.getNode());
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLockedMails
Description:
Method | Return values | Description |
---|---|---|
getUserLockedMails(int offset, int limit) |
DashboardResultSet |
Returns a list of the mails locked by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.sdk4j.bean.DashboardResult;
import com.openkm.sdk4j.bean.DashboardResultSet;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardResultSet resultSet = okmDashboard.getUserLockedMails(0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardResult dashboardResult : resultSet.getResults()) {
System.out.println(dashboardResult.getNode());
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserSubscribedDocuments
Description:
Method | Return values | Description |
---|---|---|
getUserSubscribedDocuments(String token, long offset, long limit) |
DashboardDocumentResultSet |
Get the list of documents subscribed to by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
import com.openkm.ws.rest.util.DashboardDocumentResultSet;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardDocumentResultSet resultSet = okmDashboard.getUserSubscribedDocuments(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardDocumentResult dashboardDocumentResult : resultSet.getResults()) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserSubscribedFolders
Description:
Method | Return values | Description |
---|---|---|
getUserSubscribedFolders(String token, long offset, long limit) |
DashboardFolderResultSet |
Get the list of folders subscribed to by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardFolderResult;
import com.openkm.bean.DashboardFolderResultSet;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardFolderResultSet resultSet = okmDashboard.getUserSubscribedFolders(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardFolderResult dashboardFolderResult : resultSet.getResults()) {
System.out.println(dashboardFolderResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserSubscribedRecords
Description:
Method | Return values | Description |
---|---|---|
getUserSubscribedRecords(String token, long offset, long limit) |
DashboardRecordResultSet |
Get the list of records subscribed to by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardRecordResult;
import com.openkm.bean.DashboardRecordResultSet;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardRecordResultSet resultSet = okmDashboard.getUserSubscribedRecords(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardRecordResult dashboardRecordResult : resultSet.getResults()) {
System.out.println(dashboardRecordResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLastCreatedDocuments
Description:
Method | Return values | Description |
---|---|---|
getUserLastCreatedDocuments(String token, long offset, long limit) |
DashboardDocumentResultSet |
Get the list of documents most recently created by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
import com.openkm.ws.rest.util.DashboardDocumentResultSet;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardDocumentResultSet resultSet = okmDashboard.getUserLastCreatedDocuments(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardDocumentResult dashboardDocumentResult : resultSet.getResults()) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLastCreatedDocumentsNotes
Description:
Method | Return values | Description |
---|---|---|
getUserLastCreatedDocumentsNotes(String token, long offset, long limit) |
DashboardDocumentResultSet |
Get the list of documents/notes most recently created by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
import com.openkm.ws.rest.util.DashboardDocumentResultSet;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardDocumentResultSet resultSet = okmDashboard.getUserLastCreatedDocumentsNotes(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardDocumentResult dashboardDocumentResult : resultSet.getResults()) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLastCreatedFolders
Description:
Method | Return values | Description |
---|---|---|
getUserLastCreatedFolders(String token, long offset, long limit) |
DashboardFolderResultSet |
Get the list of folders most recently created by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardFolderResult;
import com.openkm.bean.DashboardFolderResultSet;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardFolderResultSet resultSet = okmDashboard.getUserLastCreatedFolders(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardFolderResult dashboardFolderResult : resultSet.getResults()) {
System.out.println(dashboardFolderResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLastCreatedFoldersNotes
Description:
Method | Return values | Description |
---|---|---|
getUserLastCreatedFoldersNotes(String token, long offset, long limit) |
DashboardFolderResultSet |
Get the list of folders/notes most recently created by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardFolderResult;
import com.openkm.bean.DashboardFolderResultSet;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardFolderResultSet resultSet = okmDashboard.getUserLastCreatedFoldersNotes(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardFolderResult dashboardFolderResult : resultSet.getResults()) {
System.out.println(dashboardFolderResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLastCreatedRecords
Description:
Method | Return values | Description |
---|---|---|
getUserLastCreatedRecords(String token, long offset, long limit) |
List<DashboardRecordResult> |
Get the list of records most recently created by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardRecordResult;
import com.openkm.bean.DashboardRecordResultSet;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardRecordResultSet resultSet = okmDashboard.getUserLastCreatedRecords(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardRecordResult dashboardRecordResult : resultSet.getResults()) {
System.out.println(dashboardRecordResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLastCreatedRecordsNotes
Description:
Method | Return values | Description |
---|---|---|
getUserLastCreatedRecordsNotes(String token, long offset, long limit) |
List<DashboardRecordResult> |
Get the list of records/notes most recently created by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardRecordResult;
import com.openkm.bean.DashboardRecordResultSet;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardRecordResultSet resultSet = okmDashboard.getUserLastCreatedRecordsNotes(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardRecordResult dashboardRecordResult : resultSet.getResults()) {
System.out.println(dashboardRecordResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLastDownloadedDocuments
Description:
Method | Return values | Description |
---|---|---|
getUserLastDownloadedDocuments(String token, long offset, long limit) |
DashboardDocumentResultSet |
Get the list of documents most recently downloaded by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
import com.openkm.ws.rest.util.DashboardDocumentResultSet;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardDocumentResultSet resultSet = okmDashboard.getUserLastDownloadedDocuments(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardDocumentResult dashboardDocumentResult : resultSet.getResults()) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLastImportedMails
Description:
Method | Return values | Description |
---|---|---|
getUserLastImportedMails(String token, long offset, long limit) |
DashboardMailResultSet |
Get the list of mails most recently imported by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardMailResult;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
for (DashboardMailResult dashboardMailResult : okmDashboard.getUserLastImportedMails(null, "okmAdmin")) {
System.out.println(dashboardMailResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLastCreatedMailsNotes
Description:
Method | Return values | Description |
---|---|---|
getUserLastCreatedMailsNotes(String token, long offset, long limit) |
DashboardMailResultSet |
Get the list of mails/notes most recently imported by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardMailResult;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
for (DashboardMailResult dashboardMailResult : okmDashboard.getUserLastCreatedMailsNotes(null, "okmAdmin")) {
System.out.println(dashboardMailResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserLastImportedMailAttachments
Description:
Method | Return values | Description |
---|---|---|
getUserLastImportedMailAttachments(String token, long offset, long limit) |
DashboardDocumentResultSet |
Get the list of mail attachments most recently imported by the user. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
import com.openkm.ws.rest.util.DashboardDocumentResultSet;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
DashboardDocumentResultSet resultSet = okmDashboard.getUserLastImportedMailAttachments(null, 0, 5);
System.out.println("Total: " + resultSet.getTotal());
for (DashboardDocumentResult dashboardDocumentResult : resultSet.getResults()) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserDocumentsSize
Description:
Method | Return values | Description |
---|---|---|
getUserDocumentsSize(String token) |
long |
Returns the total size in bytes of the user's documents. |
When a user uploads or modifies a document, the entire size of the content ? including historical versions in case of updates ? is assigned to the user. |
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.util.ContextWrapper;
import com.openkm.util.FormatUtil;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
long sizeInBytes = okmDashboard.getUserDocumentsSize(null);
System.out.println(FormatUtil.formatSize(sizeInBytes));
} catch (Exception e) {
e.printStackTrace();
}
}
}
getUserSearches
Description:
Method | Return values | Description |
---|---|---|
getUserSearches(String token) |
List<QueryParams> |
Get the list of all "user news" saved by the user. |
The user-saved searches are executed periodically to get news based on queries from the repository. More information at Working with the dashboard and Working with search views. |
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.db.bean.QueryParams;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
for (QueryParams qp : okmDashboard.getUserSearches(null)) {
System.out.println(qp);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
find
Description:
Method | Return values | Description |
---|---|---|
find(String token, int qpId) |
List<DashboardNodeResult> |
Execute a "user news". |
The param qpId is the unique identifier of the "user news" search. |
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardNodeResult;
import com.openkm.bean.Document;
import com.openkm.bean.Folder;
import com.openkm.bean.Mail;
import com.openkm.bean.Record;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
int qpId = 12;
for (DashboardNodeResult dashboardNodeResult : okmDashboard.find(null, qpId)) {
if (dashboardNodeResult.getNode() instanceof Document) {
Document doc = (Document) dashboardNodeResult.getNode();
System.out.println(doc);
} else if (dashboardNodeResult.getNode() instanceof Folder) {
Folder fld = (Folder) dashboardNodeResult.getNode();
System.out.println(fld);
} else if (dashboardNodeResult.getNode() instanceof Record) {
Record rec = (Record) dashboardNodeResult.getNode();
System.out.println(rec);
} else if (dashboardNodeResult.getNode() instanceof Mail) {
Mail mail = (Mail) dashboardNodeResult.getNode();
System.out.println(mail);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getLastWeekTopDownloadedDocuments
Description:
Method | Return values | Description |
---|---|---|
getLastWeekTopDownloadedDocuments(String token, long offset, long limit) |
List<DashboardDocumentResult> |
Get the list of the top downloaded documents during the last week by all the users. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example, if your query has 1000 results but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20; you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
for (DashboardDocumentResult dashboardDocumentResult : okmDashboard.getLastWeekTopDownloadedDocuments(null, 0, 5)) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getLastMonthTopDownloadedDocuments
Description:
Method | Return values | Description |
---|---|---|
getLastMonthTopDownloadedDocuments(String token, long offset, long limit) |
List<DashboardDocumentResult> |
Get the list of the top downloaded documents during the last month by all the users. |
The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
for (DashboardDocumentResult dashboardDocumentResult : okmDashboard.getLastMonthTopDownloadedDocuments(null, 0, 5)) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getLastWeekTopModifiedDocuments
Description:
Method | Return values | Description |
---|---|---|
getLastWeekTopModifiedDocuments(String token, long offset, long limit) |
List<DashboardDocumentResult> |
Get the list of the top modified documents during the last week by all the users. |
The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.
For example if your query has 1000 results, but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11-20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
for (DashboardDocumentResult dashboardDocumentResult : okmDashboard.getLastWeekTopModifiedDocuments(null, 0, 5)) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getLastMonthTopModifiedDocuments
Description:
Method | Return values | Description |
---|---|---|
getLastMonthTopModifiedDocuments(String token, long offset, long limit) |
List<DashboardDocumentResult> |
Gets the list of the top modified documents from the last month by all users. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example, if your query has 1000 results but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11 to 20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
for (DashboardDocumentResult dashboardDocumentResult : okmDashboard.getLastMonthTopModifiedDocuments(null, 0, 5)) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getLastModifiedDocuments
Description:
Method | Return values | Description |
---|---|---|
getLastModifiedDocuments(String token, long offset, long limit) |
List<DashboardDocumentResult> |
Gets the list of the most recently modified documents by all users. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example, if your query has 1000 results but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11 to 20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
for (DashboardDocumentResult dashboardDocumentResult : okmDashboard.getLastModifiedDocuments(null, 0, 5)) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getLastCreatedDocuments
Description:
Method | Return values | Description |
---|---|---|
getLastCreatedDocuments(String token, long offset, long limit) |
List<DashboardDocumentResult> |
Gets the list of the most recently created documents by all users. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example, if your query has 1000 results but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11 to 20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
for (DashboardDocumentResult dashboardDocumentResult : okmDashboard.getLastCreatedDocuments(null, 0, 5)) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getLastCheckedOutDocuments
Description:
Method | Return values | Description |
---|---|---|
getLastCheckedOutDocuments(String token, long offset, long limit) |
List<DashboardDocumentResult> |
Gets the list of the most recently checked-out documents by all users. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example, if your query has 1000 results but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11 to 20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardDocumentResult;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
for (DashboardDocumentResult dashboardDocumentResult : okmDashboard.getLastCheckedOutDocuments(null, 0, 5)) {
System.out.println(dashboardDocumentResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getLastCreatedFolders
Description:
Method | Return values | Description |
---|---|---|
getLastCreatedFolders(String token, long offset, long limit) |
List<DashboardFolderResult> |
Gets the list of the most recently created folders by all users. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example, if your query has 1000 results but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11 to 20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardFolderResult;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
for (DashboardFolderResult dashboardFolderResult : okmDashboard.getLastCreatedFolders(null, 0, 5)) {
System.out.println(dashboardFolderResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
getLastCreatedRecords
Description:
Method | Return values | Description |
---|---|---|
getLastCreatedRecords(String token, long offset, long limit) |
List<DashboardRecordResult> |
Gets the list of the most recently created records by all users. |
The parameters "limit" and "offset" allow you to retrieve just a portion of the results of a query.
For example, if your query has 1000 results but you only want to return the first 10, you should use these values:
Now suppose you want to show the results from 11 to 20, you should use these values:
|
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardRecordResult;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
for (DashboardRecordResult dashboardRecordResult : okmDashboard.getLastCreatedRecords(null, 0, 5)) {
System.out.println(dashboardRecordResult);
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
visitNode
Description:
Method | Return values | Description |
---|---|---|
visitNode(String token, String source, String node, Calendar date) |
void |
Marks a node as visited. |
From the UI, the nodes are shown in bold until they are visited by the user. This method marks the node as visited by the user in the database. |
||
Available sources:
|
Example:
package com.openkm;
import java.util.Calendar;
import com.openkm.api.OKMDashboard;
import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) {
try {
OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
Calendar cal = Calendar.getInstance();
okmDashboard.visitNode(null, "LastWeekTopDownloadedDocuments", "/okm:root/document.pdf", cal);
} catch (Exception e) {
e.printStackTrace();
}
}
}