WCMResourceOptions.java
1.64 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* aQute.bnd.annotation.ProviderType
* com.day.cq.wcm.api.WCMMode
* org.apache.commons.lang3.StringUtils
*/
package com.adobe.cq.sightly;
import aQute.bnd.annotation.ProviderType;
import com.day.cq.wcm.api.WCMMode;
import org.apache.commons.lang3.StringUtils;
import java.util.HashMap;
@ProviderType
public class WCMResourceOptions
extends HashMap<String, String> {
public static final String OPTION_WCMMODE = "wcmmode";
public static final String OPTION_DECORATION_TAG_NAME = "decorationTagName";
public static final String OPTION_CSS_CLASS = "cssClassName";
public WCMMode getWCMMode() {
String mode = (String)this.get("wcmmode");
if (StringUtils.isNotEmpty((CharSequence)mode)) {
return WCMMode.valueOf((String)mode.toUpperCase());
}
return null;
}
public String getDecorationTagName() {
return (String)this.get("decorationTagName");
}
public String getCssClassName() {
return (String)this.get("cssClassName");
}
public void setOptionDecorationTagName(String decorationTagName) {
this.put("decorationTagName", this.getInternalValue(decorationTagName));
}
public void setCssClassName(String cssClassName) {
this.put("cssClassName", this.getInternalValue(cssClassName));
}
public void setWcmMode(String wcmMode) {
this.put("wcmmode", this.getInternalValue(wcmMode));
}
private String getInternalValue(String value) {
if (StringUtils.isEmpty((CharSequence)value)) {
return "";
}
return value;
}
}