Traverse.java
1.91 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
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.template.sequencing;
import com.adobe.xfa.AppModel;
import com.adobe.xfa.Attribute;
import com.adobe.xfa.Element;
import com.adobe.xfa.Node;
import com.adobe.xfa.ProtoableNode;
import com.adobe.xfa.StringAttr;
import com.adobe.xfa.XFA;
import com.adobe.xfa.template.TemplateModel;
import org.xml.sax.Attributes;
public final class Traverse
extends ProtoableNode {
public Traverse(Element parent, Node prevSibling) {
super(parent, prevSibling, null, "traverse", "traverse", null, XFA.TRAVERSETAG, "traverse");
}
@Override
public String getPrivateName() {
Attribute oOperation = null;
if (this.getProto() != null) {
oOperation = this.getProto().getAttribute(XFA.OPERATIONTAG);
}
if (oOperation == null) {
oOperation = this.getAttribute(XFA.OPERATIONTAG);
}
if (oOperation == null) {
return this.defaultAttribute(XFA.OPERATIONTAG).toString();
}
return oOperation.getAttrValue();
}
@Override
public String getName() {
if (this.getAppModel().getLegacySetting(AppModel.XFA_LEGACY_V27_SCRIPTING)) {
return super.getName();
}
return this.getPrivateName();
}
@Override
public void setPrivateName(String sNewName) {
this.setAttribute(new StringAttr("operation", sNewName), XFA.OPERATIONTAG);
}
@Override
public void setName(String sNewName) {
boolean bLegacyScripting = true;
AppModel oAppModel = this.getAppModel();
TemplateModel oModel = TemplateModel.getTemplateModel(oAppModel, false);
if (oModel != null) {
bLegacyScripting = oModel.getLegacySetting(AppModel.XFA_LEGACY_V27_SCRIPTING);
}
if (bLegacyScripting) {
super.setName(sNewName);
} else {
this.setPrivateName(sNewName);
}
}
}