EVarMerger.java
1.39 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
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.apache.sling.commons.json.JSONArray
* org.apache.sling.commons.json.JSONException
* org.apache.sling.commons.json.JSONObject
*/
package com.day.cq.analytics.sitecatalyst.rsmerger.impl;
import com.day.cq.analytics.sitecatalyst.rsmerger.AbstractMerger;
import com.day.cq.analytics.sitecatalyst.rsmerger.MergedVariable;
import com.day.cq.analytics.sitecatalyst.rsmerger.ReportSuiteVariable;
import com.day.cq.analytics.sitecatalyst.rsmerger.impl.ReportSuiteEVar;
import org.apache.sling.commons.json.JSONArray;
import org.apache.sling.commons.json.JSONException;
import org.apache.sling.commons.json.JSONObject;
@Deprecated
public class EVarMerger
extends AbstractMerger {
public EVarMerger(JSONArray variables) throws JSONException {
super(variables);
int numVariables = variables.length();
for (int i = 0; i < numVariables; ++i) {
this.intertwine(new ReportSuiteEVar(variables.getJSONObject(i)));
}
}
@Override
public JSONObject mergeVariable(Integer number, MergedVariable mVar) throws JSONException {
JSONObject jsonVar = mVar.getJSONVar();
return jsonVar.put("name", (Object)mVar.getName());
}
@Override
public JSONObject getReportSuite() throws JSONException {
return this.jsonObj.put("evars", (Object)this.getVariables());
}
}