本文整理了Java中hudson.Plugin.configure()
方法的一些代码示例,展示了Plugin.configure()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Plugin.configure()
方法的具体详情如下:
包路径:hudson.Plugin
类名称:Plugin
方法名:configure
暂无
代码示例来源:origin: jenkinsci/jenkins
/**
* Handles the submission for the system configuration.
*
* <p>
* If this class defines {@code config.jelly} view, be sure to
* override this method and persists the submitted values accordingly.
*
* <p>
* The following is a sample {@code config.jelly} that you can start yours with:
* <pre>{@code <xmp>
* <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
* <f:section title="Locale">
* <f:entry title="${%Default Language}" help="/plugin/locale/help/default-language.html">
* <f:textbox name="systemLocale" value="${it.systemLocale}" />
* </f:entry>
* </f:section>
* </j:jelly>
* </xmp>}</pre>
*
* <p>
* This allows you to access data as {@code formData.getString("systemLocale")}
*
* <p>
* If you are using this method, you'll likely be interested in
* using {@link #save()} and {@link #load()}.
* @since 1.305
*/
public void configure(StaplerRequest req, JSONObject formData) throws IOException, ServletException, FormException {
configure(formData);
}
代码示例来源:origin: jenkinsci/jenkins
@Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
try {
for( JSONObject o : StructuredForm.toList(json, "plugin"))
Jenkins.get().pluginManager.getPlugin(o.getString("name")).getPlugin().configure(req, o);
return true;
} catch (IOException | ServletException e) {
throw new FormException(e,"plugin");
}
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Handles the submission for the system configuration.
*
* <p> If this class defines <tt>config.jelly</tt> view, be sure to override
* this method and persists the submitted values accordingly.
*
* <p> The following is a sample <tt>config.jelly</tt> that you can start
* yours with:
* <pre><xmp>
* <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
* <f:section title="Locale">
* <f:entry title="${%Default Language}" help="/plugin/locale/help/default-language.html">
* <f:textbox name="systemLocale" value="${it.systemLocale}" />
* </f:entry>
* </f:section>
* </j:jelly>
* </xmp></pre>
*
* <p> This allows you to access data as
* {@code formData.getString("systemLocale")}
*
* <p> If you are using this method, you'll likely be interested in using
* {@link #save()} and {@link #load()}.
*
* @since 1.305
*/
public void configure(StaplerRequest req, JSONObject formData) throws IOException, ServletException, FormException {
configure(formData);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Handles the submission for the system configuration.
*
* <p>
* If this class defines <tt>config.jelly</tt> view, be sure to
* override this method and persists the submitted values accordingly.
*
* <p>
* The following is a sample <tt>config.jelly</tt> that you can start yours with:
* <pre><xmp>
* <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
* <f:section title="Locale">
* <f:entry title="${%Default Language}" help="/plugin/locale/help/default-language.html">
* <f:textbox name="systemLocale" value="${it.systemLocale}" />
* </f:entry>
* </f:section>
* </j:jelly>
* </xmp></pre>
*
* <p>
* This allows you to access data as {@code formData.getString("systemLocale")}
*
* <p>
* If you are using this method, you'll likely be interested in
* using {@link #save()} and {@link #load()}.
* @since 1.305
*/
public void configure(StaplerRequest req, JSONObject formData) throws IOException, ServletException, FormException {
configure(formData);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Handles the submission for the system configuration.
*
* <p>
* If this class defines <tt>config.jelly</tt> view, be sure to
* override this method and persists the submitted values accordingly.
*
* <p>
* The following is a sample <tt>config.jelly</tt> that you can start yours with:
* <pre>{@code <xmp>
* <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
* <f:section title="Locale">
* <f:entry title="${%Default Language}" help="/plugin/locale/help/default-language.html">
* <f:textbox name="systemLocale" value="${it.systemLocale}" />
* </f:entry>
* </f:section>
* </j:jelly>
* </xmp>}</pre>
*
* <p>
* This allows you to access data as {@code formData.getString("systemLocale")}
*
* <p>
* If you are using this method, you'll likely be interested in
* using {@link #save()} and {@link #load()}.
* @since 1.305
*/
public void configure(StaplerRequest req, JSONObject formData) throws IOException, ServletException, FormException {
configure(formData);
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Handles the submission for the system configuration.
*
* <p>
* If this class defines <tt>config.jelly</tt> view, be sure to
* override this method and persists the submitted values accordingly.
*
* <p>
* The following is a sample <tt>config.jelly</tt> that you can start yours with:
* <pre><xmp>
* <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
* <f:section title="Locale">
* <f:entry title="${%Default Language}" help="/plugin/locale/help/default-language.html">
* <f:textbox name="systemLocale" value="${it.systemLocale}" />
* </f:entry>
* </f:section>
* </j:jelly>
* </xmp></pre>
*
* <p>
* This allows you to access data as {@code formData.getString("systemLocale")}
*
* <p>
* If you are using this method, you'll likely be interested in
* using {@link #save()} and {@link #load()}.
* @since 1.305
*/
public void configure(StaplerRequest req, JSONObject formData) throws IOException, ServletException, FormException {
configure(formData);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Handles the submission for the system configuration.
*
* <p>
* If this class defines <tt>config.jelly</tt> view, be sure to
* override this method and persists the submitted values accordingly.
*
* <p>
* The following is a sample <tt>config.jelly</tt> that you can start yours with:
* <pre><xmp>
* <j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
* <f:section title="Locale">
* <f:entry title="${%Default Language}" help="/plugin/locale/help/default-language.html">
* <f:textbox name="systemLocale" value="${it.systemLocale}" />
* </f:entry>
* </f:section>
* </j:jelly>
* </xmp></pre>
*
* <p>
* This allows you to access data as {@code formData.getString("systemLocale")}
*
* <p>
* If you are using this method, you'll likely be interested in
* using {@link #save()} and {@link #load()}.
* @since 1.305
*/
public void configure(StaplerRequest req, JSONObject formData) throws IOException, ServletException, FormException {
configure(formData);
}
代码示例来源:origin: timols/jenkins-gitlab-merge-request-builder-plugin
@Override
public void configure(StaplerRequest req, JSONObject formData) throws ServletException, Descriptor.FormException, IOException {
super.configure(req, formData);
save();
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
try {
for( JSONObject o : StructuredForm.toList(json, "plugin"))
Jenkins.getInstance().pluginManager.getPlugin(o.getString("name")).getPlugin().configure(req, o);
return true;
} catch (IOException | ServletException e) {
throw new FormException(e,"plugin");
}
}
}
代码示例来源:origin: jenkinsci/selenium-plugin
@Override
public void configure(StaplerRequest req, JSONObject formData)
throws IOException, ServletException, Descriptor.FormException {
super.configure(req, formData);
port = formData.optInt("port", 4444);
exclusionPatterns = formData.getString("exclusionPatterns");
hubLogLevel = formData.getString("hubLogLevel");
newSessionWaitTimeout = formData.optInt("newSessionWaitTimeout", -1);
maxSession = formData.optInt("maxSession", 5);
timeout = formData.optInt("timeout", 300000);
browserTimeout = formData.optInt("browserTimeout", 0);
throwOnCapabilityNotPresent = formData.getBoolean("throwOnCapabilityNotPresent");
hostnameResolver = req.bindJSON(HostnameResolver.class, formData.optJSONObject("hostnameResolver"));
if (hostnameResolver == null)
hostnameResolver = new JenkinsRootHostnameResolver();
save();
}
代码示例来源:origin: jenkinsci/scm-sync-configuration-plugin
@Override
public void configure(StaplerRequest req, JSONObject formData)
throws IOException, ServletException, FormException {
super.configure(req, formData);
代码示例来源:origin: org.eclipse.hudson/hudson-core
pluginManager.getPlugin(o.getString("name")).getPlugin().configure(req, o);
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
pluginManager.getPlugin(o.getString("name")).getPlugin().configure(req, o);
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
pluginManager.getPlugin(o.getString("name")).getPlugin().configure(req, o);
代码示例来源:origin: hudson/hudson-2.x
pluginManager.getPlugin(o.getString("name")).getPlugin().configure(req, o);
内容来源于网络,如有侵权,请联系作者删除!