package jenkins.python.expoint;
import hudson.ExtensionPoint;
import hudson.Extension;
import hudson.DescriptorExtensionList;
import hudson.model.Build;
import hudson.model.BuildListener;
import hudson.model.Describable;
import hudson.model.Descriptor;
import jenkins.model.Jenkins;
import hudson.tasks.*;
import hudson.tasks.Builder.*;
import hudson.model.Action;
import hudson.model.Project;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.Launcher;
import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
import hudson.tasks.BuildStepCompatibilityLayer.*;
import jenkins.python.DataConvertor;
import jenkins.python.PythonExecutor;
/**
* This class was automatically generated by the PWM tool on 2014/03/21.
* @see hudson.tasks.Builder
*/
public abstract class BuilderPW extends Builder {
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[9];
functions[0] = "prebuild";
functions[1] = "get_required_monitor_service";
functions[2] = "get_descriptor";
functions[3] = "prebuild";
functions[4] = "perform";
functions[5] = "get_project_action";
functions[6] = "get_project_actions";
functions[7] = "perform";
functions[8] = "get_project_action";
int[] argsCount = new int[9];
argsCount[0] = 2;
argsCount[1] = 0;
argsCount[2] = 0;
argsCount[3] = 2;
argsCount[4] = 3;
argsCount[5] = 1;
argsCount[6] = 1;
argsCount[7] = 3;
argsCount[8] = 1;
pexec.registerFunctions(functions, argsCount);
}
}
@Override
public BuildStepMonitor getRequiredMonitorService() {
initPython();
if (pexec.isImplemented(1)) {
return (BuildStepMonitor) pexec.execPython("get_required_monitor_service");
} else {
return super.getRequiredMonitorService();
}
}
@Override
public Descriptor<Builder> getDescriptor() {
initPython();
if (pexec.isImplemented(2)) {
return (Descriptor) pexec.execPython("get_descriptor");
} else {
return super.getDescriptor();
}
}
@Override
public boolean prebuild(AbstractBuild<?, ?> build, BuildListener listener) {
initPython();
if (pexec.isImplemented(3)) {
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(4)) {
return pexec.execPythonBool("perform", build, launcher, listener);
} else {
return super.perform(build, launcher, listener);
}
}
@Override
public Action getProjectAction(AbstractProject<?, ?> project) {
initPython();
if (pexec.isImplemented(5)) {
return (Action) pexec.execPython("get_project_action", project);
} else {
return super.getProjectAction(project);
}
}
@Override
public Collection<? extends Action> getProjectActions(AbstractProject<?, ?> project) {
initPython();
if (pexec.isImplemented(6)) {
return (Collection) pexec.execPython("get_project_actions", project);
} else {
return super.getProjectActions(project);
}
}
@Override
public boolean perform(Build<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
initPython();
if (pexec.isImplemented(7)) {
return pexec.execPythonBool("perform", build, launcher, listener);
} else {
return super.perform(build, launcher, listener);
}
}
@Override
public Action getProjectAction(Project<?, ?> project) {
initPython();
if (pexec.isImplemented(8)) {
return (Action) pexec.execPython("get_project_action", project);
} else {
return super.getProjectAction(project);
}
}
public BuildStepMonitor superGetRequiredMonitorService() {
return super.getRequiredMonitorService();
}
public Descriptor<Builder> superGetDescriptor() {
return super.getDescriptor();
}
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 Action superGetProjectAction(AbstractProject<?, ?> project) {
return super.getProjectAction(project);
}
public Collection<? extends Action> superGetProjectActions(AbstractProject<?, ?> project) {
return super.getProjectActions(project);
}
public boolean superPerform(Build<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
return super.perform(build, launcher, listener);
}
public Action superGetProjectAction(Project<?, ?> project) {
return super.getProjectAction(project);
}
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);
}
}