提交 379543f0 编写于 作者: K kohsuke

added more convenience methods.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@4726 71c3de6d-444a-0410-be80-ed276b4c234a
上级 f4b3399f
...@@ -37,7 +37,6 @@ import java.util.Vector; ...@@ -37,7 +37,6 @@ import java.util.Vector;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import javax.mail.Address;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerRequest;
...@@ -618,6 +617,24 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A ...@@ -618,6 +617,24 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
return Hudson.getInstance().getDependencyGraph().getUpstream(this); return Hudson.getInstance().getDependencyGraph().getUpstream(this);
} }
/**
* Gets all the upstream projects including transitive upstream projects.
*
* @since 1.138
*/
public final Set<AbstractProject> getTransitiveUpstreamProjects() {
return Hudson.getInstance().getDependencyGraph().getTransitiveUpstream(this);
}
/**
* Gets all the downstream projects including transitive downstream projects.
*
* @since 1.138
*/
public final Set<AbstractProject> getTransitiveDownstreamProjects() {
return Hudson.getInstance().getDependencyGraph().getTransitiveUpstream(this);
}
/** /**
* Gets the dependency relationship map between this project (as the source) * Gets the dependency relationship map between this project (as the source)
* and that project (as the sink.) * and that project (as the sink.)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册