package jenkins.python.expoint; import hudson.BulkChange; import hudson.Extension; import hudson.ExtensionPoint; import hudson.Functions; import hudson.PluginManager; import hudson.PluginWrapper; import hudson.ProxyConfiguration; import hudson.Util; import hudson.XmlFile; import hudson.init.Initializer; import hudson.lifecycle.Lifecycle; import hudson.lifecycle.RestartNotSupportedException; import hudson.model.UpdateSite.Data; import hudson.model.UpdateSite.Plugin; import hudson.model.listeners.SaveableListener; import hudson.security.ACL; import hudson.util.DaemonThreadFactory; import hudson.util.FormValidation; import hudson.util.HttpResponses; import hudson.util.IOException2; import hudson.util.PersistedList; import hudson.util.XStream2; import jenkins.RestartRequiredException; import jenkins.model.Jenkins; import jenkins.util.io.OnMaster; import org.acegisecurity.Authentication; import org.acegisecurity.context.SecurityContext; import org.apache.commons.io.input.CountingInputStream; import org.apache.commons.io.output.NullOutputStream; import org.jvnet.localizer.Localizable; import org.kohsuke.stapler.HttpResponse; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse; import javax.net.ssl.SSLHandshakeException; import javax.servlet.ServletException; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.net.UnknownHostException; import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; import java.util.Vector; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; import java.util.jar.Attributes; import java.util.jar.JarFile; import java.util.logging.Level; import java.util.logging.Logger; import javax.annotation.CheckForNull; import org.acegisecurity.context.SecurityContextHolder; import org.kohsuke.stapler.export.Exported; import org.kohsuke.stapler.export.ExportedBean; import org.kohsuke.stapler.interceptor.RequirePOST; import hudson.model.*; import hudson.model.UpdateCenter.UpdateCenterConfiguration.*; import hudson.model.UpdateCenter.*; import jenkins.python.DataConvertor; import jenkins.python.PythonExecutor; /** * This class was automatically generated by the PWM tool on 2014/03/21. * @see hudson.model.UpdateCenter.UpdateCenterConfiguration */ public abstract class UpdateCenterConfigurationPW extends UpdateCenterConfiguration { 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[11]; functions[0] = "check_connection"; functions[1] = "check_update_center"; functions[2] = "pre_validate"; functions[3] = "post_validate"; functions[4] = "download"; functions[5] = "connect"; functions[6] = "install"; functions[7] = "upgrade"; functions[8] = "get_connection_check_url"; functions[9] = "get_update_center_url"; functions[10] = "get_plugin_repository_base_url"; int[] argsCount = new int[11]; argsCount[0] = 2; argsCount[1] = 2; argsCount[2] = 2; argsCount[3] = 2; argsCount[4] = 2; argsCount[5] = 2; argsCount[6] = 3; argsCount[7] = 3; argsCount[8] = 0; argsCount[9] = 0; argsCount[10] = 0; pexec.registerFunctions(functions, argsCount); } } public UpdateCenterConfigurationPW() { super(); } @Override public void checkConnection(ConnectionCheckJob job, String connectionCheckUrl) throws IOException { initPython(); if (pexec.isImplemented(0)) { pexec.execPythonVoid("check_connection", job, connectionCheckUrl); } else { super.checkConnection(job, connectionCheckUrl); } } @Override public void checkUpdateCenter(ConnectionCheckJob job, String updateCenterUrl) throws IOException { initPython(); if (pexec.isImplemented(1)) { pexec.execPythonVoid("check_update_center", job, updateCenterUrl); } else { super.checkUpdateCenter(job, updateCenterUrl); } } @Override public void preValidate(DownloadJob job, URL src) throws IOException { initPython(); if (pexec.isImplemented(2)) { pexec.execPythonVoid("pre_validate", job, src); } else { super.preValidate(job, src); } } @Override public void postValidate(DownloadJob job, File src) throws IOException { initPython(); if (pexec.isImplemented(3)) { pexec.execPythonVoid("post_validate", job, src); } else { super.postValidate(job, src); } } @Override public File download(DownloadJob job, URL src) throws IOException { initPython(); if (pexec.isImplemented(4)) { return (File) pexec.execPython("download", job, src); } else { return super.download(job, src); } } @Override public URLConnection connect(DownloadJob job, URL src) throws IOException { initPython(); if (pexec.isImplemented(5)) { return (URLConnection) pexec.execPython("connect", job, src); } else { return super.connect(job, src); } } @Override public void install(DownloadJob job, File src, File dst) throws IOException { initPython(); if (pexec.isImplemented(6)) { pexec.execPythonVoid("install", job, src, dst); } else { super.install(job, src, dst); } } @Override public void upgrade(DownloadJob job, File src, File dst) throws IOException { initPython(); if (pexec.isImplemented(7)) { pexec.execPythonVoid("upgrade", job, src, dst); } else { super.upgrade(job, src, dst); } } @Override public String getConnectionCheckUrl() { initPython(); if (pexec.isImplemented(8)) { return (String) pexec.execPython("get_connection_check_url"); } else { return super.getConnectionCheckUrl(); } } @Override public String getUpdateCenterUrl() { initPython(); if (pexec.isImplemented(9)) { return (String) pexec.execPython("get_update_center_url"); } else { return super.getUpdateCenterUrl(); } } @Override public String getPluginRepositoryBaseUrl() { initPython(); if (pexec.isImplemented(10)) { return (String) pexec.execPython("get_plugin_repository_base_url"); } else { return super.getPluginRepositoryBaseUrl(); } } public void superCheckConnection(ConnectionCheckJob job, String connectionCheckUrl) throws IOException { super.checkConnection(job, connectionCheckUrl); } public void superCheckUpdateCenter(ConnectionCheckJob job, String updateCenterUrl) throws IOException { super.checkUpdateCenter(job, updateCenterUrl); } public void superPreValidate(DownloadJob job, URL src) throws IOException { super.preValidate(job, src); } public void superPostValidate(DownloadJob job, File src) throws IOException { super.postValidate(job, src); } public File superDownload(DownloadJob job, URL src) throws IOException { return super.download(job, src); } public URLConnection superConnect(DownloadJob job, URL src) throws IOException { return super.connect(job, src); } public void superInstall(DownloadJob job, File src, File dst) throws IOException { super.install(job, src, dst); } public void superUpgrade(DownloadJob job, File src, File dst) throws IOException { super.upgrade(job, src, dst); } public String superGetConnectionCheckUrl() { return super.getConnectionCheckUrl(); } public String superGetUpdateCenterUrl() { return super.getUpdateCenterUrl(); } public String superGetPluginRepositoryBaseUrl() { return super.getPluginRepositoryBaseUrl(); } 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); } }