WorkflowInstanceReport.java
1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.day.cq.workflow.exec.HistoryItem
* com.day.cq.workflow.exec.WorkItem
* com.day.cq.workflow.model.WorkflowModel
* com.day.crx.statistics.Report
* javax.jcr.RepositoryException
* javax.jcr.Session
*/
package com.day.cq.workflow.impl.statistics;
import com.day.cq.workflow.exec.HistoryItem;
import com.day.cq.workflow.exec.WorkItem;
import com.day.cq.workflow.impl.statistics.WorkflowInstanceView;
import com.day.cq.workflow.model.WorkflowModel;
import com.day.crx.statistics.Report;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
public class WorkflowInstanceReport
extends Report {
private WorkflowModel model;
public WorkflowInstanceReport(String dataPath, WorkflowModel model) {
super(dataPath);
this.model = model;
}
public Iterator getResult(Session session) throws RepositoryException {
WorkflowInstanceView view = new WorkflowInstanceView(this.getDataPath(), this.model, null, null);
Map<String, Map<String, Long>> stats = view.getInstanceStats(session);
ArrayList<Map<String, Map<String, Long>>> list = new ArrayList<Map<String, Map<String, Long>>>();
list.add(stats);
return list.iterator();
}
}