Class ProjectUtil


  • public final class ProjectUtil
    extends Object
    Provides helper methods for #hudson.model.AbstractProject
    Author:
    Centrum Systems
    • Constructor Detail

      • ProjectUtil

        public ProjectUtil()
        Default constructor
    • Method Detail

      • getDownstreamProjects

        public static List<AbstractProject<?,​?>> getDownstreamProjects​(AbstractProject<?,​?> currentProject)
        Given a Project get a List of all of its Downstream projects
        Parameters:
        currentProject - Current project
        Returns:
        List of Downstream projects
      • hasDownstreamProjects

        public static boolean hasDownstreamProjects​(AbstractProject<?,​?> currentProject)
        Determines whether a project has any downstream projects.
        Parameters:
        currentProject - - The project in question
        Returns:
        - true: Current project has downstream projects; false: Current project does not have any downstream projects
      • isManualTrigger

        public static boolean isManualTrigger​(AbstractProject<?,​?> upstreamProject,
                                              AbstractProject<?,​?> downstreamProject)
        Determines if a manual trigger of the downstream project from the current upstream project is required.
        Parameters:
        upstreamProject - - The upstream project
        downstreamProject - - The downstream project
        Returns:
        - true: Manual trigger required; false: Manual trigger not required
      • getProjectParametersAction

        public static ParametersAction getProjectParametersAction​(AbstractProject<?,​?> project)
        Gets the ParametersAction of an AbstractProject
        Parameters:
        project - - The AbstractProject
        Returns:
        The ParametersAction of the AbstractProject