XFA4JService$.java
6.81 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.adobe.forms.xtg.impl.XFA4JService$$anonfun
* com.adobe.forms.xtg.impl.XFA4JService$$anonfun$paExecute
* scala.Function0
* scala.ScalaObject
* scala.runtime.AbstractFunction0
*/
package com.adobe.forms.xtg.impl;
import com.adobe.forms.logging.PerfLogger$;
import com.adobe.forms.model.XFAConfig;
import com.adobe.forms.xtg.impl.XFA4JService$;
import scala.Function0;
import scala.ScalaObject;
import scala.runtime.AbstractFunction0;
public final class XFA4JService$
implements ScalaObject {
public static final XFA4JService$ MODULE$;
public static {
new com.adobe.forms.xtg.impl.XFA4JService$();
}
public byte[] paExecute(byte[] template$1, byte[] data$1, XFAConfig xci$1, byte[] xdc, boolean restoreDeltas$1, boolean runInitializeScripts$1) {
return (byte[])PerfLogger$.MODULE$.measure((Function0<Object>)new scala.Serializable(){
public static final long serialVersionUID;
public static {
long l = anonfun.paExecute.serialVersionUID = 0;
}
public final java.lang.String apply() {
return "XFA4JService.paExecute";
}
}, new scala.Serializable(template$1, data$1, xci$1, restoreDeltas$1, runInitializeScripts$1){
public static final long serialVersionUID;
private final byte[] template$1;
private final byte[] data$1;
private final XFAConfig xci$1;
private final boolean restoreDeltas$1;
private final boolean runInitializeScripts$1;
public static {
long l = anonfun.paExecute.serialVersionUID = 0;
}
/*
* Unable to fully structure code
* Enabled aggressive block sorting
* Lifted jumps to return sites
*/
public final byte[] apply() {
appModel = new com.adobe.xfa.AppModel(null);
appModel.addFactory((com.adobe.xfa.ModelFactory)new com.adobe.xfa.template.TemplateModelFactory());
appModel.addFactory((com.adobe.xfa.ModelFactory)new com.adobe.xfa.data.DataModelFactory());
appModel.addFactory((com.adobe.xfa.ModelFactory)new com.adobe.xfa.configuration.ConfigurationModelFactory());
appModel.addFactory((com.adobe.xfa.ModelFactory)new com.adobe.xfa.localeset.LocaleSetModelFactory());
v0 = this.xci$1.script().$bslash("runScripts").text();
var2_2 = "none";
if (v0 == null ? var2_2 != null : v0.equals(var2_2) == false) {
rhinoScriptHandler = new com.adobe.xfa.scripthandler.rhino.RhinoScriptHandler(appModel);
rhinoScriptHandler.setOption("interpretScript", "true");
appModel.addScriptHandler((com.adobe.xfa.ScriptHandler)rhinoScriptHandler);
appModel.addScriptHandler((com.adobe.xfa.ScriptHandler)new com.adobe.xfa.scripthandler.formcalc.FormCalcScriptHandler(appModel));
}
xmlStorageTemplate = new com.adobe.xfa.service.storage.XMLStorage();
xmlStorageTemplate.loadXDP(appModel, (java.io.InputStream)new java.io.ByteArrayInputStream(this.template$1), null, (Object)null, true);
com.adobe.xfa.template.TemplateModel.getTemplateModel((com.adobe.xfa.AppModel)appModel, (boolean)false).ready(false);
formModel = com.adobe.xfa.form.FormModel.getFormModel((com.adobe.xfa.AppModel)appModel, (boolean)true);
v1 = var6_6 = this.xci$1.script().$bslash("runScripts").text();
var7_7 = "both";
if (v1 != null) ** GOTO lbl22
if (var7_7 == null) ** GOTO lbl23
** GOTO lbl25
lbl22: // 1 sources:
if (!v1.equals(var7_7)) ** GOTO lbl25
lbl23: // 2 sources:
formModel.setRunScripts(1080754178);
** GOTO lbl49
lbl25: // 2 sources:
v2 = var6_6;
var8_8 = "client";
if (v2 != null) ** GOTO lbl30
if (var8_8 == null) ** GOTO lbl31
** GOTO lbl33
lbl30: // 1 sources:
if (!v2.equals(var8_8)) ** GOTO lbl33
lbl31: // 2 sources:
formModel.setRunScripts(1080754176);
** GOTO lbl49
lbl33: // 2 sources:
v3 = var6_6;
var9_9 = "server";
if (v3 != null) ** GOTO lbl38
if (var9_9 == null) ** GOTO lbl-1000
** GOTO lbl-1000
lbl38: // 1 sources:
if (v3.equals(var9_9)) lbl-1000: // 2 sources:
{
formModel.setRunScripts(1080754177);
} else lbl-1000: // 2 sources:
{
v4 = var6_6;
var10_10 = "none";
if (v4 == null) {
if (var10_10 != null) {
throw new scala.MatchError((Object)var6_6);
}
} else if (v4.equals(var10_10) == false) throw new scala.MatchError((Object)var6_6);
formModel.setRunScripts(1080754179);
}
lbl49: // 4 sources:
xmlStorageData = new com.adobe.xfa.service.storage.XMLStorage();
v5 = scala.Predef$.MODULE$.byteArrayOps(this.data$1).isEmpty() != false ? scala.runtime.BoxedUnit.UNIT : scala.runtime.BoxesRunTime.boxToBoolean((boolean)xmlStorageData.loadXDP(appModel, (java.io.InputStream)new java.io.ByteArrayInputStream(this.data$1), null, (Object)null, false));
formModel.merge(true, true, "", this.runInitializeScripts$1, this.restoreDeltas$1, this.restoreDeltas$1, true, true);
saveOptions = new com.adobe.xfa.DOMSaveOptions();
saveOptions.setExcludePreamble(true);
oNodeList = new com.adobe.xfa.ArrayNodeList();
var14_14 = this.xci$1;
if (var14_14 instanceof com.adobe.forms.model.XFAConfig$XFARenderFormDomConfig) {
formModel.recalculate(true, new com.adobe.xfa.form.FormModel$Validate(), false);
oNodeList.append((com.adobe.xfa.Obj)formModel.copyCat());
} else {
dataModel = com.adobe.xfa.data.DataModel.getDataModel((com.adobe.xfa.AppModel)appModel, (boolean)true, (boolean)false);
oNodeList.append((com.adobe.xfa.Obj)dataModel);
}
outXmlStorage = new com.adobe.xfa.service.storage.XMLStorage();
baos = new java.io.ByteArrayOutputStream();
outXmlStorage.saveAggregate("", (java.io.OutputStream)baos, (com.adobe.xfa.NodeList)oNodeList, "");
return baos.toByteArray();
}
});
}
private XFA4JService$() {
MODULE$ = this;
}
}