ExclGroupScript.java
7 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.template.containers;
import com.adobe.xfa.AppModel;
import com.adobe.xfa.Arg;
import com.adobe.xfa.Node;
import com.adobe.xfa.NodeList;
import com.adobe.xfa.Obj;
import com.adobe.xfa.ScriptFuncObj;
import com.adobe.xfa.ScriptPropObj;
import com.adobe.xfa.ScriptTable;
import com.adobe.xfa.data.DataNode;
import com.adobe.xfa.template.containers.ContainerScript;
import com.adobe.xfa.template.containers.ExclGroup;
public class ExclGroupScript
extends ContainerScript {
protected static final ScriptTable moScriptTable = new ScriptTable(ContainerScript.moScriptTable, "exclGroup", new ScriptPropObj[]{new ScriptPropObj(ExclGroupScript.class, "rawValue", "getRawValue", "setRawValue", 0, 21, 9, 0), new ScriptPropObj(ExclGroupScript.class, null, "getRawValue", "setRawValue", 0, 21, 9, 0), new ScriptPropObj(ExclGroupScript.class, "members", "getMembers", null, 7, 21, 9, 0), new ScriptPropObj(ExclGroupScript.class, "dataNode", "dataNode", null, 7, 21, 9, 0), new ScriptPropObj(ExclGroupScript.class, "validationMessage", "getValidationMessage", "setValidationMessage", 6, 21, 63, 0), new ScriptPropObj(ExclGroupScript.class, "mandatoryMessage", "getMandatoryMessage", "setMandatoryMessage", 6, 21, 63, 0), new ScriptPropObj(ExclGroupScript.class, "mandatory", "getMandatory", "setMandatory", 6, 21, 63, 0), new ScriptPropObj(ExclGroupScript.class, "fillColor", "getBackColor", "setBackColor", 6, 21, 63, 0), new ScriptPropObj(ExclGroupScript.class, "borderColor", "getBorderColor", "setBorderColor", 6, 21, 63, 0), new ScriptPropObj(ExclGroupScript.class, "borderWidth", "getBorderWidth", "setBorderWidth", 6, 21, 63, 0), new ScriptPropObj(ExclGroupScript.class, "errorText", "getErrorText", null, 6, 30, 63, 0)}, new ScriptFuncObj[]{new ScriptFuncObj(ExclGroupScript.class, "selectedMember", "selectedMember", 7, new int[]{6}, 0, 21, 9, "selectedMemberPermsCheck", 0), new ScriptFuncObj(ExclGroupScript.class, "execCalculate", "execCalculate", 1, new int[0], 0, 21, 63, 0), new ScriptFuncObj(ExclGroupScript.class, "execValidate", "execValidate", 3, new int[0], 0, 21, 63, 0), new ScriptFuncObj(ExclGroupScript.class, "execInitialize", "execInitialize", 1, new int[0], 0, 21, 63, 0), new ScriptFuncObj(ExclGroupScript.class, "execEvent", "execEvent", 1, new int[]{6}, 1, 21, 63, 0)});
public static ScriptTable getScriptTable() {
return moScriptTable;
}
public static void getRawValue(Obj pObj, Arg oRetVal) {
if (((ExclGroup)pObj).getAppModel().getLegacySetting(AppModel.XFA_LEGACY_V29_SCRIPTING)) {
oRetVal.setString(((ExclGroup)pObj).getRawValue());
} else if (!((ExclGroup)pObj).getIsNull()) {
((ExclGroup)pObj).getTypedRawValue(oRetVal);
} else {
oRetVal.setNull();
}
}
public static void setRawValue(Obj pObj, Arg propertyValue) {
if (((ExclGroup)pObj).getAppModel().getLegacySetting(AppModel.XFA_LEGACY_V29_SCRIPTING)) {
((ExclGroup)pObj).setRawValue(propertyValue.getString());
} else {
String sValue = "";
if (propertyValue.getArgType() != 2) {
sValue = propertyValue.getAsString(false);
}
((ExclGroup)pObj).setRawValue(sValue);
}
}
public static void getMembers(Obj pObj, Arg oRetVal) {
oRetVal.setObject(((ExclGroup)pObj).getMembers());
}
public static void getMandatory(Obj pObj, Arg oRetVal) {
oRetVal.setString(((ExclGroup)pObj).getMandatory());
}
public static void setMandatory(Obj pObj, Arg propertyValue) {
((ExclGroup)pObj).setMandatory(propertyValue.getString());
}
public static void getValidationMessage(Obj pObj, Arg oRetVal) {
oRetVal.setString(((ExclGroup)pObj).getMessage("scriptTest"));
}
public static void setValidationMessage(Obj pObj, Arg propertyValue) {
((ExclGroup)pObj).setMessage(propertyValue.getString(), "scriptTest");
}
public static void getMandatoryMessage(Obj pObj, Arg oRetVal) {
oRetVal.setString(((ExclGroup)pObj).getMessage("nullTest"));
}
public static void setMandatoryMessage(Obj pObj, Arg propertyValue) {
((ExclGroup)pObj).setMessage(propertyValue.getString(), "nullTest");
}
public static void getBackColor(Obj pObj, Arg oRetVal) {
oRetVal.setString(((ExclGroup)pObj).getBackColor());
}
public static void setBackColor(Obj pObj, Arg propertyValue) {
((ExclGroup)pObj).setBackColor(propertyValue.getString());
}
public static void getBorderColor(Obj pObj, Arg oRetVal) {
oRetVal.setString(((ExclGroup)pObj).getBorderColor());
}
public static void setBorderColor(Obj pObj, Arg propertyValue) {
((ExclGroup)pObj).setBorderColor(propertyValue.getString());
}
public static void getBorderWidth(Obj pObj, Arg oRetVal) {
oRetVal.setString(((ExclGroup)pObj).getBorderWidth());
}
public static void setBorderWidth(Obj pObj, Arg propertyValue) {
((ExclGroup)pObj).setBorderWidth(propertyValue.getString());
}
public static void dataNode(Obj pObj, Arg oRetVal) {
oRetVal.setObject(((ExclGroup)pObj).getDataNode());
}
public static void getErrorText(Obj pObj, Arg oRetVal) {
oRetVal.setString(((ExclGroup)pObj).getErrorText());
}
public static boolean selectedMemberPermsCheck(Obj obj, Arg[] args) {
if (args.length != 0 && obj instanceof ExclGroup) {
ExclGroup exclGroup = (ExclGroup)obj;
if (!exclGroup.checkAncestorPerms()) {
return false;
}
if (!exclGroup.getSelectedMember().checkDescendentPerms()) {
return false;
}
NodeList members = exclGroup.getMembers();
assert (members != null);
Node onNode = exclGroup.resolveNode(args[0].getString());
assert (onNode != null);
int nLength = members.length();
for (int nIndex = 0; nIndex < nLength; ++nIndex) {
Node member = (Node)members.item(nIndex);
assert (member != null);
if (member != onNode || member.checkDescendentPerms()) continue;
return false;
}
}
return true;
}
public static void selectedMember(Obj pObj, Arg oRetVal, Arg[] pArgs) {
if (pArgs.length == 1) {
((ExclGroup)pObj).setSelectedMember(pArgs[0].getString());
}
oRetVal.setObject(((ExclGroup)pObj).getSelectedMember());
}
public static void execCalculate(Obj pObj, Arg oRetVal, Arg[] pArgs) {
((ExclGroup)pObj).execEvent("calculate");
}
public static void execValidate(Obj pObj, Arg oRetVal, Arg[] pArgs) {
oRetVal.setBool(((ExclGroup)pObj).execValidate());
}
public static void execInitialize(Obj pObj, Arg oRetVal, Arg[] pArgs) {
((ExclGroup)pObj).execEvent("initialize");
}
public static void execEvent(Obj pObj, Arg oRetVal, Arg[] pArgs) {
((ExclGroup)pObj).execEvent(pArgs[0].getString());
}
}