File D:\maven-qcr-plugin-testsunitaires\qcr4java\jenkins-master\target\site\qc\core\src\main\java\jenkins\model\AbstractTopLevelItem.java.html

1 package jenkins.model;
2
3 import hudson.model.AbstractItem;
4 import hudson.model.ItemGroup;
5 import hudson.model.Job;
6 import hudson.model.TopLevelItem;
7 import hudson.model.TopLevelItemDescriptor;
8
9 import java.util.Collection;
10 import java.util.Collections;
11
12 /**
13 * Default base implementation of {@link TopLevelItem}.
14 *
15 * @author Kohsuke Kawaguchi
16 */
17 public abstract class AbstractTopLevelItem extends AbstractItem implements TopLevelItem {
18 protected AbstractTopLevelItem(ItemGroup parent, String name) {
19 super(parent, name);
20 }
21
22 @Override
23 public Collection<? extends Job> getAllJobs() {
24 return Collections.emptySet();
25 }
26
27 public TopLevelItemDescriptor getDescriptor() {
28 return (TopLevelItemDescriptor) Jenkins.getInstance().getDescriptorOrDie(getClass());
29 }
30 }
31