package jenkins.python.expoint; import hudson.DescriptorExtensionList; import hudson.Extension; import hudson.ExtensionPoint; import hudson.Util; import hudson.model.Describable; import hudson.model.Descriptor; import hudson.model.Failure; import hudson.util.FormValidation; import java.io.IOException; import java.io.Serializable; import java.util.regex.Pattern; import java.util.regex.PatternSyntaxException; import javax.servlet.ServletException; import org.apache.commons.lang.StringUtils; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.QueryParameter; import jenkins.model.*; import jenkins.model.ProjectNamingStrategy.*; import jenkins.python.DataConvertor; import jenkins.python.PythonExecutor; /** * This class was automatically generated by the PWM tool on 2014/03/21. * @see jenkins.model.ProjectNamingStrategy */ public abstract class ProjectNamingStrategyPW extends ProjectNamingStrategy { 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] = "get_descriptor"; functions[1] = "check_name"; functions[2] = "is_force_existing_jobs"; int[] argsCount = new int[3]; argsCount[0] = 0; argsCount[1] = 1; argsCount[2] = 0; pexec.registerFunctions(functions, argsCount); } } @Override public ProjectNamingStrategyDescriptor getDescriptor() { initPython(); if (pexec.isImplemented(0)) { return (ProjectNamingStrategyDescriptor) pexec.execPython("get_descriptor"); } else { return super.getDescriptor(); } } @Override public void checkName(String name) throws Failure { initPython(); if (pexec.isImplemented(1)) { pexec.execPythonVoid("check_name", name); } else { super.checkName(name); } } @Override public boolean isForceExistingJobs() { initPython(); if (pexec.isImplemented(2)) { return pexec.execPythonBool("is_force_existing_jobs"); } else { return super.isForceExistingJobs(); } } public ProjectNamingStrategyDescriptor superGetDescriptor() { return super.getDescriptor(); } public void superCheckName(String name) throws Failure { super.checkName(name); } public boolean superIsForceExistingJobs() { return super.isForceExistingJobs(); } 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); } }