package jenkins.python.expoint; import hudson.ExtensionPoint; import hudson.Launcher; import hudson.matrix.MatrixBuild; import hudson.matrix.MatrixRun; import hudson.model.AbstractBuild; import hudson.model.AbstractBuild.AbstractBuildExecution; import hudson.model.AbstractDescribableImpl; import hudson.model.AbstractProject; import hudson.model.BuildListener; import hudson.model.BuildableItemWithBuildWrappers; import hudson.model.Executor; import hudson.scm.SCM; import hudson.tasks.BuildWrapper; import java.io.File; import java.io.IOException; import jenkins.scm.*; import jenkins.scm.SCMCheckoutStrategy.*; import jenkins.model.Jenkins; import hudson.model.*; import hudson.model.AbstractDescribableImpl.*; import jenkins.python.DataConvertor; import jenkins.python.PythonExecutor; /** * This class was automatically generated by the PWM tool on 2014/03/21. * @see jenkins.scm.SCMCheckoutStrategy */ public abstract class SCMCheckoutStrategyPW extends SCMCheckoutStrategy { 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[3]; functions[0] = "pre_checkout"; functions[1] = "checkout"; functions[2] = "get_descriptor"; int[] argsCount = new int[3]; argsCount[0] = 3; argsCount[1] = 1; argsCount[2] = 0; pexec.registerFunctions(functions, argsCount); } } @Override public void preCheckout(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException { initPython(); if (pexec.isImplemented(0)) { pexec.execPythonVoid("pre_checkout", build, launcher, listener); } else { super.preCheckout(build, launcher, listener); } } @Override public void checkout(AbstractBuildExecution execution) throws IOException, InterruptedException { initPython(); if (pexec.isImplemented(1)) { pexec.execPythonVoid("checkout", execution); } else { super.checkout(execution); } } @Override public SCMCheckoutStrategyDescriptor getDescriptor() { initPython(); if (pexec.isImplemented(2)) { return (SCMCheckoutStrategyDescriptor) pexec.execPython("get_descriptor"); } else { return super.getDescriptor(); } } public void superPreCheckout(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException { super.preCheckout(build, launcher, listener); } public void superCheckout(AbstractBuildExecution execution) throws IOException, InterruptedException { super.checkout(execution); } public SCMCheckoutStrategyDescriptor superGetDescriptor() { return super.getDescriptor(); } 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); } }