ModelScript.java
3.19 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa;
import com.adobe.xfa.*;
import com.adobe.xfa.ut.ExFull;
import com.adobe.xfa.ut.MsgFormatPos;
import com.adobe.xfa.ut.ResId;
public class ModelScript
extends ElementScript {
protected static final ScriptTable moScriptTable = new ScriptTable(ElementScript.moScriptTable, "model", new ScriptPropObj[]{new ScriptPropObj(ModelScript.class, "aliasNode", "getAliasNode", "setSliasNode", 7, 10, 9, 0), new ScriptPropObj(ModelScript.class, "context", "getContext", "setContext", 7, 10, 0, 22), new ScriptPropObj(ModelScript.class, "name", "getName", "setName", 6, 10, 9, 0)}, new ScriptFuncObj[]{new ScriptFuncObj(ModelScript.class, "createNode", "createNode", 7, new int[]{6, 6, 6}, 1, 10, 9, 0), new ScriptFuncObj(ModelScript.class, "clearErrorList", "clearErrorList", 1, new int[0], 0, 10, 9, 0), new ScriptFuncObj(ModelScript.class, "isCompatibleNS", "isCompatibleNS", 3, new int[]{6}, 1, 10, 9, 0)});
public static void getAliasNode(Obj pObj, Arg oRetVal) {
oRetVal.setObject(((Model)pObj).getAliasNode());
}
public static void getContext(Obj pObj, Arg oRetVal) {
oRetVal.setObject(((Model)pObj).getContext());
}
public static void setAliasNode(Obj pObj, Arg oArg) {
Obj oObject = oArg.getObject();
if (!(oObject instanceof Element)) {
throw new ExFull(ResId.ArgumentMismatchException);
}
((Model)pObj).setAliasNode((Element)oObject);
}
public static void getName(Obj pObj, Arg oRetVal) {
oRetVal.setString(((Model)pObj).getName());
}
public static void setContext(Obj pObj, Arg oArg) {
Obj oObject = oArg.getObject();
if (!(oObject instanceof Node)) {
throw new ExFull(ResId.ArgumentMismatchException);
}
((Model)pObj).setContext((Node)oObject);
}
public static void setName(Obj pObj, Arg oArg) {
MsgFormatPos oMessage = new MsgFormatPos(ResId.InvalidSetPropertyException);
oMessage.format(((Model)pObj).getClassAtom()).format("name");
throw new ExFull(oMessage);
}
public static void createNode(Obj pObj, Arg oRetVal, Arg[] pArgs) {
int eTag;
String aTagName = pArgs[0].getString();
if (aTagName != null) {
aTagName = aTagName.intern();
}
if ((eTag = XFA.getTag(aTagName)) != -1) {
if (pArgs.length == 1) {
oRetVal.setObject(((Model)pObj).createNode(eTag, null, "", "", true));
} else if (pArgs.length == 2) {
oRetVal.setObject(((Model)pObj).createNode(eTag, null, pArgs[1].getString(), "", true));
} else if (pArgs.length == 3) {
oRetVal.setObject(((Model)pObj).createNode(eTag, null, pArgs[1].getString(), pArgs[2].getString(), true));
}
}
}
public static void clearErrorList(Obj pObj, Arg oRetVal, Arg[] pArgs) {
((Model)pObj).clearErrorList();
}
public static void isCompatibleNS(Obj pObj, Arg oRetVal, Arg[] pArgs) {
String aNS = pArgs[0].getString();
oRetVal.setBool(((Model)pObj).isCompatibleNS(aNS));
}
public static ScriptTable getScriptTable() {
return moScriptTable;
}
}