AssetRefCollector.java
1.16 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
44
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.apache.commons.lang3.StringUtils
* org.apache.sling.commons.json.JSONObject
*/
package com.adobe.aemds.guide.utils.guideJson;
import com.adobe.aemds.guide.utils.GuideUtils;
import com.adobe.aemds.guide.utils.guideJson.GuideJsonVisitor;
import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.sling.commons.json.JSONObject;
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
public class AssetRefCollector
implements GuideJsonVisitor {
private List<String> assetRefs = new ArrayList<String>();
public List<String> getAssetRefs() {
return this.assetRefs;
}
@Override
public void visitItem(JSONObject panel) {
String fragRef = panel.optString("fragRef");
if (StringUtils.isNotBlank((CharSequence)fragRef)) {
this.assetRefs.add(GuideUtils.convertFMAssetPathToContainerPath(fragRef));
}
}
@Override
public void preRecurse(JSONObject obj) {
}
@Override
public void postRecurse(JSONObject obj) {
}
}