本文整理了Java中hudson.model.Messages.Run_UnableToDelete()
方法的一些代码示例,展示了Messages.Run_UnableToDelete()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Messages.Run_UnableToDelete()
方法的具体详情如下:
包路径:hudson.model.Messages
类名称:Messages
方法名:Run_UnableToDelete
[英]Unable to delete {0}: {1}
[中]无法删除{0}:{1}
代码示例来源:origin: jenkinsci/jenkins
/**
* Deletes the build when the button is pressed.
*/
@RequirePOST
public void doDoDelete( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
checkPermission(DELETE);
// We should not simply delete the build if it has been explicitly
// marked to be preserved, or if the build should not be deleted
// due to dependencies!
String why = getWhyKeepLog();
if (why!=null) {
sendError(Messages.Run_UnableToDelete(getFullDisplayName(), why), req, rsp);
return;
}
try{
delete();
}
catch(IOException ex){
req.setAttribute("stackTraces", Functions.printThrowable(ex));
req.getView(this, "delete-retry.jelly").forward(req, rsp);
return;
}
rsp.sendRedirect2(req.getContextPath()+'/' + getParent().getUrl());
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Deletes the build when the button is pressed.
*/
public void doDoDelete( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
requirePOST();
checkPermission(DELETE);
// We should not simply delete the build if it has been explicitly
// marked to be preserved, or if the build should not be deleted
// due to dependencies!
String why = getWhyKeepLog();
if (why!=null) {
sendError(Messages.Run_UnableToDelete(toString(),why),req,rsp);
return;
}
delete();
rsp.sendRedirect2(req.getContextPath()+'/' + getParent().getUrl());
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Deletes the build when the button is pressed.
*/
@RequirePOST
public void doDoDelete( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
checkPermission(DELETE);
// We should not simply delete the build if it has been explicitly
// marked to be preserved, or if the build should not be deleted
// due to dependencies!
String why = getWhyKeepLog();
if (why!=null) {
sendError(Messages.Run_UnableToDelete(getFullDisplayName(), why), req, rsp);
return;
}
try{
delete();
}
catch(IOException ex){
req.setAttribute("stackTraces", Functions.printThrowable(ex));
req.getView(this, "delete-retry.jelly").forward(req, rsp);
return;
}
rsp.sendRedirect2(req.getContextPath()+'/' + getParent().getUrl());
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Deletes the build when the button is pressed.
*/
public void doDoDelete( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
requirePOST();
checkPermission(DELETE);
// We should not simply delete the build if it has been explicitly
// marked to be preserved, or if the build should not be deleted
// due to dependencies!
String why = getWhyKeepLog();
if (why!=null) {
sendError(Messages.Run_UnableToDelete(toString(),why),req,rsp);
return;
}
delete();
rsp.sendRedirect2(req.getContextPath()+'/' + getParent().getUrl());
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Deletes the build when the button is pressed.
*/
public void doDoDelete(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
requirePOST();
checkPermission(DELETE);
// We should not simply delete the build if it has been explicitly
// marked to be preserved, or if the build should not be deleted
// due to dependencies!
String why = getWhyKeepLog();
if (why != null) {
sendError(Messages.Run_UnableToDelete(toString(), why), req, rsp);
return;
}
delete();
rsp.sendRedirect2(req.getContextPath() + '/' + getParent().getUrl());
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Deletes the build when the button is pressed.
*/
public void doDoDelete( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
requirePOST();
checkPermission(DELETE);
// We should not simply delete the build if it has been explicitly
// marked to be preserved, or if the build should not be deleted
// due to dependencies!
String why = getWhyKeepLog();
if (why!=null) {
sendError(Messages.Run_UnableToDelete(toString(),why),req,rsp);
return;
}
delete();
rsp.sendRedirect2(req.getContextPath()+'/' + getParent().getUrl());
}
内容来源于网络,如有侵权,请联系作者删除!