GuideNumericBoxElement.java
1.16 KB
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.xfa.Element
* org.apache.sling.commons.json.JSONObject
*/
package com.adobe.aemds.guide.addon.dor.elements;
import com.adobe.aemds.guide.addon.dor.elements.DoRElement;
import com.adobe.aemds.guide.addon.dor.elements.DoRNumericBoxElement;
import com.adobe.aemds.guide.addon.dor.elements.GuideElement;
import com.adobe.aemds.guide.addon.dor.elements.GuideElementProperties;
import com.adobe.xfa.Element;
import java.util.Properties;
import org.apache.sling.commons.json.JSONObject;
public class GuideNumericBoxElement
extends GuideElement {
public GuideNumericBoxElement(JSONObject jsonObject) {
super(jsonObject);
for (String key : GuideElementProperties.NUMERICBOX_PROPERTIES) {
if (!jsonObject.has(key)) continue;
this.properties.put(key, jsonObject.optString(key));
}
if (!this.properties.containsKey("_value")) {
this.properties.put("_value", "");
}
}
@Override
public DoRElement createDoRElement(Element xfaElement) throws Exception {
return new DoRNumericBoxElement(xfaElement);
}
}