package jenkins.python.expoint;
import hudson.DescriptorExtensionList;
import hudson.Extension;
import hudson.ExtensionPoint;
import hudson.AbortException;
import hudson.cli.CLICommand;
import hudson.util.DescriptorList;
import java.io.Serializable;
import java.io.IOException;
import java.util.logging.Logger;
import jenkins.model.Jenkins;
import net.sf.json.JSONObject;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.export.ExportedBean;
import hudson.model.*;
import hudson.model.ParameterDefinition.*;
import jenkins.python.DataConvertor;
import jenkins.python.PythonExecutor;
/**
* This class was automatically generated by the PWM tool on 2014/03/21.
* @see hudson.model.ParameterDefinition
*/
public abstract class ParameterDefinitionPW extends ParameterDefinition {
private transient PythonExecutor pexec;
private void initPython() {
if (pexec == null) {
pexec = new PythonExecutor(this);
String[] jMethods = new String[2];
jMethods[0] = "createValue";
jMethods[1] = "createValue";
String[] pFuncs = new String[2];
pFuncs[0] = "create_value";
pFuncs[1] = "create_value";
Class[][] argTypes = new Class[2][];
argTypes[0] = new Class[2];
argTypes[0][0] = StaplerRequest.class;
argTypes[0][1] = JSONObject.class;
argTypes[1] = new Class[1];
argTypes[1][0] = StaplerRequest.class;
pexec.checkAbstrMethods(jMethods, pFuncs, argTypes);
String[] functions = new String[8];
functions[0] = "copy_with_default_value";
functions[1] = "get_type";
functions[2] = "get_name";
functions[3] = "get_description";
functions[4] = "get_formatted_description";
functions[5] = "get_descriptor";
functions[6] = "create_value";
functions[7] = "get_default_parameter_value";
int[] argsCount = new int[8];
argsCount[0] = 1;
argsCount[1] = 0;
argsCount[2] = 0;
argsCount[3] = 0;
argsCount[4] = 0;
argsCount[5] = 0;
argsCount[6] = 2;
argsCount[7] = 0;
pexec.registerFunctions(functions, argsCount);
}
}
public ParameterDefinitionPW(String name) {
super(name);
}
public ParameterDefinitionPW(String name, String description) {
super(name, description);
}
@Override
public ParameterValue createValue(StaplerRequest req, JSONObject jo) {
initPython();
return (ParameterValue) pexec.execPython("create_value", req, jo);
}
@Override
public ParameterValue createValue(StaplerRequest req) {
initPython();
return (ParameterValue) pexec.execPython("create_value", req);
}
@Override
public ParameterDefinition copyWithDefaultValue(ParameterValue defaultValue) {
initPython();
if (pexec.isImplemented(0)) {
return (ParameterDefinition) pexec.execPython("copy_with_default_value", defaultValue);
} else {
return super.copyWithDefaultValue(defaultValue);
}
}
@Override
@Exported
public String getType() {
initPython();
if (pexec.isImplemented(1)) {
return (String) pexec.execPython("get_type");
} else {
return super.getType();
}
}
@Override
@Exported
public String getName() {
initPython();
if (pexec.isImplemented(2)) {
return (String) pexec.execPython("get_name");
} else {
return super.getName();
}
}
@Override
@Exported
public String getDescription() {
initPython();
if (pexec.isImplemented(3)) {
return (String) pexec.execPython("get_description");
} else {
return super.getDescription();
}
}
@Override
public String getFormattedDescription() {
initPython();
if (pexec.isImplemented(4)) {
return (String) pexec.execPython("get_formatted_description");
} else {
return super.getFormattedDescription();
}
}
@Override
public ParameterDescriptor getDescriptor() {
initPython();
if (pexec.isImplemented(5)) {
return (ParameterDescriptor) pexec.execPython("get_descriptor");
} else {
return super.getDescriptor();
}
}
@Override
public ParameterValue createValue(CLICommand command, String value) throws IOException, InterruptedException {
initPython();
if (pexec.isImplemented(6)) {
return (ParameterValue) pexec.execPython("create_value", command, value);
} else {
return super.createValue(command, value);
}
}
@Override
@Exported
public ParameterValue getDefaultParameterValue() {
initPython();
if (pexec.isImplemented(7)) {
return (ParameterValue) pexec.execPython("get_default_parameter_value");
} else {
return super.getDefaultParameterValue();
}
}
public ParameterDefinition superCopyWithDefaultValue(ParameterValue defaultValue) {
return super.copyWithDefaultValue(defaultValue);
}
public String superGetType() {
return super.getType();
}
public String superGetName() {
return super.getName();
}
public String superGetDescription() {
return super.getDescription();
}
public String superGetFormattedDescription() {
return super.getFormattedDescription();
}
public ParameterDescriptor superGetDescriptor() {
return super.getDescriptor();
}
public ParameterValue superCreateValue(CLICommand command, String value) throws IOException, InterruptedException {
return super.createValue(command, value);
}
public ParameterValue superGetDefaultParameterValue() {
return super.getDefaultParameterValue();
}
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);
}
}