OKMDashboard
Basics
Section titled “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”.
Methods
Section titled “Methods”getUserCheckedOutDocuments
Section titled “getUserCheckedOutDocuments”Description:
| Method | Return values | Description |
|---|---|---|
| getUserCheckedOutDocuments(String token, int offset, int limit) | DashboardDocumentResultSet | Get the list of documents checked out by the user. |
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
Section titled “getUserLastModifiedDocuments”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLastModifiedDocuments(String token, int offset, int limit) | DashboardDocumentResultSet | Get the list of documents most recently modified by the user. |
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
Section titled “getUserLockedDocuments”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLockedDocuments(String token, int offset, int limit) | DashboardDocumentResultSet | Get the list of documents locked by the user. |
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
Section titled “getUserLockedRecords”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLockedRecords(String token, int offset, int limit) | DashboardRecordResultSet | Get the list of records locked by the user. |
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
Section titled “getUserLockedFolders”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLockedFolders(String token, int offset, int limit) | DashboardFolderResultSet | Returns a list of the folders locked by the user. |
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.getUserLockedFolders(null, 0, 5); System.out.println("Total: " + resultSet.getTotal()); for (DashboardFolderResult dashboardFolderResult : resultSet.getResults()) { System.out.println(dashboardFolderResult); } } catch (Exception e) { e.printStackTrace(); } }}getUserLockedMails
Section titled “getUserLockedMails”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLockedMails(String token, int offset, int limit) | DashboardMailResultSet | Returns a list of the emails locked by the user. |
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;import com.openkm.bean.DashboardMailResult;import com.openkm.bean.DashboardMailResultSet;import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) { try { OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class); DashboardMailResultSet resultSet = okmDashboard.getUserLockedMails(null, 0, 5); System.out.println("Total: " + resultSet.getTotal()); for (DashboardMailResult dashboardMailResult : resultSet.getResults()) { System.out.println(dashboardMailResult); } } catch (Exception e) { e.printStackTrace(); } }}getUserSubscribedDocuments
Section titled “getUserSubscribedDocuments”Description:
| Method | Return values | Description |
|---|---|---|
| getUserSubscribedDocuments(String token, int offset, int limit) | DashboardDocumentResultSet | Get the list of documents subscribed to by the user. |
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
Section titled “getUserSubscribedFolders”Description:
| Method | Return values | Description |
|---|---|---|
| getUserSubscribedFolders(String token, int offset, int limit) | DashboardFolderResultSet | Get the list of folders subscribed to by the user. |
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
Section titled “getUserSubscribedRecords”Description:
| Method | Return values | Description |
|---|---|---|
| getUserSubscribedRecords(String token, int offset, int limit) | DashboardRecordResultSet | Get the list of records subscribed to by the user. |
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
Section titled “getUserLastCreatedDocuments”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLastCreatedDocuments(String token, int offset, int limit) | DashboardDocumentResultSet | Get the list of documents most recently created by the user. |
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
Section titled “getUserLastCreatedDocumentsNotes”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLastCreatedDocumentsNotes(String token, int offset, int limit) | DashboardDocumentResultSet | Get the list of documents/notes most recently created by the user. |
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
Section titled “getUserLastCreatedFolders”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLastCreatedFolders(String token, int offset, int limit) | DashboardFolderResultSet | Get the list of folders most recently created by the user. |
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
Section titled “getUserLastCreatedFoldersNotes”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLastCreatedFoldersNotes(String token, int offset, int limit) | DashboardFolderResultSet | Get the list of folders/notes most recently created by the user. |
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
Section titled “getUserLastCreatedRecords”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLastCreatedRecords(String token, int offset, int limit) | DashboardRecordResultSet | Get the list of records most recently created by the user. |
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
Section titled “getUserLastCreatedRecordsNotes”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLastCreatedRecordsNotes(String token, int offset, int limit) | DashboardRecordResultSet | Get the list of records/notes most recently created by the user. |
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
Section titled “getUserLastDownloadedDocuments”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLastDownloadedDocuments(String token, int offset, int limit) | DashboardDocumentResultSet | Get the list of documents most recently downloaded by the user. |
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
Section titled “getUserLastImportedMails”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLastImportedMails(String token, int offset, int limit) | DashboardMailResultSet | Get the list of emails most recently imported by the user. |
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;import com.openkm.bean.DashboardMailResult;import com.openkm.bean.DashboardMailResultSet;import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) { try { OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class); DashboardMailResultSet resultSet = okmDashboard.getUserLastImportedMails(null, 0, 5); System.out.println("Total: " + resultSet.getTotal()); for (DashboardMailResult dashboardMailResult : resultSet.getResults()) { System.out.println(dashboardMailResult); } } catch (Exception e) { e.printStackTrace(); } }}getUserLastCreatedMailsNotes
Section titled “getUserLastCreatedMailsNotes”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLastCreatedMailsNotes(String token, int offset, int limit) | DashboardMailResultSet | Get the list of emails/notes most recently imported by the user. |
Example:
package com.openkm;
import com.openkm.api.OKMDashboard;import com.openkm.bean.DashboardMailResult;import com.openkm.bean.DashboardMailResultSet;import com.openkm.util.ContextWrapper;
public class Test {
public static void main(String[] args) { try { OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class); DashboardMailResultSet resultSet = okmDashboard.getUserLastCreatedMailsNotes(null, 0, 5); System.out.println("Total: " + resultSet.getTotal()); for (DashboardMailResult dashboardMailResult : resultSet.getResults()) { System.out.println(dashboardMailResult); } } catch (Exception e) { e.printStackTrace(); } }}getUserLastImportedMailAttachments
Section titled “getUserLastImportedMailAttachments”Description:
| Method | Return values | Description |
|---|---|---|
| getUserLastImportedMailAttachments(String token, int offset, int limit) | DashboardDocumentResultSet | Get the list of email attachments most recently imported by the user. |
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
Section titled “getUserDocumentsSize”Description:
| Method | Return values | Description |
|---|---|---|
| getUserDocumentsSize(String token) | long | Returns the total size in bytes of the user’s documents. |
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
Section titled “getUserSearches”Description:
| Method | Return values | Description |
|---|---|---|
| getUserSearches(String token) | List |
Get the list of all “user news” saved by the user. |
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(); } }}Description:
| Method | Return values | Description |
|---|---|---|
| find(String token, int qpId) | List |
Execute a “user news” search. |
- The parameter 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
Section titled “getLastWeekTopDownloadedDocuments”Description:
| Method | Return values | Description |
|---|---|---|
| getLastWeekTopDownloadedDocuments(String token, int offset, int limit) | List |
Get the list of the top downloaded documents during the last week by all the users. |
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
Section titled “getLastMonthTopDownloadedDocuments”Description:
| Method | Return values | Description |
|---|---|---|
| getLastMonthTopDownloadedDocuments(String token, int offset, int limit) | List |
Get the list of the top downloaded documents during the last month by all the users. |
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
Section titled “getLastWeekTopModifiedDocuments”Description:
| Method | Return values | Description |
|---|---|---|
| getLastWeekTopModifiedDocuments(String token, int offset, int limit) | List |
Get the list of the top modified documents during the last week by all the users. |
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
Section titled “getLastMonthTopModifiedDocuments”Description:
| Method | Return values | Description |
|---|---|---|
| getLastMonthTopModifiedDocuments(String token, int offset, int limit) | List |
Gets the list of the top-modified documents from the last month by all users. |
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
Section titled “getLastModifiedDocuments”Description:
| Method | Return values | Description |
|---|---|---|
| getLastModifiedDocuments(String token, int offset, int limit) | List |
Gets the list of the most recently modified documents by all users. |
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
Section titled “getLastCreatedDocuments”Description:
| Method | Return values | Description |
|---|---|---|
| getLastCreatedDocuments(String token, int offset, int limit) | List |
Gets the list of the most recently created documents by all users. |
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
Section titled “getLastCheckedOutDocuments”Description:
| Method | Return values | Description |
|---|---|---|
| getLastCheckedOutDocuments(String token, int offset, int limit) | List |
Gets the list of the most recently checked-out documents by all users. |
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
Section titled “getLastCreatedFolders”Description:
| Method | Return values | Description |
|---|---|---|
| getLastCreatedFolders(String token, int offset, int limit) | List |
Gets the list of the most recently created folders by all users. |
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
Section titled “getLastCreatedRecords”Description:
| Method | Return values | Description |
|---|---|---|
| getLastCreatedRecords(String token, int offset, int limit) | List |
Gets the list of the most recently created records by all users. |
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
Section titled “visitNode”Description:
| Method | Return values | Description |
|---|---|---|
| visitNode(String token, String source, String node, Calendar date) | void | Marks a node as visited. |
- 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(); } }}