package jenkins.python.expoint;
import hudson.AbortException;
import hudson.ExtensionPoint;
import hudson.FilePath;
import hudson.Launcher;
import hudson.DescriptorExtensionList;
import hudson.Extension;
import hudson.Util;
import hudson.security.PermissionGroup;
import hudson.security.Permission;
import hudson.security.PermissionScope;
import hudson.tasks.Builder;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
import hudson.model.BuildListener;
import hudson.model.Describable;
import hudson.model.TaskListener;
import hudson.model.Node;
import hudson.model.WorkspaceCleanupThread;
import jenkins.model.Jenkins;
import hudson.model.Descriptor;
import hudson.model.Api;
import hudson.model.Action;
import hudson.model.AbstractProject.AbstractProjectDescriptor;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Map;
import java.util.List;
import java.util.ArrayList;
import org.kohsuke.stapler.export.Exported;
import org.kohsuke.stapler.export.ExportedBean;
import hudson.scm.*;
import hudson.scm.SCM.*;
import jenkins.python.DataConvertor;
import jenkins.python.PythonExecutor;
/**
* This class was automatically generated by the PWM tool on 2014/03/21.
* @see hudson.scm.SCM
*/
public abstract class SCMPW extends SCM {
private transient PythonExecutor pexec;
private void initPython() {
if (pexec == null) {
pexec = new PythonExecutor(this);
String[] jMethods = new String[4];
jMethods[0] = "calcRevisionsFromBuild";
jMethods[1] = "compareRemoteRevisionWith";
jMethods[2] = "checkout";
jMethods[3] = "createChangeLogParser";
String[] pFuncs = new String[4];
pFuncs[0] = "calc_revisions_from_build";
pFuncs[1] = "compare_remote_revision_with";
pFuncs[2] = "checkout";
pFuncs[3] = "create_change_log_parser";
Class[][] argTypes = new Class[4][];
argTypes[0] = new Class[3];
argTypes[0][0] = AbstractBuild.class;
argTypes[0][1] = Launcher.class;
argTypes[0][2] = TaskListener.class;
argTypes[1] = new Class[5];
argTypes[1][0] = AbstractProject.class;
argTypes[1][1] = Launcher.class;
argTypes[1][2] = FilePath.class;
argTypes[1][3] = TaskListener.class;
argTypes[1][4] = SCMRevisionState.class;
argTypes[2] = new Class[5];
argTypes[2][0] = AbstractBuild.class;
argTypes[2][1] = Launcher.class;
argTypes[2][2] = FilePath.class;
argTypes[2][3] = BuildListener.class;
argTypes[2][4] = File.class;
argTypes[3] = new Class[0];
pexec.checkAbstrMethods(jMethods, pFuncs, argTypes);
String[] functions = new String[14];
functions[0] = "get_api";
functions[1] = "get_browser";
functions[2] = "get_type";
functions[3] = "supports_polling";
functions[4] = "requires_workspace_for_polling";
functions[5] = "process_workspace_before_deletion";
functions[6] = "poll_changes";
functions[7] = "_calc_revisions_from_build";
functions[8] = "build_env_vars";
functions[9] = "get_module_root";
functions[10] = "get_module_root";
functions[11] = "get_module_roots";
functions[12] = "get_module_roots";
functions[13] = "get_descriptor";
int[] argsCount = new int[14];
argsCount[0] = 0;
argsCount[1] = 0;
argsCount[2] = 0;
argsCount[3] = 0;
argsCount[4] = 0;
argsCount[5] = 3;
argsCount[6] = 4;
argsCount[7] = 3;
argsCount[8] = 2;
argsCount[9] = 2;
argsCount[10] = 1;
argsCount[11] = 2;
argsCount[12] = 1;
argsCount[13] = 0;
pexec.registerFunctions(functions, argsCount);
}
}
@Override
public SCMRevisionState calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException {
initPython();
return (SCMRevisionState) pexec.execPython("calc_revisions_from_build", build, launcher, listener);
}
@Override
public PollingResult compareRemoteRevisionWith(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener, SCMRevisionState baseline) throws IOException,
InterruptedException {
initPython();
return (PollingResult) pexec.execPython("compare_remote_revision_with", project, launcher, workspace, listener, baseline);
}
@Override
public boolean checkout(AbstractBuild<?, ?> build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) throws IOException, InterruptedException {
initPython();
return pexec.execPythonBool("checkout", build, launcher, workspace, listener, changelogFile);
}
@Override
public ChangeLogParser createChangeLogParser() {
initPython();
return (ChangeLogParser) pexec.execPython("create_change_log_parser");
}
@Override
public Api getApi() {
initPython();
if (pexec.isImplemented(0)) {
return (Api) pexec.execPython("get_api");
} else {
return super.getApi();
}
}
@Override
public RepositoryBrowser<?> getBrowser() {
initPython();
if (pexec.isImplemented(1)) {
return (RepositoryBrowser) pexec.execPython("get_browser");
} else {
return super.getBrowser();
}
}
@Override
@Exported
public String getType() {
initPython();
if (pexec.isImplemented(2)) {
return (String) pexec.execPython("get_type");
} else {
return super.getType();
}
}
@Override
public boolean supportsPolling() {
initPython();
if (pexec.isImplemented(3)) {
return pexec.execPythonBool("supports_polling");
} else {
return super.supportsPolling();
}
}
@Override
public boolean requiresWorkspaceForPolling() {
initPython();
if (pexec.isImplemented(4)) {
return pexec.execPythonBool("requires_workspace_for_polling");
} else {
return super.requiresWorkspaceForPolling();
}
}
@Override
public boolean processWorkspaceBeforeDeletion(AbstractProject<?, ?> project, FilePath workspace, Node node) throws IOException, InterruptedException {
initPython();
if (pexec.isImplemented(5)) {
return pexec.execPythonBool("process_workspace_before_deletion", project, workspace, node);
} else {
return super.processWorkspaceBeforeDeletion(project, workspace, node);
}
}
@Override
public boolean pollChanges(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener) throws IOException, InterruptedException {
initPython();
if (pexec.isImplemented(6)) {
return pexec.execPythonBool("poll_changes", project, launcher, workspace, listener);
} else {
return super.pollChanges(project, launcher, workspace, listener);
}
}
@Override
public SCMRevisionState _calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException {
initPython();
if (pexec.isImplemented(7)) {
return (SCMRevisionState) pexec.execPython("_calc_revisions_from_build", build, launcher, listener);
} else {
return super._calcRevisionsFromBuild(build, launcher, listener);
}
}
@Override
public void buildEnvVars(AbstractBuild<?, ?> build, Map<String, String> env) {
initPython();
if (pexec.isImplemented(8)) {
pexec.execPythonVoid("build_env_vars", build, env);
} else {
super.buildEnvVars(build, env);
}
}
@Override
public FilePath getModuleRoot(FilePath workspace, AbstractBuild build) {
initPython();
if (pexec.isImplemented(9)) {
return (FilePath) pexec.execPython("get_module_root", workspace, build);
} else {
return super.getModuleRoot(workspace, build);
}
}
@Override
public FilePath getModuleRoot(FilePath workspace) {
initPython();
if (pexec.isImplemented(10)) {
return (FilePath) pexec.execPython("get_module_root", workspace);
} else {
return super.getModuleRoot(workspace);
}
}
@Override
public FilePath[] getModuleRoots(FilePath workspace, AbstractBuild build) {
initPython();
if (pexec.isImplemented(11)) {
return (FilePath[]) pexec.execPython("get_module_roots", workspace, build);
} else {
return super.getModuleRoots(workspace, build);
}
}
@Override
public FilePath[] getModuleRoots(FilePath workspace) {
initPython();
if (pexec.isImplemented(12)) {
return (FilePath[]) pexec.execPython("get_module_roots", workspace);
} else {
return super.getModuleRoots(workspace);
}
}
@Override
public SCMDescriptor<?> getDescriptor() {
initPython();
if (pexec.isImplemented(13)) {
return (SCMDescriptor) pexec.execPython("get_descriptor");
} else {
return super.getDescriptor();
}
}
public Api superGetApi() {
return super.getApi();
}
public RepositoryBrowser<?> superGetBrowser() {
return super.getBrowser();
}
public String superGetType() {
return super.getType();
}
public boolean superSupportsPolling() {
return super.supportsPolling();
}
public boolean superRequiresWorkspaceForPolling() {
return super.requiresWorkspaceForPolling();
}
public boolean superProcessWorkspaceBeforeDeletion(AbstractProject<?, ?> project, FilePath workspace, Node node) throws IOException, InterruptedException {
return super.processWorkspaceBeforeDeletion(project, workspace, node);
}
public boolean superPollChanges(AbstractProject<?, ?> project, Launcher launcher, FilePath workspace, TaskListener listener) throws IOException, InterruptedException {
return super.pollChanges(project, launcher, workspace, listener);
}
public SCMRevisionState super_calcRevisionsFromBuild(AbstractBuild<?, ?> build, Launcher launcher, TaskListener listener) throws IOException, InterruptedException {
return super._calcRevisionsFromBuild(build, launcher, listener);
}
public void superBuildEnvVars(AbstractBuild<?, ?> build, Map<String, String> env) {
super.buildEnvVars(build, env);
}
public FilePath superGetModuleRoot(FilePath workspace, AbstractBuild build) {
return super.getModuleRoot(workspace, build);
}
public FilePath superGetModuleRoot(FilePath workspace) {
return super.getModuleRoot(workspace);
}
public FilePath[] superGetModuleRoots(FilePath workspace, AbstractBuild build) {
return super.getModuleRoots(workspace, build);
}
public FilePath[] superGetModuleRoots(FilePath workspace) {
return super.getModuleRoots(workspace);
}
public SCMDescriptor<?> 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);
}
}