-
Notifications
You must be signed in to change notification settings - Fork 748
Expand file tree
/
Copy pathCasCGlobalConfig.java
More file actions
59 lines (48 loc) · 1.39 KB
/
CasCGlobalConfig.java
File metadata and controls
59 lines (48 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package io.jenkins.plugins.casc;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import jenkins.model.GlobalConfiguration;
import net.sf.json.JSONObject;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;
import org.kohsuke.stapler.StaplerRequest2;
/**
*
*/
@Extension
public class CasCGlobalConfig extends GlobalConfiguration {
private String configurationPath;
private boolean strictExport = false;
@DataBoundConstructor
public CasCGlobalConfig(String configurationPath) {
this.configurationPath = configurationPath;
}
public CasCGlobalConfig() {
load();
}
@NonNull
@Override
public String getDisplayName() {
return "CasC configuration";
}
public String getConfigurationPath() {
return configurationPath;
}
@DataBoundSetter
public void setConfigurationPath(String configurationPath) {
this.configurationPath = configurationPath;
}
public boolean isStrictExport() {
return strictExport;
}
@DataBoundSetter
public void setStrictExport(boolean strictExport) {
this.strictExport = strictExport;
}
@Override
public boolean configure(StaplerRequest2 req, JSONObject json) throws FormException {
req.bindJSON(this, json);
save();
return super.configure(req, json);
}
}