本文整理了Java中hudson.model.Job.setDescription()
方法的一些代码示例,展示了Job.setDescription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Job.setDescription()
方法的具体详情如下:
包路径:hudson.model.Job
类名称:Job
方法名:setDescription
暂无
代码示例来源:origin: jenkinsci/jenkins
/**
* Accepts and serves the job description
*/
public void doDescription(StaplerRequest req, StaplerResponse rsp)
throws IOException {
if (req.getMethod().equals("GET")) {
//read
rsp.setContentType("text/plain;charset=UTF-8");
rsp.getWriter().write(Util.fixNull(this.getDescription()));
return;
}
if (req.getMethod().equals("POST")) {
checkPermission(CONFIGURE);
// submission
if (req.getParameter("description") != null) {
this.setDescription(req.getParameter("description"));
rsp.sendError(SC_NO_CONTENT);
return;
}
}
// huh?
rsp.sendError(SC_BAD_REQUEST);
}
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
public void superSetDescription(String description) throws IOException {
super.setDescription(description);
}
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
@Override
public void setDescription(String description) throws IOException {
initPython();
if (pexec.isImplemented(84)) {
pexec.execPythonVoid("set_description", description);
} else {
super.setDescription(description);
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Accepts and serves the job description
*/
public void doDescription(StaplerRequest req, StaplerResponse rsp)
throws IOException {
if (req.getMethod().equals("GET")) {
//read
rsp.setContentType("text/plain;charset=UTF-8");
rsp.getWriter().write(this.getDescription());
return;
}
if (req.getMethod().equals("POST")) {
checkPermission(CONFIGURE);
// submission
if (req.getParameter("description") != null) {
this.setDescription(req.getParameter("description"));
rsp.sendError(SC_NO_CONTENT);
return;
}
}
// huh?
rsp.sendError(SC_BAD_REQUEST);
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Accepts and serves the job description
*/
public void doDescription(StaplerRequest req, StaplerResponse rsp)
throws IOException {
if (req.getMethod().equals("GET")) {
//read
rsp.setContentType("text/plain;charset=UTF-8");
rsp.getWriter().write(this.getDescription());
return;
}
if (req.getMethod().equals("POST")) {
checkPermission(CONFIGURE);
// submission
if (req.getParameter("description") != null) {
this.setDescription(req.getParameter("description"));
rsp.sendError(SC_NO_CONTENT);
return;
}
}
// huh?
rsp.sendError(SC_BAD_REQUEST);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Accepts and serves the job description
*/
public void doDescription(StaplerRequest req, StaplerResponse rsp)
throws IOException {
if (req.getMethod().equals("GET")) {
//read
rsp.setContentType("text/plain;charset=UTF-8");
rsp.getWriter().write(this.getDescription());
return;
}
if (req.getMethod().equals("POST")) {
checkPermission(CONFIGURE);
// submission
if (req.getParameter("description") != null) {
this.setDescription(req.getParameter("description"));
rsp.sendError(SC_NO_CONTENT);
return;
}
}
// huh?
rsp.sendError(SC_BAD_REQUEST);
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Accepts and serves the job description
*/
public void doDescription(StaplerRequest req, StaplerResponse rsp)
throws IOException {
if (req.getMethod().equals("GET")) {
//read
rsp.setContentType("text/plain;charset=UTF-8");
rsp.getWriter().write(this.getDescription());
return;
}
if (req.getMethod().equals("POST")) {
checkPermission(CONFIGURE);
// submission
if (req.getParameter("description") != null) {
this.setDescription(req.getParameter("description"));
rsp.sendError(SC_NO_CONTENT);
return;
}
}
// huh?
rsp.sendError(SC_BAD_REQUEST);
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Accepts and serves the job description
*/
public void doDescription(StaplerRequest req, StaplerResponse rsp)
throws IOException {
if (req.getMethod().equals("GET")) {
//read
rsp.setContentType("text/plain;charset=UTF-8");
rsp.getWriter().write(Util.fixNull(this.getDescription()));
return;
}
if (req.getMethod().equals("POST")) {
checkPermission(CONFIGURE);
// submission
if (req.getParameter("description") != null) {
this.setDescription(req.getParameter("description"));
rsp.sendError(SC_NO_CONTENT);
return;
}
}
// huh?
rsp.sendError(SC_BAD_REQUEST);
}
内容来源于网络,如有侵权,请联系作者删除!