HostPseudoModel.java 4.52 KB
/*
 * Decompiled with CFR 0_118.
 */
package com.adobe.xfa;

import com.adobe.xfa.*;
import com.adobe.xfa.ut.ExFull;
import com.adobe.xfa.ut.ISODateTime;
import com.adobe.xfa.ut.MsgFormatPos;
import com.adobe.xfa.ut.ResId;

import java.util.List;

public abstract class HostPseudoModel
extends PseudoModel {
    public HostPseudoModel() {
        this.setClass("hostPseudoModel");
    }

    @Override
    public ScriptTable getScriptTable() {
        return HostPseudoModelScript.moScriptTable;
    }

    public String getAppType() {
        throw this.unimplemented("appType", true);
    }

    public int getCurrentPage() {
        throw this.unimplemented("currentPage", true);
    }

    public void setCurrentPage(int nPage) {
        throw this.unimplemented("currentPage", true);
    }

    public String getCurrentDateTime() {
        ISODateTime oDateTime = new ISODateTime();
        String sNow = oDateTime.format("YYYYMMDDTHHMMSS");
        return sNow;
    }

    public int getDocumentInBatch() {
        return 0;
    }

    public int getDocumentCountInBatch() {
        return 1;
    }

    public String getLanguage() {
        throw this.unimplemented("language", true);
    }

    public String getName() {
        throw this.unimplemented("name", true);
    }

    public int getNumPages() {
        throw this.unimplemented("numPages", true);
    }

    public String getPlatform() {
        throw this.unimplemented("platform", true);
    }

    public String getTitle() {
        throw this.unimplemented("title", true);
    }

    public void setTitle(String sTitle) {
        throw this.unimplemented("title", true);
    }

    public String getVariation() {
        throw this.unimplemented("variation", true);
    }

    public String getVersion() {
        throw this.unimplemented("version", true);
    }

    public boolean getCalculationsEnabled() {
        return true;
    }

    public void setCalculationsEnabled(boolean bEnabled) {
        throw this.unimplemented("calculationsEnabled", true);
    }

    public boolean getValidationsEnabled() {
        return true;
    }

    public void setValidationsEnabled(boolean bEnabled) {
        throw this.unimplemented("validationsEnabled", true);
    }

    public void beep(int nBeep) {
        throw this.unimplemented("beep", false);
    }

    public void exportData(String sFilename, boolean bXDP) {
        throw this.unimplemented("exportData", false);
    }

    public void importData(String sFilename) {
        throw this.unimplemented("importData", false);
    }

    public void gotoURL(String sURL, boolean bNewInstance) {
        throw this.unimplemented("gotoURL", false);
    }

    public int messageBox(String sMessage, String sTitle, int nIcon, int nType) {
        throw this.unimplemented("messageBox", false);
    }

    public void resetData(List<String> oNodes) {
        throw this.unimplemented("resetData", false);
    }

    public void print(boolean bUI, int nStart, int nEnd, boolean bSilent, boolean bShrinkToFit, boolean bPrintAsImage, boolean bReverse, boolean bAnnotation) {
        throw this.unimplemented("print", false);
    }

    public String response(String sQuestion, String sTitle, String sDefault, boolean bPassword) {
        throw this.unimplemented("response", false);
    }

    public Obj getFocus() {
        throw this.unimplemented("getFocus", false);
    }

    public void setFocus(String sSOMExpr) {
        throw this.unimplemented("setFocus", false);
    }

    public void setFocus(Node node) {
        throw this.unimplemented("setFocus", false);
    }

    public void pageDown() {
        throw this.unimplemented("pageDown", false);
    }

    public void pageUp() {
        throw this.unimplemented("pageUp", false);
    }

    public void openList(String sSOMExpr) {
        throw this.unimplemented("openList", false);
    }

    public void openList(Node node) {
        throw this.unimplemented("openList", false);
    }

    public String metaData(int nOutputType) {
        return "";
    }

    public boolean importDataPermsCheck() {
        throw this.unimplemented("importDataPermsCheck", false);
    }

    public boolean resetDataPermsCheck(List<String> nodes) {
        throw this.unimplemented("resetDataPermsCheck", false);
    }

    private ExFull unimplemented(String sName, boolean bProperty) {
        int nResId = bProperty ? ResId.InvalidPropertyException : ResId.InvalidMethodException;
        MsgFormatPos oMessage = new MsgFormatPos(nResId);
        oMessage.format("$host");
        oMessage.format(sName);
        return new ExFull(oMessage);
    }
}