OKMDashboard

Basics

On 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. In the default application execution context, you must use "null" value which indicates that the application must use the "user session".

In special cases, you might be "promoted to Administrator" using the "administrator token".

String systemToken = DbSessionManager.getInstance().getSystemToken();

Methods

getUserCheckedOutDocuments

Description:

Method Return values Description

getUserCheckedOutDocuments(String token, long offset, long limit)

DashboardDocumentResultSet

Get the list of documents checked out by the user.

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserLastModifiedDocuments(String token, long offset, long limit)

DashboardDocumentResultSet

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

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserLockedDocuments(String token, long offset, long limit)

DashboardDocumentResultSet

Get the list of the locked documents by the user.

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserLockedRecords(String token, long offset, long limit)

DashboardRecordResultSet

Get the list of the locked records by the user.

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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();
        }
    }
}

getUserLockedFolders

Description:

Method Return values Description

getUserLockedFolders(int offset, int limit)

DashboardResultSet

Returns a list of the folders locked by the user.

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

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserLockedMails(int offset, int limit)

DashboardResultSet

Returns a list of the mails locked by the user.

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

  • The parameter "limit" is used to limit the number of results returned.
  • The parameter "offset" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserSubscribedDocuments(String token, long offset, long limit)

DashboardDocumentResultSet

Get the list of the subscribed documents by the user.

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserSubscribedFolders(String token, long offset, long limit)

DashboardFolderResultSet

Get the list of the subscribed folders by the user.

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserSubscribedRecords(String token, long offset, long limit)

DashboardRecordResultSet

Get the list of the subscribed records by the user.

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserLastCreatedDocuments(String token, long offset, long limit)

DashboardDocumentResultSet

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

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserLastCreatedDocumentsNotes(String token, long offset, long limit)

DashboardDocumentResultSet

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

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserLastCreatedFolders(String token, long offset, long limit)

DashboardFolderResultSet

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

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserLastCreatedFoldersNotes(String token, long offset, long limit)

DashboardFolderResultSet

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

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserLastCreatedRecords(String token, long offset, long limit)

List<DashboardRecordResult>

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

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

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.

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserLastDownloadedDocuments(String token, long offset, long limit)

DashboardDocumentResultSet

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

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserLastImportedMails(String token, long offset, long limit)

DashboardMailResultSet

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

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

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 returns a List of DashboardMailResult elements.

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

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 returns a List of DashboardMailResult elements.

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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:

Method Return values Description

getUserDocumentsSize(String token)

long

Returns the total size in bytes of the user's documents.

When a user uploads or modifies a document, the entire size of the contents - including historical versions in case of updates - is assigned to the user.

Example:

package com.openkm;

import com.openkm.api.OKMDashboard;
import com.openkm.util.ContextWrapper;
import com.openkm.util.FormatUtil;

public class Test {

    public static void main(String[] args) {
        try {
            OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
            long sizeInBytes = okmDashboard.getUserDocumentsSize(null);
            System.out.println(FormatUtil.formatSize(sizeInBytes));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getUserSearches

Description:

Method Return values Description

getUserSearches(String token)

List<QueryParams>

Get the list of all "user news" saved by the user.

The "user saved" searches are executed periodically to get news based on queries from the repository.

More information at Working with the dashboard and Working with search views.

Example:

package com.openkm;

import com.openkm.api.OKMDashboard;
import com.openkm.db.bean.QueryParams;
import com.openkm.util.ContextWrapper;

public class Test {

    public static void main(String[] args) {
        try {
            OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
            for (QueryParams qp : okmDashboard.getUserSearches(null)) {
                System.out.println(qp);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

find

Description:

Method Return values Description

find(String token, int qpId)

List<DashboardNodeResult>

Execute a "user news" search.

The param qpId is the unique identifier of the "user news" search.

Example:

package com.openkm;

import com.openkm.api.OKMDashboard;
import com.openkm.bean.DashboardNodeResult;
import com.openkm.bean.Document;
import com.openkm.bean.Folder;
import com.openkm.bean.Mail;
import com.openkm.bean.Record;
import com.openkm.util.ContextWrapper;

public class Test {

    public static void main(String[] args) {
        try {
            OKMDashboard okmDashboard = ContextWrapper.getContext().getBean(OKMDashboard.class);
            int qpId = 12;
            for (DashboardNodeResult dashboardNodeResult : okmDashboard.find(null, qpId)) {
                if (dashboardNodeResult.getNode() instanceof Document) {
                    Document doc = (Document) dashboardNodeResult.getNode();
                    System.out.println(doc);
                } else if (dashboardNodeResult.getNode() instanceof Folder) {
                    Folder fld = (Folder) dashboardNodeResult.getNode();
                    System.out.println(fld);
                } else if (dashboardNodeResult.getNode() instanceof Record) {
                    Record rec = (Record) dashboardNodeResult.getNode();
                    System.out.println(rec);
                } else if (dashboardNodeResult.getNode() instanceof Mail) {
                    Mail mail = (Mail) dashboardNodeResult.getNode();
                    System.out.println(mail);
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getLastWeekTopDownloadedDocuments

Description:

Method Return values Description

getLastWeekTopDownloadedDocuments(String token, long offset, long limit)

List<DashboardDocumentResult>

Get the list of the top downloaded documents during the last week by all users.

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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 results 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:

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 users.

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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 results 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:

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 users.

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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 results 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:

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 users.

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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 results 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:

Method Return values Description

getLastModifiedDocuments(String token, long offset, long limit)

List<DashboardDocumentResult>

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

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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 results 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:

Method Return values Description

getLastCreatedDocuments(String token, long offset, long limit)

List<DashboardDocumentResult>

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

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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 results 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:

Method Return values Description

getLastCheckedOutDocuments(String token, long offset, long limit)

List<DashboardDocumentResult>

Get the list of the last documents being edited by all users.

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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 results 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:

Method Return values Description

getLastCreatedFolders(String token, long offset, long limit)

List<DashboardFolderResult>

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

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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 results 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:

Method Return values Description

getLastCreatedRecords(String token, long offset, long limit)

List<DashboardRecordResult>

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

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

The parameters "limit" and "offset" allow 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" specifies how many results to skip before the beginning of the returned 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 results 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:

Method Return values Description

visitNode(String token, String source, String node, Calendar date)

void

Mark a node as visited.

In the UI, nodes are shown in bold until they are visited by the user. This method marks the node as visited by the user in the database.

Available sources:

  • LastWeekTopDownloadedDocuments
  • LastMonthTopDownloadedDocuments
  • LastWeekTopModifiedDocuments
  • LastMonthTopModifiedDocuments
  • LastModifiedDocuments
  • LastCreatedDocuments
  • LastCreatedFolders
  • LastCreatedRecords
  • LastCheckoutDocuments
  • UserLockedDocuments
  • UserLockedRecord
  • UserCheckedOutDocuments
  • UserLastModifiedDocuments
  • UserLastDownloadedDocuments
  • UserSubscribedDocuments
  • UserSubscribedFolders
  • UserSubscribedRecords
  • UserLastCreatedDocuments
  • UserLastCreatedFolders
  • UserLastCreatedRecords
  • UserLastImportedMails
  • UserLastImportedMailAttachments
  • In the case of "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();
		}
	}
}