File D:\maven-qcr-plugin-testsunitaires\qcr4java\jenkins-master\target\site\qc\core\src\main\java\jenkins\model\GlobalCloudConfiguration.java.html

1 package jenkins.model;
2
3 import hudson.Extension;
4 import hudson.slaves.Cloud;
5 import net.sf.json.JSONObject;
6 import org.kohsuke.stapler.StaplerRequest;
7
8 import java.io.IOException;
9
10 /**
11 * Adds the {@link Cloud} configuration to the system config page.
12 *
13 * <p>
14 * This object just acts as a proxy to configure {@link Jenkins#clouds}
15 *
16 * @author Kohsuke Kawaguchi
17 */
18 @Extension(ordinal=-100) // historically this was placed at the very end of the configuration page
19 public class GlobalCloudConfiguration extends GlobalConfiguration {
20 @Override
21 public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
22 try {
23 Jenkins.getInstance().clouds.rebuildHetero(req,json, Cloud.all(), "cloud");
24 return true;
25 } catch (IOException e) {
26 throw new FormException(e,"clouds");
27 }
28 }
29 }
30