提交 bba45aff 编写于 作者: K kohsuke

use structured form submission.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@5943 71c3de6d-444a-0410-be80-ed276b4c234a
上级 e5191fa4
package hudson.tasks;
import hudson.FilePath;
import hudson.Launcher;
import hudson.Util;
import hudson.model.Build;
import hudson.model.BuildListener;
import hudson.model.Descriptor;
import hudson.model.Project;
import net.sf.json.JSONObject;
import org.kohsuke.stapler.StaplerRequest;
import java.io.IOException;
/**
* Executes commands by using Windows batch file.
*
......@@ -52,8 +46,8 @@ public class BatchFile extends CommandInterpreter {
return "Execute Windows batch command";
}
public Builder newInstance(StaplerRequest req) {
return new BatchFile(req.getParameter("batchFile"));
public Builder newInstance(StaplerRequest req, JSONObject data) {
return new BatchFile(data.getString("batchFile"));
}
}
}
......@@ -7,6 +7,8 @@ import org.kohsuke.stapler.StaplerRequest;
import java.util.Map;
import net.sf.json.JSONObject;
/**
* Executes a series of commands by using a shell.
*
......@@ -92,8 +94,8 @@ public class Shell extends CommandInterpreter {
return "Execute shell";
}
public Builder newInstance(StaplerRequest req) {
return new Shell(req.getParameter("shell"));
public Builder newInstance(StaplerRequest req, JSONObject data) {
return new Shell(data.getString("shell"));
}
public boolean configure( StaplerRequest req ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册