DataLookUp.java
1.11 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
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.apache.commons.lang3.text.StrLookup
* org.apache.sling.commons.json.JSONObject
* org.slf4j.Logger
* org.slf4j.LoggerFactory
*/
package com.adobe.aemds.guide.utils;
import org.apache.commons.lang3.text.StrLookup;
import org.apache.sling.commons.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
class DataLookUp
extends StrLookup<String> {
private JSONObject guideValueMap;
private Logger logger = LoggerFactory.getLogger(DataLookUp.class);
public DataLookUp(JSONObject guideValueMap) {
this.guideValueMap = guideValueMap;
}
public String lookup(String key) {
String value = "";
try {
if (this.guideValueMap.has(key)) {
value = this.guideValueMap.getString(key);
}
}
catch (Exception e) {
this.logger.error("Unable to look up : " + e.toString(), (Throwable)e);
}
return value;
}
}