package jenkins.python.expoint; import hudson.Extension; import hudson.ExtensionList; import hudson.ExtensionPoint; import hudson.util.FormValidation; import hudson.util.FormValidation.Kind; import hudson.util.IOException2; import hudson.util.IOUtils; import hudson.util.QuotedStringTokenizer; import hudson.util.TextFile; import jenkins.model.Jenkins; import jenkins.util.JSONSignatureValidator; import net.sf.json.JSONException; import org.kohsuke.stapler.Stapler; import java.io.File; import java.io.IOException; import java.util.logging.Logger; import net.sf.json.JSONObject; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; import static hudson.util.TimeUnit2.DAYS; import hudson.model.*; import hudson.model.DownloadService.Downloadable.*; import hudson.model.DownloadService.*; import jenkins.python.DataConvertor; import jenkins.python.PythonExecutor; /** * This class was automatically generated by the PWM tool on 2014/03/21. * @see hudson.model.DownloadService.Downloadable */ public abstract class DownloadablePW extends Downloadable { private transient PythonExecutor pexec; private void initPython() { if (pexec == null) { pexec = new PythonExecutor(this); String[] jMethods = new String[0]; String[] pFuncs = new String[0]; Class[][] argTypes = new Class[0][]; pexec.checkAbstrMethods(jMethods, pFuncs, argTypes); String[] functions = new String[7]; functions[0] = "get_id"; functions[1] = "get_url"; functions[2] = "get_interval"; functions[3] = "get_data_file"; functions[4] = "get_due"; functions[5] = "get_data"; functions[6] = "do_post_back"; int[] argsCount = new int[7]; argsCount[0] = 0; argsCount[1] = 0; argsCount[2] = 0; argsCount[3] = 0; argsCount[4] = 0; argsCount[5] = 0; argsCount[6] = 2; pexec.registerFunctions(functions, argsCount); } } public DownloadablePW(String id, String url, long interval) { super(id, url, interval); } public DownloadablePW() { super(); } public DownloadablePW(Class id) { super(id); } public DownloadablePW(String id) { super(id); } public DownloadablePW(String id, String url) { super(id, url); } @Override public String getId() { initPython(); if (pexec.isImplemented(0)) { return (String) pexec.execPython("get_id"); } else { return super.getId(); } } @Override public String getUrl() { initPython(); if (pexec.isImplemented(1)) { return (String) pexec.execPython("get_url"); } else { return super.getUrl(); } } @Override public long getInterval() { initPython(); if (pexec.isImplemented(2)) { return pexec.execPythonLong("get_interval"); } else { return super.getInterval(); } } @Override public TextFile getDataFile() { initPython(); if (pexec.isImplemented(3)) { return (TextFile) pexec.execPython("get_data_file"); } else { return super.getDataFile(); } } @Override public long getDue() { initPython(); if (pexec.isImplemented(4)) { return pexec.execPythonLong("get_due"); } else { return super.getDue(); } } @Override public JSONObject getData() throws IOException { initPython(); if (pexec.isImplemented(5)) { return (JSONObject) pexec.execPython("get_data"); } else { return super.getData(); } } @Override public void doPostBack(StaplerRequest req, StaplerResponse rsp) throws IOException { initPython(); if (pexec.isImplemented(6)) { pexec.execPythonVoid("do_post_back", req, rsp); } else { super.doPostBack(req, rsp); } } public String superGetId() { return super.getId(); } public String superGetUrl() { return super.getUrl(); } public long superGetInterval() { return super.getInterval(); } public TextFile superGetDataFile() { return super.getDataFile(); } public long superGetDue() { return super.getDue(); } public JSONObject superGetData() throws IOException { return super.getData(); } public void superDoPostBack(StaplerRequest req, StaplerResponse rsp) throws IOException { super.doPostBack(req, rsp); } public Object execPython(String function, Object... params) { initPython(); return pexec.execPython(function, params); } public byte execPythonByte(String function, Object... params) { initPython(); return pexec.execPythonByte(function, params); } public short execPythonShort(String function, Object... params) { initPython(); return pexec.execPythonShort(function, params); } public char execPythonChar(String function, Object... params) { initPython(); return pexec.execPythonChar(function, params); } public int execPythonInt(String function, Object... params) { initPython(); return pexec.execPythonInt(function, params); } public long execPythonLong(String function, Object... params) { initPython(); return pexec.execPythonLong(function, params); } public float execPythonFloat(String function, Object... params) { initPython(); return pexec.execPythonFloat(function, params); } public double execPythonDouble(String function, Object... params) { initPython(); return pexec.execPythonDouble(function, params); } public boolean execPythonBool(String function, Object... params) { initPython(); return pexec.execPythonBool(function, params); } public void execPythonVoid(String function, Object... params) { initPython(); pexec.execPythonVoid(function, params); } }