mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-09 10:06:13 +00:00
Added a mechanism to perform a bulk change without intermediate save().
This allows us to define more setter methods on configuration values, which in turn improves the ability to make programatic changes to the configuration, which in turn improves testability. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@11515 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
1 parent
bfaf4a427d
commit
8339f02284
13 files changed
+218
-15
No files matched your search
@@ -2,6 +2,7 @@ package hudson;
|
||||
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import hudson.model.Hudson;
|
||||
import hudson.model.Saveable;
|
||||
import hudson.util.XStream2;
|
||||
import hudson.util.Scrambler;
|
||||
|
||||
@@ -20,7 +21,7 @@ import java.net.URL;
|
||||
*
|
||||
* @see Hudson#proxy
|
||||
*/
|
||||
public final class ProxyConfiguration {
|
||||
public final class ProxyConfiguration implements Saveable {
|
||||
public final String name;
|
||||
public final int port;
|
||||
|
||||
@@ -54,6 +55,7 @@ public final class ProxyConfiguration {
|
||||
}
|
||||
|
||||
public void save() throws IOException {
|
||||
if(BulkChange.contains(this)) return;
|
||||
getXmlFile().write(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user