package jenkins.python.expoint;
import hudson.ExtensionPoint;
import hudson.Functions;
import hudson.Util;
import jenkins.model.Jenkins;
import java.io.File;
import java.io.IOException;
import java.util.logging.Logger;
import java.util.logging.Level;
import org.apache.commons.io.FileUtils;
import hudson.lifecycle.*;
import hudson.lifecycle.Lifecycle.*;
import jenkins.python.DataConvertor;
import jenkins.python.PythonExecutor;
/**
* This class was automatically generated by the PWM tool on 2014/03/21.
* @see hudson.lifecycle.Lifecycle
*/
public abstract class LifecyclePW extends Lifecycle {
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[6];
functions[0] = "get_hudson_war";
functions[1] = "rewrite_hudson_war";
functions[2] = "can_rewrite_hudson_war";
functions[3] = "restart";
functions[4] = "verify_restartable";
functions[5] = "can_restart";
int[] argsCount = new int[6];
argsCount[0] = 0;
argsCount[1] = 1;
argsCount[2] = 0;
argsCount[3] = 0;
argsCount[4] = 0;
argsCount[5] = 0;
pexec.registerFunctions(functions, argsCount);
}
}
@Override
public File getHudsonWar() {
initPython();
if (pexec.isImplemented(0)) {
return (File) pexec.execPython("get_hudson_war");
} else {
return super.getHudsonWar();
}
}
@Override
public void rewriteHudsonWar(File by) throws IOException {
initPython();
if (pexec.isImplemented(1)) {
pexec.execPythonVoid("rewrite_hudson_war", by);
} else {
super.rewriteHudsonWar(by);
}
}
@Override
public boolean canRewriteHudsonWar() {
initPython();
if (pexec.isImplemented(2)) {
return pexec.execPythonBool("can_rewrite_hudson_war");
} else {
return super.canRewriteHudsonWar();
}
}
@Override
public void restart() throws IOException, InterruptedException {
initPython();
if (pexec.isImplemented(3)) {
pexec.execPythonVoid("restart");
} else {
super.restart();
}
}
@Override
public void verifyRestartable() throws RestartNotSupportedException {
initPython();
if (pexec.isImplemented(4)) {
pexec.execPythonVoid("verify_restartable");
} else {
super.verifyRestartable();
}
}
@Override
public boolean canRestart() {
initPython();
if (pexec.isImplemented(5)) {
return pexec.execPythonBool("can_restart");
} else {
return super.canRestart();
}
}
public File superGetHudsonWar() {
return super.getHudsonWar();
}
public void superRewriteHudsonWar(File by) throws IOException {
super.rewriteHudsonWar(by);
}
public boolean superCanRewriteHudsonWar() {
return super.canRewriteHudsonWar();
}
public void superRestart() throws IOException, InterruptedException {
super.restart();
}
public void superVerifyRestartable() throws RestartNotSupportedException {
super.verifyRestartable();
}
public boolean superCanRestart() {
return super.canRestart();
}
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);
}
}