OKMStats

Basics

On all methods you'll see parameter named "token". When accessing application across SOAP the login process returns a token, what is used to identify the user on all the exposed methods. 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

getDocumentsByContext

Description:

MethodReturn valuesDescription

getDocumentsByContext(String token)

StatsInfo

Return stats information about documents by context.

Example:

package com.openkm;

import com.openkm.api.OKMStats;
import com.openkm.bean.StatsInfo;

public class Test {
    public static void main(String[] args) {
        try {
            StatsInfo sInfo = OKMStats.getInstance().getDocumentsByContext(null);
            System.out.println(sInfo);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getDocumentsSizeByContext

Description:

MethodReturn valuesDescription

getDocumentsByContext(String token)

StatsInfo

Return stats information about documents size by context.

Example:

package com.openkm;

import com.openkm.api.OKMStats;
import com.openkm.bean.StatsInfo;

public class Test {
    public static void main(String[] args) {
        try {
            StatsInfo sInfo = OKMStats.getInstance().getDocumentsSizeByContext(null);
            System.out.println(sInfo);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getFoldersByContext

Description:

MethodReturn valuesDescription

getFoldersByContext(String token)

StatsInfo

Return stats information about folders by context.

Example:

package com.openkm;

import com.openkm.api.OKMStats;
import com.openkm.bean.StatsInfo;

public class Test {
    public static void main(String[] args) {
        try {
            StatsInfo sInfo = OKMStats.getInstance().getFoldersByContext(null);
            System.out.println(sInfo);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

getMailsByContext

Description:

MethodReturn valuesDescription

getMailsByContext(String token)

StatsInfo

Return stats information about mails by context.

Example:

package com.openkm;

import com.openkm.api.OKMStats;
import com.openkm.bean.StatsInfo;

public class Test {
    public static void main(String[] args) {
        try {
            StatsInfo sInfo = OKMStats.getInstance().getMailsByContext(null);
            System.out.println(sInfo);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}