package jenkins.python.expoint; import hudson.ExtensionPoint; import hudson.Launcher; import hudson.Plugin; import hudson.model.Descriptor.FormException; import hudson.model.queue.SubTask; import hudson.tasks.BuildStep; import hudson.tasks.Builder; import hudson.tasks.Publisher; import hudson.tasks.BuildStepMonitor; import java.io.IOException; import java.util.Collection; import java.util.Collections; import jenkins.model.Jenkins; import net.sf.json.JSONObject; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.export.ExportedBean; import hudson.model.*; import hudson.model.JobProperty.*; import jenkins.python.DataConvertor; import jenkins.python.PythonExecutor; /** * This class was automatically generated by the PWM tool on 2014/03/21. * @see hudson.model.JobProperty */ public abstract class JobPropertyPW<J extends Job<?, ?>> extends JobProperty<J> { 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[10]; functions[0] = "set_owner"; functions[1] = "get_descriptor"; functions[2] = "get_job_action"; functions[3] = "get_job_actions"; functions[4] = "prebuild"; functions[5] = "perform"; functions[6] = "get_required_monitor_service"; functions[7] = "get_job_overrides"; functions[8] = "reconfigure"; functions[9] = "get_sub_tasks"; int[] argsCount = new int[10]; argsCount[0] = 1; argsCount[1] = 0; argsCount[2] = 1; argsCount[3] = 1; argsCount[4] = 2; argsCount[5] = 3; argsCount[6] = 0; argsCount[7] = 0; argsCount[8] = 2; argsCount[9] = 0; pexec.registerFunctions(functions, argsCount); } } @Override public void setOwner(J owner) { initPython(); if (pexec.isImplemented(0)) { pexec.execPythonVoid("set_owner", owner); } else { super.setOwner(owner); } } @Override public JobPropertyDescriptor getDescriptor() { initPython(); if (pexec.isImplemented(1)) { return (JobPropertyDescriptor) pexec.execPython("get_descriptor"); } else { return super.getDescriptor(); } } @Override public Action getJobAction(J job) { initPython(); if (pexec.isImplemented(2)) { return (Action) pexec.execPython("get_job_action", job); } else { return super.getJobAction(job); } } @Override public Collection<? extends Action> getJobActions(J job) { initPython(); if (pexec.isImplemented(3)) { return (Collection) pexec.execPython("get_job_actions", job); } else { return super.getJobActions(job); } } @Override public boolean prebuild(AbstractBuild<?, ?> build, BuildListener listener) { initPython(); if (pexec.isImplemented(4)) { return pexec.execPythonBool("prebuild", build, listener); } else { return super.prebuild(build, listener); } } @Override public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { initPython(); if (pexec.isImplemented(5)) { return pexec.execPythonBool("perform", build, launcher, listener); } else { return super.perform(build, launcher, listener); } } @Override public BuildStepMonitor getRequiredMonitorService() { initPython(); if (pexec.isImplemented(6)) { return (BuildStepMonitor) pexec.execPython("get_required_monitor_service"); } else { return super.getRequiredMonitorService(); } } @Override public Collection<?> getJobOverrides() { initPython(); if (pexec.isImplemented(7)) { return (Collection) pexec.execPython("get_job_overrides"); } else { return super.getJobOverrides(); } } @Override public JobProperty<?> reconfigure(StaplerRequest req, JSONObject form) throws FormException { initPython(); if (pexec.isImplemented(8)) { return (JobProperty) pexec.execPython("reconfigure", req, form); } else { return super.reconfigure(req, form); } } @Override public Collection<? extends SubTask> getSubTasks() { initPython(); if (pexec.isImplemented(9)) { return (Collection) pexec.execPython("get_sub_tasks"); } else { return super.getSubTasks(); } } public void superSetOwner(J owner) { super.setOwner(owner); } public JobPropertyDescriptor superGetDescriptor() { return super.getDescriptor(); } public Action superGetJobAction(J job) { return super.getJobAction(job); } public Collection<? extends Action> superGetJobActions(J job) { return super.getJobActions(job); } public boolean superPrebuild(AbstractBuild<?, ?> build, BuildListener listener) { return super.prebuild(build, listener); } public boolean superPerform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException { return super.perform(build, launcher, listener); } public BuildStepMonitor superGetRequiredMonitorService() { return super.getRequiredMonitorService(); } public Collection<?> superGetJobOverrides() { return super.getJobOverrides(); } public JobProperty<?> superReconfigure(StaplerRequest req, JSONObject form) throws FormException { return super.reconfigure(req, form); } public Collection<? extends SubTask> superGetSubTasks() { return super.getSubTasks(); } 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); } }