@Override public void calcFillSettings(String field, Map<String, Object> attributes) { initPython(); if (pexec.isImplemented(5)) { pexec.execPythonVoid("calc_fill_settings", field, attributes); } else { super.calcFillSettings(field, attributes); } }
@Override public String getCheckUrl(String fieldName) { initPython(); if (pexec.isImplemented(4)) { return (String) pexec.execPython("get_check_url", fieldName); } else { return super.getCheckUrl(fieldName); } }
@Override public String getDescriptorUrl() { initPython(); if (pexec.isImplemented(3)) { return (String) pexec.execPython("get_descriptor_url"); } else { return super.getDescriptorUrl(); } }
@Override public Class<ToolInstaller> getT() { initPython(); if (pexec.isImplemented(2)) { return (Class) pexec.execPython("get_t"); } else { return super.getT(); } }
@Override public void calcAutoCompleteSettings(String field, Map<String, Object> attributes) { initPython(); if (pexec.isImplemented(6)) { pexec.execPythonVoid("calc_auto_complete_settings", field, attributes); } else { super.calcAutoCompleteSettings(field, attributes); } }
@Override public boolean configure(StaplerRequest req, JSONObject json) throws FormException { initPython(); if (pexec.isImplemented(19)) { return pexec.execPythonBool("configure", req, json); } else { return super.configure(req, json); } }
@Override public boolean isApplicable(Class<? extends ToolInstallation> toolType) { initPython(); if (pexec.isImplemented(0)) { return pexec.execPythonBool("is_applicable", toolType); } else { return super.isApplicable(toolType); } }
@Override public XmlFile getConfigFile() { initPython(); if (pexec.isImplemented(25)) { return (XmlFile) pexec.execPython("get_config_file"); } else { return super.getConfigFile(); } }
@Override public PluginWrapper getPlugin() { initPython(); if (pexec.isImplemented(26)) { return (PluginWrapper) pexec.execPython("get_plugin"); } else { return super.getPlugin(); } }
@Override public PropertyType getGlobalPropertyType(String field) { initPython(); if (pexec.isImplemented(10)) { return (PropertyType) pexec.execPython("get_global_property_type", field); } else { return super.getGlobalPropertyType(field); } }
@Override public synchronized void load() { initPython(); if (pexec.isImplemented(24)) { pexec.execPythonVoid("load"); } else { super.load(); } }
@Override public String getGlobalConfigPage() { initPython(); if (pexec.isImplemented(21)) { return (String) pexec.execPython("get_global_config_page"); } else { return super.getGlobalConfigPage(); } }
@Override public List<String> getPossibleViewNames(String baseName) { initPython(); if (pexec.isImplemented(22)) { return (List) pexec.execPython("get_possible_view_names", baseName); } else { return super.getPossibleViewNames(baseName); } }
@Override public String getHelpFile(final String fieldName) { initPython(); if (pexec.isImplemented(15)) { return (String) pexec.execPython("get_help_file", fieldName); } else { return super.getHelpFile(fieldName); } }
@Override public String getId() { initPython(); if (pexec.isImplemented(1)) { return (String) pexec.execPython("get_id"); } else { return super.getId(); } }
@Override public String getHelpFile(Klass<?> clazz, String fieldName) { initPython(); if (pexec.isImplemented(16)) { return (String) pexec.execPython("get_help_file", clazz, fieldName); } else { return super.getHelpFile(clazz, fieldName); } }
@Override public String getHelpFile() { initPython(); if (pexec.isImplemented(14)) { return (String) pexec.execPython("get_help_file"); } else { return super.getHelpFile(); } }
@Override public Klass<?> getKlass() { initPython(); if (pexec.isImplemented(13)) { return (Klass) pexec.execPython("get_klass"); } else { return super.getKlass(); } }
@Override public ToolInstaller newInstance(StaplerRequest req, JSONObject formData) throws FormException { initPython(); if (pexec.isImplemented(12)) { return (ToolInstaller) pexec.execPython("new_instance", req, formData); } else { return super.newInstance(req, formData); } }
@Override public void doHelp(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { initPython(); if (pexec.isImplemented(27)) { pexec.execPythonVoid("do_help", req, rsp); } else { super.doHelp(req, rsp); } }
@Override public synchronized void save() { initPython(); if (pexec.isImplemented(23)) { pexec.execPythonVoid("save"); } else { super.save(); } }
@Override public void addHelpFileRedirect( String fieldName, Class<? extends Describable> owner, String fieldNameToRedirectTo) { initPython(); if (pexec.isImplemented(17)) { pexec.execPythonVoid("add_help_file_redirect", fieldName, owner, fieldNameToRedirectTo); } else { super.addHelpFileRedirect(fieldName, owner, fieldNameToRedirectTo); } }
@Override public @Nonnull PropertyType getPropertyTypeOrDie( @Nonnull Object instance, @Nonnull String field) { initPython(); if (pexec.isImplemented(8)) { return (PropertyType) pexec.execPython("get_property_type_or_die", instance, field); } else { return super.getPropertyTypeOrDie(instance, field); } }
private void initPython() { if (pexec == null) { pexec = new PythonExecutor(this); String[] jMethods = new String[1]; jMethods[0] = "getShortDescription"; String[] pFuncs = new String[1]; pFuncs[0] = "get_short_description"; Class[][] argTypes = new Class[1][]; argTypes[0] = new Class[0]; pexec.checkAbstrMethods(jMethods, pFuncs, argTypes); String[] functions = new String[0]; int[] argsCount = new int[0]; pexec.registerFunctions(functions, argsCount); } }
public void execPythonVoid(String function, Object... params) { initPython(); pexec.execPythonVoid(function, params); }
public boolean execPythonBool(String function, Object... params) { initPython(); return pexec.execPythonBool(function, params); }
public double execPythonDouble(String function, Object... params) { initPython(); return pexec.execPythonDouble(function, params); }
public float execPythonFloat(String function, Object... params) { initPython(); return pexec.execPythonFloat(function, params); }
public long execPythonLong(String function, Object... params) { initPython(); return pexec.execPythonLong(function, params); }
public char execPythonChar(String function, Object... params) { initPython(); return pexec.execPythonChar(function, params); }