Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JENKINS-15882 - rebuild plugin should not store non-stored password p…
…arameter - fixed review comment
- Loading branch information
1 parent
16dd397
commit 6678b8e
Showing
8 changed files
with
75 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,8 @@ work | |
.classpath | ||
.project | ||
.settings | ||
### IntelliJ ### | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
src/main/java/com/sonyericsson/rebuild/RebuildDescriptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package com.sonyericsson.rebuild; | ||
|
||
import jenkins.model.GlobalConfiguration; | ||
import net.sf.json.JSONObject; | ||
import org.kohsuke.stapler.StaplerRequest; | ||
|
||
/** | ||
* This class holds the configuration values for the rebuild action. | ||
*/ | ||
public final class RebuildDescriptor extends GlobalConfiguration { | ||
private final RebuildConfiguration rebuildConfiguration = new RebuildConfiguration(Boolean.TRUE); | ||
|
||
/** | ||
* Constructs a new Descriptor implementation. | ||
*/ | ||
public RebuildDescriptor() { | ||
load(); | ||
} | ||
|
||
@Override | ||
public String getDisplayName() { | ||
return "Rebuild"; | ||
} | ||
|
||
@Override | ||
public boolean configure(StaplerRequest req, JSONObject formData) throws FormException { | ||
this.rebuildConfiguration.rememberPasswordEnabled = Boolean.valueOf(formData.getString("rememberPasswordEnabled")); | ||
save(); | ||
return true; | ||
} | ||
|
||
/** | ||
* Gets the configuration object. | ||
* | ||
* @return the configuration object. | ||
*/ | ||
public RebuildConfiguration getRebuildConfiguration() { | ||
return rebuildConfiguration; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.