TemplateModelScript.java 2.87 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.xfa.template;

import com.adobe.xfa.Arg;
import com.adobe.xfa.Element;
import com.adobe.xfa.ModelScript;
import com.adobe.xfa.Node;
import com.adobe.xfa.Obj;
import com.adobe.xfa.ScriptFuncObj;
import com.adobe.xfa.ScriptPropObj;
import com.adobe.xfa.ScriptTable;
import com.adobe.xfa.XFA;
import com.adobe.xfa.template.TemplateModel;

public class TemplateModelScript
extends ModelScript {
    protected static final ScriptTable moScriptTable = new ScriptTable(ModelScript.moScriptTable, "template", null, new ScriptFuncObj[]{new ScriptFuncObj(TemplateModelScript.class, "createNode", "createNode", 7, new int[]{6, 6}, 1, 21, 9, 0), new ScriptFuncObj(TemplateModelScript.class, "recalculate", "recalculate", 1, new int[]{3}, 1, 21, 9, 0), new ScriptFuncObj(TemplateModelScript.class, "remerge", "remerge", 1, new int[0], 0, 21, 9, 0), new ScriptFuncObj(TemplateModelScript.class, "formNodes", "formNodes", 7, new int[]{7}, 1, 21, 9, 0), new ScriptFuncObj(TemplateModelScript.class, "execCalculate", "execCalculate", 1, new int[0], 0, 21, 63, 0), new ScriptFuncObj(TemplateModelScript.class, "execValidate", "execValidate", 1, new int[0], 0, 21, 63, 0), new ScriptFuncObj(TemplateModelScript.class, "execInitialize", "execInitialize", 1, new int[0], 0, 21, 63, 0), new ScriptFuncObj(TemplateModelScript.class, "metadata", "metadata", 6, new int[0], 0, 26, 9, 0)});

    public static ScriptTable getScriptTable() {
        return moScriptTable;
    }

    public static void createNode(Obj obj, Arg oRetVal, Arg[] args) {
        String prop = args[0].getString().intern();
        int eTag = XFA.getTag(prop);
        if (eTag > -1) {
            if (args.length == 1) {
                oRetVal.setObject(((TemplateModel)obj).createNode(eTag, null, "", "", true));
            } else {
                oRetVal.setObject(((TemplateModel)obj).createNode(eTag, null, args[1].getString().intern(), "", true));
            }
        }
    }

    public static void recalculate(Obj obj, Arg retVal, Arg[] args) {
        ((TemplateModel)obj).invalidMethod("recalculate");
    }

    public static void remerge(Obj obj, Arg retVal, Arg[] args) {
        ((TemplateModel)obj).invalidMethod("remerge");
    }

    public static void formNodes(Obj obj, Arg retVal, Arg[] args) {
        ((TemplateModel)obj).invalidMethod("formNodes");
    }

    public static void execCalculate(Obj obj, Arg retVal, Arg[] args) {
        ((TemplateModel)obj).invalidMethod("execCalculate");
    }

    public static void execValidate(Obj obj, Arg retVal, Arg[] args) {
        ((TemplateModel)obj).invalidMethod("execValidate");
    }

    public static void execInitialize(Obj obj, Arg retVal, Arg[] args) {
        ((TemplateModel)obj).invalidMethod("execInitialize");
    }

    public static void metadata(Obj obj, Arg retVal, Arg[] args) {
        ((TemplateModel)obj).invalidMethod("metadata");
    }
}