本文整理了Java中hudson.model.Job.getShortUrl()
方法的一些代码示例,展示了Job.getShortUrl()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Job.getShortUrl()
方法的具体详情如下:
包路径:hudson.model.Job
类名称:Job
方法名:getShortUrl
暂无
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
public String superGetShortUrl() {
return super.getShortUrl();
}
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
@Override
public String getShortUrl() {
initPython();
if (pexec.isImplemented(88)) {
return (String) pexec.execPython("get_short_url");
} else {
return super.getShortUrl();
}
}
代码示例来源:origin: jenkinsci/ghprb-plugin
String baseUrl = Jenkins.getInstance().getRootUrl() + build.getUrl() + project.getShortUrl() + "testReport";
代码示例来源:origin: org.hudsonci.plugins/analysis-core
/**
* Returns the total number of warnings for the specified job.
*
* @param job
* the job to get the warnings for
* @return the number of compiler warnings
*/
public String getWarnings(final Job<?, ?> job) {
AbstractProjectAction<?> action = selectAction(job);
if (action != null) {
ResultAction<?> lastAction = action.getLastAction();
if (lastAction != null) {
BuildResult result = lastAction.getResult();
int numberOfAnnotations = result.getNumberOfAnnotations();
String value;
if (numberOfAnnotations > 0) {
value = String.format("<a href=\"%s%s\">%d</a>", job.getShortUrl(), action.getUrlName(), numberOfAnnotations);
}
else {
value = String.valueOf(numberOfAnnotations);
}
if (result.isSuccessfulTouched() && !result.isSuccessful()) {
return value + result.getResultIcon();
}
return value;
}
}
return NO_RESULTS_FOUND;
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Renames this job.
*/
public/* not synchronized. see renameTo() */void doDoRename(
StaplerRequest req, StaplerResponse rsp) throws IOException,
ServletException {
requirePOST();
// rename is essentially delete followed by a create
checkPermission(CREATE);
checkPermission(DELETE);
String newName = req.getParameter("newName");
Hudson.checkGoodName(newName);
if (isBuilding()) {
// redirect to page explaining that we can't rename now
rsp.sendRedirect("rename?newName=" + URLEncoder.encode(newName, "UTF-8"));
return;
}
renameTo(newName);
// send to the new job page
// note we can't use getUrl() because that would pick up old name in the
// Ancestor.getUrl()
rsp.sendRedirect2(req.getContextPath() + '/' + getParent().getUrl()
+ getShortUrl());
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Renames this job.
*/
public/* not synchronized. see renameTo() */ void doDoRename(
StaplerRequest req, StaplerResponse rsp) throws IOException,
ServletException {
requirePOST();
// rename is essentially delete followed by a create
checkPermission(CREATE);
checkPermission(DELETE);
String newName = req.getParameter("newName");
Hudson.checkGoodName(newName);
if (isBuilding()) {
// redirect to page explaining that we can't rename now
rsp.sendRedirect("rename?newName=" + URLEncoder.encode(newName, "UTF-8"));
return;
}
renameTo(newName);
// send to the new job page
// note we can't use getUrl() because that would pick up old name in the
// Ancestor.getUrl()
rsp.sendRedirect2(req.getContextPath() + '/' + getParent().getUrl()
+ getShortUrl());
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Renames this job.
*/
public/* not synchronized. see renameTo() */void doDoRename(
StaplerRequest req, StaplerResponse rsp) throws IOException,
ServletException {
requirePOST();
// rename is essentially delete followed by a create
checkPermission(CREATE);
checkPermission(DELETE);
String newName = req.getParameter("newName");
Hudson.checkGoodName(newName);
if (isBuilding()) {
// redirect to page explaining that we can't rename now
rsp.sendRedirect("rename?newName=" + URLEncoder.encode(newName, "UTF-8"));
return;
}
renameTo(newName);
// send to the new job page
// note we can't use getUrl() because that would pick up old name in the
// Ancestor.getUrl()
rsp.sendRedirect2(req.getContextPath() + '/' + getParent().getUrl()
+ getShortUrl());
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
+ getShortUrl());
内容来源于网络,如有侵权,请联系作者删除!