OKMReport
Esta página aún no está disponible en tu idioma.
Basics
Section titled “Basics”You can set several reports formats based in document mime type:
Methods
Section titled “Methods”Description:
| Method | Return values | Description |
|---|---|---|
| list(String token, boolean active) | List |
Returns a list of reports. |
- When variable active when is set to true will be returned only the active reports otherwise all the reports.
Example:
package com.openkm;
import com.openkm.api.OKMReport;import com.openkm.bean.Report;
public class Test { public static void main(String[] args) { try { System.out.println(OKMReport.getInstance().list(null, true)); } catch (Exception e) { e.printStackTrace(); } }}Description:
| Method | Return values | Description |
|---|---|---|
| get(String token, long rpId) | Report | Returns an object Report. |
- The variable rpId is the long value used to identify the report.
Example:
package com.openkm;
import com.openkm.api.OKMReport;import com.openkm.bean.Report;
public class Test { public static void main(String[] args) { try { System.out.println(OKMReport.getInstance().get(null, 1)); } catch (Exception e) { e.printStackTrace(); } }}execute
Section titled “execute”Description:
| Method | Return values | Description |
|---|---|---|
| execute(String token, long rpId, Map<String, Object> params, String format) | InputStream | Returns the inputstream of the report. |
- The variable rpId is the long value used to identify the report.
Example:
package com.openkm;
import com.openkm.api.OKMReport;import com.openkm.bean.Report;import java.util;
public class Test { public static void main(String[] args) { try { Map<String, Object> map = new HashMap(); // report parameters InpustStream is = OKMReport.getInstance().execute(null, 1, map, Report.FORMAT_PDF)); } catch (Exception e) { e.printStackTrace(); } }}