本文整理了Java中hudson.model.Job.submit()
方法的一些代码示例,展示了Job.submit()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Job.submit()
方法的具体详情如下:
包路径:hudson.model.Job
类名称:Job
方法名:submit
[英]Derived class can override this to perform additional config submission work.
[中]派生类可以重写它以执行其他配置提交工作。
代码示例来源:origin: jenkinsci/jenkins
@Override
protected void submit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
super.submit(req,rsp);
// make sure to reload to reflect this config change.
nextUpdate = 0;
}
代码示例来源:origin: jenkinsci/jenkins
submit(req, rsp);
bc.commit();
代码示例来源:origin: jenkinsci/jenkins
@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
super.submit(req,rsp);
JSONObject json = req.getSubmittedForm();
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override
protected void submit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
super.submit(req,rsp);
// make sure to reload to reflect this config change.
nextUpdate = 0;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
@Override
protected void submit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
super.submit(req,rsp);
// make sure to reload to reflect this config change.
nextUpdate = 0;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
super.submit(req, rsp);
// make sure to reload to reflect this config change.
nextUpdate = 0;
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
@Override
protected void submit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
super.submit(req,rsp);
// make sure to reload to reflect this config change.
nextUpdate = 0;
}
代码示例来源:origin: hudson/hudson-2.x
@Override
protected void submit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException {
super.submit(req,rsp);
// make sure to reload to reflect this config change.
nextUpdate = 0;
}
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
public void superSubmit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
super.submit(req, rsp);
}
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
@Override
public void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
initPython();
if (pexec.isImplemented(65)) {
pexec.execPythonVoid("submit", req, rsp);
} else {
super.submit(req, rsp);
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Accepts submission from the configuration page.
*/
public synchronized void doConfigSubmit(StaplerRequest req,
StaplerResponse rsp) throws IOException, ServletException, FormException {
checkPermission(CONFIGURE);
try {
setAllowSave(false);
submit(req, rsp);
setAllowSave(true);
save();
String newName = req.getParameter("name");
if (newName != null && !newName.equals(name)) {
// check this error early to avoid HTTP response splitting.
Hudson.checkGoodName(newName);
rsp.sendRedirect("rename?newName=" + URLEncoder.encode(newName, "UTF-8"));
} else {
rsp.sendRedirect(".");
}
} catch (JSONException e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
pw.println("Failed to parse form data. Please report this problem as a bug");
pw.println("JSON=" + req.getSubmittedForm());
pw.println();
e.printStackTrace(pw);
rsp.setStatus(SC_BAD_REQUEST);
sendError(sw.toString(), req, rsp, true);
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Accepts submission from the configuration page.
*/
public synchronized void doConfigSubmit(StaplerRequest req,
StaplerResponse rsp) throws IOException, ServletException, FormException {
checkPermission(CONFIGURE);
try {
setAllowSave(false);
submit(req, rsp);
setAllowSave(true);
save();
String newName = req.getParameter("name");
if (newName != null && !newName.equals(name)) {
// check this error early to avoid HTTP response splitting.
Hudson.checkGoodName(newName);
rsp.sendRedirect("rename?newName=" + URLEncoder.encode(newName, "UTF-8"));
} else {
rsp.sendRedirect(".");
}
} catch (JSONException e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
pw.println("Failed to parse form data. Please report this problem as a bug");
pw.println("JSON=" + req.getSubmittedForm());
pw.println();
e.printStackTrace(pw);
rsp.setStatus(SC_BAD_REQUEST);
sendError(sw.toString(), req, rsp, true);
}
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Accepts submission from the configuration page.
*/
public synchronized void doConfigSubmit(StaplerRequest req,
StaplerResponse rsp) throws IOException, ServletException, FormException {
checkPermission(CONFIGURE);
try {
setAllowSave(false);
submit(req, rsp);
setAllowSave(true);
save();
String newName = req.getParameter("name");
if (newName != null && !newName.equals(name)) {
// check this error early to avoid HTTP response splitting.
Hudson.checkGoodName(newName);
rsp.sendRedirect("rename?newName=" + URLEncoder.encode(newName, "UTF-8"));
} else {
rsp.sendRedirect(".");
}
} catch (JSONException e) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
pw.println("Failed to parse form data. Please report this problem as a bug");
pw.println("JSON=" + req.getSubmittedForm());
pw.println();
e.printStackTrace(pw);
rsp.setStatus(SC_BAD_REQUEST);
sendError(sw.toString(), req, rsp, true);
}
}
代码示例来源:origin: org.jenkins-ci.plugins.workflow/workflow-job
@SuppressWarnings("deprecation")
@Override protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, Descriptor.FormException {
super.submit(req, rsp);
JSONObject json = req.getSubmittedForm();
definition = req.bindJSON(FlowDefinition.class, json.getJSONObject("definition"));
authToken = hudson.model.BuildAuthorizationToken.create(req);
if (req.getParameter("hasCustomQuietPeriod") != null) {
quietPeriod = Integer.parseInt(req.getParameter("quiet_period"));
} else {
quietPeriod = null;
}
makeDisabled(json.optBoolean("disable"));
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
try {
setAllowSave(false);
submit(req, rsp);
setAllowSave(true);
代码示例来源:origin: org.eclipse.hudson/hudson-core
@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
super.submit(req, rsp);
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
submit(req, rsp);
bc.commit();
代码示例来源:origin: hudson/hudson-2.x
@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
super.submit(req,rsp);
makeDisabled(null != req.getParameter("disable"));
setJDK(req.getParameter("jdk"));
setQuietPeriod(null != req.getParameter(HAS_QUIET_PERIOD_PROPERTY_NAME)
? req.getParameter("quiet_period") : null);
setScmCheckoutRetryCount(null != req.getParameter(HAS_SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)
? req.getParameter("scmCheckoutRetryCount") : null);
setBlockBuildWhenDownstreamBuilding(null != req.getParameter("blockBuildWhenDownstreamBuilding"));
setBlockBuildWhenUpstreamBuilding(null != req.getParameter("blockBuildWhenUpstreamBuilding"));
if (req.getParameter(APPOINTED_NODE_PROPERTY_NAME) != null) {
// New logic for handling whether this choice came from the dropdown or textfield.
if (BASIC_KEY.equals(req.getParameter(AFFINITY_CHO0SER_KEY))) {
setAppointedNode(
new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(SLAVE_KEY)), false));
} else {
setAppointedNode(
new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(ASSIGNED_LABEL_KEY)), true));
}
} else {
setAppointedNode(null);
}
setCleanWorkspaceRequired(null != req.getParameter("cleanWorkspaceRequired"));
setConcurrentBuild(req.getSubmittedForm().has("concurrentBuild"));
authToken = BuildAuthorizationToken.create(req);
setScm(SCMS.parseSCM(req,this));
buildTriggers(req, req.getSubmittedForm(), Trigger.for_(this));
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
super.submit(req, rsp);
makeDisabled(null != req.getParameter("disable"));
setJDK(req.getParameter("jdk"));
setQuietPeriod(null != req.getParameter(HAS_QUIET_PERIOD_PROPERTY_NAME)
? req.getParameter("quiet_period") : null);
setScmCheckoutRetryCount(null != req.getParameter(HAS_SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)
? req.getParameter("scmCheckoutRetryCount") : null);
setBlockBuildWhenDownstreamBuilding(null != req.getParameter("blockBuildWhenDownstreamBuilding"));
setBlockBuildWhenUpstreamBuilding(null != req.getParameter("blockBuildWhenUpstreamBuilding"));
if (req.getParameter(APPOINTED_NODE_PROPERTY_NAME) != null) {
// New logic for handling whether this choice came from the dropdown or textfield.
if (BASIC_KEY.equals(req.getParameter(AFFINITY_CHO0SER_KEY))) {
setAppointedNode(
new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(SLAVE_KEY)), false));
} else {
setAppointedNode(
new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(ASSIGNED_LABEL_KEY)), true));
}
} else {
setAppointedNode(null);
}
setCleanWorkspaceRequired(null != req.getParameter("cleanWorkspaceRequired"));
setConcurrentBuild(req.getSubmittedForm().has("concurrentBuild"));
authToken = BuildAuthorizationToken.create(req);
setScm(SCMS.parseSCM(req, this));
buildTriggers(req, req.getSubmittedForm(), Trigger.for_(this));
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
@Override
protected void submit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException, FormException {
super.submit(req,rsp);
makeDisabled(null != req.getParameter("disable"));
setJDK(req.getParameter("jdk"));
setQuietPeriod(null != req.getParameter(HAS_QUIET_PERIOD_PROPERTY_NAME)
? req.getParameter("quiet_period") : null);
setScmCheckoutRetryCount(null != req.getParameter(HAS_SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)
? req.getParameter("scmCheckoutRetryCount") : null);
setBlockBuildWhenDownstreamBuilding(null != req.getParameter("blockBuildWhenDownstreamBuilding"));
setBlockBuildWhenUpstreamBuilding(null != req.getParameter("blockBuildWhenUpstreamBuilding"));
if (req.getParameter(APPOINTED_NODE_PROPERTY_NAME) != null) {
// New logic for handling whether this choice came from the dropdown or textfield.
if (BASIC_KEY.equals(req.getParameter(AFFINITY_CHO0SER_KEY))) {
setAppointedNode(
new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(SLAVE_KEY)), false));
} else {
setAppointedNode(
new AppointedNode(Util.fixEmptyAndTrim(req.getParameter(ASSIGNED_LABEL_KEY)), true));
}
} else {
setAppointedNode(null);
}
setCleanWorkspaceRequired(null != req.getParameter("cleanWorkspaceRequired"));
setConcurrentBuild(req.getSubmittedForm().has("concurrentBuild"));
authToken = BuildAuthorizationToken.create(req);
setScm(SCMS.parseSCM(req,this));
buildTriggers(req, req.getSubmittedForm(), Trigger.for_(this));
}
内容来源于网络,如有侵权,请联系作者删除!