本文整理了Java中hudson.model.Hudson.getAllItems()
方法的一些代码示例,展示了Hudson.getAllItems()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hudson.getAllItems()
方法的具体详情如下:
包路径:hudson.model.Hudson
类名称:Hudson
方法名:getAllItems
[英]Gets all the Items recursively in the ItemGroup tree and filter them by the given type.
[中]递归获取ItemGroup树中的所有项,并按给定类型筛选它们。
代码示例来源:origin: org.hudsonci.plugins/instant-messaging
@SuppressWarnings("unchecked")
@Override
public List<AbstractProject> getAllJobs() {
return Hudson.getInstance().getAllItems(AbstractProject.class);
}
代码示例来源:origin: org.hudsonci.plugins/ivy
/**
* Returns all Ivy modules in this Jenkins instance.
*/
protected Collection<IvyModule> getAllIvyModules() {
return Hudson.getInstance().getAllItems(IvyModule.class);
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Gets the names of all the {@link Job}s.
*/
public Collection<String> getJobNames() {
List<String> names = new ArrayList<String>();
for (Job j : getAllItems(Job.class)) {
names.add(j.getFullName());
}
return names;
}
代码示例来源:origin: org.eclipse.hudson/hudson-service
@SuppressWarnings("rawtypes")
public List<AbstractProject> getAllProjects() {
// Hudson checks that items are readable by the current context (has Item.READ perms)
return getHudson().getAllItems(AbstractProject.class);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-service
@SuppressWarnings("rawtypes")
public List<AbstractProject> getAllProjects() {
// Hudson checks that items are readable by the current context (has Item.READ perms)
return getHudson().getAllItems(AbstractProject.class);
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Gets the names of all the {@link Job}s.
*/
public Collection<String> getJobNames() {
List<String> names = new ArrayList<String>();
for (Job j : getAllItems(Job.class)) {
names.add(j.getFullName());
}
return names;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Gets the names of all the {@link Job}s.
*/
public Collection<String> getJobNames() {
List<String> names = new ArrayList<String>();
for (Job j : getAllItems(Job.class)) {
names.add(j.getFullName());
}
return names;
}
代码示例来源:origin: org.jenkins-ci.plugins/ivy
/**
* Returns all Ivy modules in this Jenkins instance.
*/
protected Collection<IvyModule> getAllIvyModules() {
return Hudson.getInstance().getAllItems(IvyModule.class);
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Gets the names of all the {@link Job}s.
*/
public Collection<String> getJobNames() {
List<String> names = new ArrayList<String>();
for (Job j : getAllItems(Job.class)) {
names.add(j.getFullName());
}
return names;
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Gets all the {@link AbstractProject}s that this user has committed to.
* @since 1.191
*/
public Set<AbstractProject<?,?>> getProjects() {
Set<AbstractProject<?,?>> r = new HashSet<AbstractProject<?,?>>();
for (AbstractProject<?,?> p : Hudson.getInstance().getAllItems(AbstractProject.class))
if(p.hasParticipant(this))
r.add(p);
return r;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Gets all the {@link AbstractProject}s that this user has committed to.
* @since 1.191
*/
public Set<AbstractProject<?,?>> getProjects() {
Set<AbstractProject<?,?>> r = new HashSet<AbstractProject<?,?>>();
for (AbstractProject<?,?> p : Hudson.getInstance().getAllItems(AbstractProject.class))
if(p.hasParticipant(this))
r.add(p);
return r;
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Returns selected ccascading project.
*
* @return cascading project.
*/
@SuppressWarnings({"unchecked"})
public synchronized JobT getCascadingProject() {
if (StringUtils.isNotBlank(cascadingProjectName) && cascadingProject == null) {
cascadingProject = (JobT) Functions.getItemByName(Hudson.getInstance().getAllItems(this.getClass()),
cascadingProjectName);
}
return cascadingProject;
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Gets all the {@link AbstractProject}s that this user has committed to.
* @since 1.191
*/
public Set<AbstractProject<?,?>> getProjects() {
Set<AbstractProject<?,?>> r = new HashSet<AbstractProject<?,?>>();
for (AbstractProject<?,?> p : Hudson.getInstance().getAllItems(AbstractProject.class))
if(p.hasParticipant(this))
r.add(p);
return r;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
public Collection<AbstractProject> vertices() {
// only include projects that have some dependency
List<AbstractProject> r = new ArrayList<AbstractProject>();
for (AbstractProject p : Hudson.getInstance().getAllItems(AbstractProject.class)) {
if(!getDownstream(p).isEmpty() || !getUpstream(p).isEmpty())
r.add(p);
}
return r;
}
代码示例来源:origin: hudson/hudson-2.x
public Collection<AbstractProject> vertices() {
// only include projects that have some dependency
List<AbstractProject> r = new ArrayList<AbstractProject>();
for (AbstractProject p : Hudson.getInstance().getAllItems(AbstractProject.class)) {
if(!getDownstream(p).isEmpty() || !getUpstream(p).isEmpty())
r.add(p);
}
return r;
}
代码示例来源:origin: org.jvnet.hudson.main/maven-plugin
public Cache() {
for( MavenModule m : Hudson.getInstance().getAllItems(MavenModule.class))
modules.put(m.getModuleName(),m);
}
代码示例来源:origin: org.jvnet.hudson.plugins/cvs
/**
* Returns all {@code CVSROOT} strings used in the current Hudson installation.
*/
public Set<String> getAllCvsRoots() {
Set<String> r = new TreeSet<String>();
for (AbstractProject p : Hudson.getInstance().getAllItems(AbstractProject.class)) {
SCM scm = p.getScm();
if (scm instanceof CVSSCM) {
CVSSCM cvsscm = (CVSSCM) scm;
r.add(cvsscm.getCvsRoot());
}
}
return r;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
public BuildTimelineWidget getTimeline() {
Collection<Job> allJobs = Hudson.getInstance().getAllItems(Job.class);
return new BuildTimelineWidget(BuildHistoryList.newBuildHistoryList(allJobs));
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
public RunList getBuilds() {
return new RunList(Hudson.getInstance().getAllItems(Job.class)).node(getNode());
}
代码示例来源:origin: hudson/hudson-2.x
public RunList getBuilds() {
return new RunList(Hudson.getInstance().getAllItems(Job.class)).node(getNode());
}
内容来源于网络,如有侵权,请联系作者删除!