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:

MethodReturn valuesDescription

getUserCheckedOutDocuments(String token, long offset, long limit)

DashboardDocumentResultSet

Get the list of documents checkout by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardDocumentResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserLastModifiedDocuments(String token, long offset, long limit)

DashboardDocumentResultSet

Get the list of the last documents modified by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardDocumentResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserLockedDocuments(String token, long offset, long limit)

DashboardDocumentResultSet

Get the list of the locked documents by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardDocumentResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserLockedRecords(String token, long offset, long limit)

DashboardRecordResultSet

Get the list of the locked records by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardRecordResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

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.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10 

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:

MethodReturn valuesDescription

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.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserSubscribedDocuments(String token, long offset, long limit)

DashboardDocumentResultSet

Get the list of the subscribed documents by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardDocumentResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserSubscribedFolders(String token, long offset, long limit)

DashboardFolderResultSet

Get the list of the subscribed folders by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardFolderResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserSubscribedRecords(String token, long offset, long limit)

DashboardRecordResultSet

Get the list of the subscribed records by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardRecordResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserLastCreatedDocuments(String token, long offset, long limit)

DashboardDocumentResultSet

Get the list of the last created documents by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardDocumentResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserLastCreatedDocumentsNotes(String token, long offset, long limit)

DashboardDocumentResultSet

Get the list of the last created documents/notes by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardDocumentResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserLastCreatedFolders(String token, long offset, long limit)

DashboardFolderResultSet

Get the list of the last created folders by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardFolderResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserLastCreatedFoldersNotes(String token, long offset, long limit)

DashboardFolderResultSet

Get the list of the last created folders/notes by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardFolderResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserLastCreatedRecords(String token, long offset, long limit)

List<DashboardRecordResult>

Get the list of the last created records by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardRecordResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserLastCreatedRecordsNotes(String token, long offset, long limit)

List<DashboardRecordResult>

Get the list of the last created records/notes by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardRecordResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserLastDownloadedDocuments(String token, long offset, long limit)

DashboardDocumentResultSet

Get the list of the last download documents by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardDocumentResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserLastImportedMails(String token, long offset, long limit)

DashboardMailResultSet

Get the list of the last imported mails by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardMailResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserLastCreatedMailsNotes(String token, long offset, long limit)

DashboardMailResultSet

Get the list of the last imported mails/notes by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardMailResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getUserLastImportedMailAttachments(String token, long offset, long limit)

DashboardDocumentResultSet

Get the list of the last imported mail attachments by the user.

  • Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.
  • In versions of OpenKM older than 7.1.26 the method return a List of DashboardMailResult elements.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

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:

MethodReturn valuesDescription

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:

MethodReturn valuesDescription

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:

MethodReturn valuesDescription

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.

Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

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.

Since OpenKM 7.1.23 version pagination was added with offset and limit parameter

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

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.

Since OpenKM 7.1.23 version pagination was added with offset and limit parameter

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

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.

Since OpenKM 7.1.23 version pagination was added with offset and limit parameter

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getLastModifiedDocuments(String token, long offset, long limit)

List<DashboardDocumentResult>

Get the list of the last modified documents by all the users.

Since OpenKM 7.1.23 version pagination was added with offset and limit parameter

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getLastCreatedDocuments(String token, long offset, long limit)

List<DashboardDocumentResult>

Get the list of the last created documents by all the users.

Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getLastCheckedOutDocuments(String token, long offset, long limit)

List<DashboardDocumentResult>

Get the list of the last documents on edition by all the users.

Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getLastCreatedFolders(String token, long offset, long limit)

List<DashboardFolderResult>

Get the list of the last created folders by all the users.

Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

getLastCreatedRecords(String token, long offset, long limit)

List<DashboardRecordResult>

Get the list of the last created records by all the users.

Since OpenKM 7.1.23 version pagination was added with offset and limit parameters.

The parameter "limit" and "offset" allows you to retrieve just a portion of the results of a query.

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" says to skip that many results before the beginning to return results.

For example if your query has 1000 results, but you only want to return the first 10, you should use these values:

  • limit=10
  • offset=0

Now suppose you want to show the results from 11-20, you should use these values:

  • limit=10
  • offset=10

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:

MethodReturn valuesDescription

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:

  • LastWeekTopDownloadedDocuments
  • LastMonthTopDownloadedDocuments
  • LastWeekTopModifiedDocuments
  • LastMonthTopModifiedDocuments
  • LastModifiedDocuments
  • LastCreatedDocuments
  • LastCreatedFolders
  • LastCreatedRecords
  • LastCheckoutDocuments
  • UserLockedDocuments
  • UserLockedRecord
  • UserCheckedOutDocuments
  • UserLastModifiedDocuments
  • UserLastDownloadedDocuments
  • UserSubscribedDocuments
  • UserSubscribedFolders
  • UserSubscribedRecords
  • UserLastCreatedDocuments
  • UserLastCreatedFolders
  • UserLastCreatedRecords
  • UserLastImportedMails
  • UserLastImportedMailAttachments
  • In case "user new", the source name is the name of the query.

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();
		}
	}
}