HostPseudoModelScript.java
11.8 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa;
import com.adobe.xfa.*;
import com.adobe.xfa.ut.ExFull;
import com.adobe.xfa.ut.ResId;
import java.util.ArrayList;
import java.util.StringTokenizer;
public class HostPseudoModelScript
extends PseudoModelScript {
protected static final ScriptTable moScriptTable = new ScriptTable(PseudoModelScript.moScriptTable, "hostPseudoModel", new ScriptPropObj[]{new ScriptPropObj(HostPseudoModelScript.class, "appType", "getAppType", null, 6, 21, 9, 0), new ScriptPropObj(HostPseudoModelScript.class, "currentPage", "getCurrentPage", "setCurrentPage", 4, 21, 63, 0), new ScriptPropObj(HostPseudoModelScript.class, "language", "getLanguage", null, 6, 21, 9, 0), new ScriptPropObj(HostPseudoModelScript.class, "name", "getName", null, 6, 21, 63, 0), new ScriptPropObj(HostPseudoModelScript.class, "numPages", "getNumPages", null, 4, 21, 63, 0), new ScriptPropObj(HostPseudoModelScript.class, "platform", "getPlatform", null, 6, 21, 9, 0), new ScriptPropObj(HostPseudoModelScript.class, "title", "getTitle", "setTitle", 6, 21, 9, 0), new ScriptPropObj(HostPseudoModelScript.class, "variation", "getVariation", null, 6, 21, 9, 0), new ScriptPropObj(HostPseudoModelScript.class, "version", "getVersion", null, 6, 21, 9, 0), new ScriptPropObj(HostPseudoModelScript.class, "calculationsEnabled", "getCalculationsEnabled", "setCalculationsEnabled", 3, 21, 63, 0), new ScriptPropObj(HostPseudoModelScript.class, "validationsEnabled", "getValidationsEnabled", "setValidationsEnabled", 3, 21, 63, 0)}, new ScriptFuncObj[]{new ScriptFuncObj(HostPseudoModelScript.class, "beep", "beep", 1, new int[]{4}, 0, 21, 9, 0), new ScriptFuncObj(HostPseudoModelScript.class, "currentDateTime", "getCurrentDateTime", 6, new int[0], 0, 28, 9, 0), new ScriptFuncObj(HostPseudoModelScript.class, "documentInBatch", "getDocumentInBatch", 4, new int[0], 0, 25, 9, 0), new ScriptFuncObj(HostPseudoModelScript.class, "documentCountInBatch", "getDocumentCountInBatch", 4, new int[0], 0, 25, 9, 0), new ScriptFuncObj(HostPseudoModelScript.class, "exportData", "exportData", 1, new int[]{6, 3}, 0, 21, 9, 0), new ScriptFuncObj(HostPseudoModelScript.class, "gotoURL", "gotoURL", 1, new int[]{6, 3}, 1, 21, 63, 0), new ScriptFuncObj(HostPseudoModelScript.class, "importData", "importData", 1, new int[]{6}, 0, 21, 9, "importDataPermsCheck", 0), new ScriptFuncObj(HostPseudoModelScript.class, "messageBox", "messageBox", 4, new int[]{6, 6, 4, 4}, 1, 21, 63, 0), new ScriptFuncObj(HostPseudoModelScript.class, "pageDown", "pageDown", 1, new int[0], 0, 21, 63, 0), new ScriptFuncObj(HostPseudoModelScript.class, "pageUp", "pageUp", 1, new int[0], 0, 21, 63, 0), new ScriptFuncObj(HostPseudoModelScript.class, "print", "print", 1, new int[]{3, 6, 6, 3, 3, 3, 3, 3}, 8, 21, 9, 0), new ScriptFuncObj(HostPseudoModelScript.class, "response", "response", 0, new int[]{6, 6, 6, 3}, 1, 21, 9, 0), new ScriptFuncObj(HostPseudoModelScript.class, "setFocus", "setFocus", 1, new int[]{0}, 0, 21, 63, 0), new ScriptFuncObj(HostPseudoModelScript.class, "resetData", "resetData", 1, new int[]{6}, 0, 21, 63, "resetDataPermsCheck", 0), new ScriptFuncObj(HostPseudoModelScript.class, "openList", "openList", 1, new int[]{0}, 1, 21, 8, 0), new ScriptFuncObj(HostPseudoModelScript.class, "getFocus", "getFocus", 7, new int[0], 0, 26, 63, 0)});
public static ScriptTable getScriptTable() {
return moScriptTable;
}
public static void beep(Obj pObj, Arg oRetVal, Arg[] pArgs) {
if (pArgs.length == 1) {
((HostPseudoModel)pObj).beep(pArgs[0].getInteger());
} else {
((HostPseudoModel)pObj).beep(0);
}
}
public static void exportData(Obj pObj, Arg oRetVal, Arg[] pArgs) {
if (pArgs.length == 2) {
((HostPseudoModel)pObj).exportData(pArgs[0].getString(), pArgs[1].getAsBool(false));
} else if (pArgs.length == 1) {
((HostPseudoModel)pObj).exportData(pArgs[0].getString(), true);
} else {
((HostPseudoModel)pObj).exportData("", true);
}
}
public static void getAppType(Obj pObj, Arg oRetVal) {
oRetVal.setString(((HostPseudoModel)pObj).getAppType());
}
public static void getCalculationsEnabled(Obj pObj, Arg oRetVal) {
oRetVal.setBool(((HostPseudoModel)pObj).getCalculationsEnabled());
}
public static void getCurrentDateTime(Obj pObj, Arg oRetVal, Arg[] pArgs) {
oRetVal.setString(((HostPseudoModel)pObj).getCurrentDateTime());
}
public static void getCurrentPage(Obj pObj, Arg oRetVal) {
oRetVal.setInteger(((HostPseudoModel)pObj).getCurrentPage());
}
public static void getDocumentInBatch(Obj pObj, Arg oRetVal, Arg[] pArgs) {
oRetVal.setInteger(((HostPseudoModel)pObj).getDocumentInBatch());
}
public static void getDocumentCountInBatch(Obj pObj, Arg oRetVal, Arg[] pArgs) {
oRetVal.setInteger(((HostPseudoModel)pObj).getDocumentCountInBatch());
}
public static void getFocus(Obj pObj, Arg oRetVal, Arg[] pArgs) {
oRetVal.setObject(((HostPseudoModel)pObj).getFocus());
}
public static void getLanguage(Obj pObj, Arg oRetVal) {
oRetVal.setString(((HostPseudoModel)pObj).getLanguage());
}
public static void getName(Obj pObj, Arg oRetVal) {
oRetVal.setString(((HostPseudoModel)pObj).getName());
}
public static void getNumPages(Obj pObj, Arg oRetVal) {
oRetVal.setInteger(((HostPseudoModel)pObj).getNumPages());
}
public static void getPlatform(Obj pObj, Arg oRetVal) {
oRetVal.setString(((HostPseudoModel)pObj).getPlatform());
}
public static void getTitle(Obj pObj, Arg oRetVal) {
oRetVal.setString(((HostPseudoModel)pObj).getTitle());
}
public static void getValidationsEnabled(Obj pObj, Arg oRetVal) {
oRetVal.setBool(((HostPseudoModel)pObj).getValidationsEnabled());
}
public static void getVariation(Obj pObj, Arg oRetVal) {
oRetVal.setString(((HostPseudoModel)pObj).getVariation());
}
public static void getVersion(Obj pObj, Arg oRetVal) {
oRetVal.setString(((HostPseudoModel)pObj).getVersion());
}
public static void gotoURL(Obj pObj, Arg oRetVal, Arg[] pArgs) {
if (pArgs.length == 2) {
((HostPseudoModel)pObj).gotoURL(pArgs[0].getString(), pArgs[1].getAsBool(false));
} else {
((HostPseudoModel)pObj).gotoURL(pArgs[0].getString(), false);
}
}
public static void importData(Obj pObj, Arg oRetVal, Arg[] pArgs) {
if (pArgs.length == 1) {
((HostPseudoModel)pObj).importData(pArgs[0].getString());
} else {
((HostPseudoModel)pObj).importData("");
}
}
public static boolean importDataPermsCheck(Obj obj, Arg[] args) {
return ((HostPseudoModel)obj).importDataPermsCheck();
}
public static void messageBox(Obj pObj, Arg oRetVal, Arg[] pArgs) {
if (pArgs.length == 4) {
oRetVal.setInteger(((HostPseudoModel)pObj).messageBox(pArgs[0].getString(), pArgs[1].getString(), pArgs[2].getInteger(), pArgs[3].getInteger()));
} else if (pArgs.length == 3) {
oRetVal.setInteger(((HostPseudoModel)pObj).messageBox(pArgs[0].getString(), pArgs[1].getString(), pArgs[2].getInteger(), 0));
} else if (pArgs.length == 2) {
oRetVal.setInteger(((HostPseudoModel)pObj).messageBox(pArgs[0].getString(), pArgs[1].getString(), 0, 0));
} else {
oRetVal.setInteger(((HostPseudoModel)pObj).messageBox(pArgs[0].getString(), "", 0, 0));
}
}
public static void openList(Obj pObj, Arg oRetVal, Arg[] pArgs) {
if (pArgs[0].getArgType() == 7) {
Obj xfaobj = pArgs[0].getObject();
if (!(xfaobj instanceof Node)) {
throw new ExFull(ResId.ArgumentMismatchException);
}
Node xfanode = (Node)xfaobj;
((HostPseudoModel)pObj).openList(xfanode);
} else {
String sNode = pArgs[0].getString();
((HostPseudoModel)pObj).openList(sNode);
}
}
public static void pageDown(Obj pObj, Arg oRetVal, Arg[] pArgs) {
((HostPseudoModel)pObj).pageDown();
}
public static void pageUp(Obj pObj, Arg oRetVal, Arg[] pArgs) {
((HostPseudoModel)pObj).pageUp();
}
public static void print(Obj pObj, Arg oRetVal, Arg[] pArgs) {
((HostPseudoModel)pObj).print(pArgs[0].getAsBool(false), pArgs[1].getInteger(), pArgs[2].getInteger(), pArgs[3].getAsBool(false), pArgs[4].getAsBool(false), pArgs[5].getAsBool(false), pArgs[6].getAsBool(false), pArgs[7].getAsBool(false));
}
public static void resetData(Obj pObj, Arg oRetVal, Arg[] pArgs) {
ArrayList<String> oNodes = new ArrayList<String>();
if (pArgs.length == 1) {
String sNodes = pArgs[0].getString();
StringTokenizer sToker = new StringTokenizer(sNodes, ",");
while (sToker.hasMoreTokens()) {
oNodes.add(sToker.nextToken());
}
}
((HostPseudoModel)pObj).resetData(oNodes);
}
public static boolean resetDataPermsCheck(Obj obj, Arg[] args) {
if (obj instanceof PseudoModel) {
ArrayList<String> oNodes = new ArrayList<String>();
if (args.length == 1) {
String sNodes = args[0].getString();
StringTokenizer sToker = new StringTokenizer(sNodes, ",");
while (sToker.hasMoreTokens()) {
oNodes.add(sToker.nextToken());
}
}
return ((HostPseudoModel)obj).resetDataPermsCheck(oNodes);
}
return true;
}
public static void response(Obj pObj, Arg oRetVal, Arg[] pArgs) {
String sRetVal = pArgs.length == 4 ? ((HostPseudoModel)pObj).response(pArgs[0].getString(), pArgs[1].getString(), pArgs[2].getString(), pArgs[3].getAsBool(false)) : (pArgs.length == 3 ? ((HostPseudoModel)pObj).response(pArgs[0].getString(), pArgs[1].getString(), pArgs[2].getString(), false) : (pArgs.length == 2 ? ((HostPseudoModel)pObj).response(pArgs[0].getString(), pArgs[1].getString(), "", false) : ((HostPseudoModel)pObj).response(pArgs[0].getString(), "", "", false)));
if (sRetVal == null) {
oRetVal.setNull();
} else {
oRetVal.setString(sRetVal);
}
}
public static void setCurrentPage(Obj pObj, Arg propertyValue) {
((HostPseudoModel)pObj).setCurrentPage(propertyValue.getInteger());
}
public static void setFocus(Obj pObj, Arg oRetVal, Arg[] pArgs) {
boolean isClearFocus = false;
if (pArgs.length >= 1) {
if (pArgs[0].getArgType() == 7) {
Obj xfaobj = pArgs[0].getObject();
if (!(xfaobj instanceof Node)) {
throw new ExFull(ResId.ArgumentMismatchException);
}
Node xfanode = (Node)xfaobj;
((HostPseudoModel)pObj).setFocus(xfanode);
} else if (pArgs[0].getArgType() == 1) {
isClearFocus = true;
} else if (pArgs[0].getArgType() == 2) {
isClearFocus = true;
} else {
String sNode = pArgs[0].getString();
((HostPseudoModel)pObj).setFocus(sNode);
}
} else {
isClearFocus = true;
}
if (isClearFocus) {
Node xfanode = null;
((HostPseudoModel)pObj).setFocus(xfanode);
}
}
public static void setTitle(Obj pObj, Arg propertyValue) {
((HostPseudoModel)pObj).setTitle(propertyValue.getString());
}
public static void setValidationsEnabled(Obj pObj, Arg propertyValue) {
((HostPseudoModel)pObj).setValidationsEnabled(propertyValue.getAsBool(false));
}
public static void setCalculationsEnabled(Obj pObj, Arg propertyValue) {
((HostPseudoModel)pObj).setCalculationsEnabled(propertyValue.getAsBool(false));
}
}