本文整理了Java中hudson.model.Hudson.copy()
方法的一些代码示例,展示了Hudson.copy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hudson.copy()
方法的具体详情如下:
包路径:hudson.model.Hudson
类名称:Hudson
方法名:copy
[英]Copys a job.
[中]抄袭是一项工作。
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
public <T extends AbstractProject<?, ?>> T copy(T src, String name) throws IOException {
return (T) copy((TopLevelItem) src, name);
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
public <T extends AbstractProject<?, ?>> T copy(T src, String name) throws IOException {
return (T) copy((TopLevelItem) src, name);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
public <T extends AbstractProject<?, ?>> T copy(T src, String name) throws IOException {
return (T) copy((TopLevelItem) src, name);
}
代码示例来源:origin: hudson/hudson-2.x
public <T extends AbstractProject<?, ?>> T copy(T src, String name) throws IOException {
return (T) copy((TopLevelItem) src, name);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
protected int run() throws Exception {
Hudson h = Hudson.getInstance();
h.checkPermission(Item.CREATE);
if (h.getItem(dst)!=null) {
stderr.println("Job '"+dst+"' already exists");
return -1;
}
h.copy(src,dst);
Job newJob = (Job)Hudson.getInstance().getItem(dst);
if (forceSave && null != newJob) {
newJob.save();
}
return 0;
}
}
代码示例来源:origin: hudson/hudson-2.x
protected int run() throws Exception {
Hudson h = Hudson.getInstance();
h.checkPermission(Item.CREATE);
if (h.getItem(dst)!=null) {
stderr.println("Job '"+dst+"' already exists");
return -1;
}
h.copy(src,dst);
Job newJob = (Job)Hudson.getInstance().getItem(dst);
if (forceSave && null != newJob) {
newJob.save();
}
return 0;
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
protected int run() throws Exception {
Hudson h = Hudson.getInstance();
h.checkPermission(Item.CREATE);
if (h.getItem(dst)!=null) {
stderr.println("Job '"+dst+"' already exists");
return -1;
}
h.copy(src,dst);
Job newJob = (Job)Hudson.getInstance().getItem(dst);
if (forceSave && null != newJob) {
newJob.save();
}
return 0;
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-service
public <T extends AbstractProject<?, ?>> T copyProject(final T src, final String targetProjectName)
throws ServiceRuntimeException {
checkNotNull(src, AbstractProject.class);
checkProjectName(targetProjectName);
this.securityService.checkPermission(Item.CREATE);
this.securityService.checkPermission(src, Item.EXTENDED_READ);
// caller should try to verify this themselves before calling me
// TODO should this check really be performed here?
if (projectExists(targetProjectName)) {
throw new SystemIntegrityViolationException(String.format("Project %s already exists.", targetProjectName));
}
try {
return getHudson().copy(src, targetProjectName);
} catch (IOException ex) {
throw new ServiceRuntimeException(String.format("Project copy failed from %s to %s", src.getName(),
targetProjectName), ex);
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-service
public <T extends AbstractProject<?, ?>> T copyProject(final T src, final String targetProjectName)
throws ServiceRuntimeException {
checkNotNull(src, AbstractProject.class);
checkProjectName(targetProjectName);
this.securityService.checkPermission(Item.CREATE);
this.securityService.checkPermission(src, Item.EXTENDED_READ);
// caller should try to verify this themselves before calling me
// TODO should this check really be performed here?
if (projectExists(targetProjectName)) {
throw new SystemIntegrityViolationException(String.format("Project %s already exists.", targetProjectName));
}
try {
return getHudson().copy(src, targetProjectName);
} catch (IOException ex) {
throw new ServiceRuntimeException(String.format("Project copy failed from %s to %s", src.getName(),
targetProjectName), ex);
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
TopLevelItem newJob = h.copy(src, dst, team);
内容来源于网络,如有侵权,请联系作者删除!