OKMDashboard
Basics
On all methods you'll see parameter named "token". Because the Cron Task are executed in background without authentication, the methods used in this scenario might use the token parameter. 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
getUserCheckedOutDocuments
Description:
Method | Return values | Description |
---|---|---|
getUserCheckedOutDocuments(String token, long offset, long limit) |
DashboardDocumentResultSet |
Get the list of documents checkout by the user. |
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;
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 the last documents modified by the user. |
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;
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 the locked documents by the user. |
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;
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 the locked records by the user. |
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.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();
}
}
}
getUserLockekFolders
Description:
Method | Return values | Description |
---|---|---|
getUserLockedFolders(int offset, int limit) |
DashboardResultSet |
Returns a list of the folders locked by the user. |
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.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 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.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 the subscribed documents by the user. |
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;
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 the subscribed folders by the user. |
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.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 the subscribed records by the user. |
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.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 the last created documents by the user. |
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;
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 the last created documents/notes by the user. |
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;
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 the last created folders by the user. |
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.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 the last created folders/notes by the user. |
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.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 the last created records by the user. |
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.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 the last created records/notes by the user. |
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.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 the last download documents by the user. |
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;
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 the last imported mails by the user. |
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.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 the last imported mails/notes by the user. |
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.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 the last imported mail attachments by the user. |
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;
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 |
Return the total size in bytes of the user documents. |
When user upload or modify a document, the entire size of the contents - and history versions in case of update - are assigned to the users.
|
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 for getting 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 "users 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 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.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> |
Get the list of the top modified 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.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> |
Get the list of the last modified documents 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.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> |
Get the list of the last created documents 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.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> |
Get the list of the last documents on edition 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.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> |
Get the list of the last created folders 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.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> |
Get the list of the last created records 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.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 |
Mark a node as a visited. |
From UI, the nodes are shown strong until are visited by the user. This method mark 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();
}
}
}