Class BranchBuildStrategyDescriptor

java.lang.Object
hudson.model.Descriptor<BranchBuildStrategy>
jenkins.branch.BranchBuildStrategyDescriptor
All Implemented Interfaces:
Saveable, Loadable, OnMaster

public abstract class BranchBuildStrategyDescriptor extends Descriptor<BranchBuildStrategy>
Since:
2.0.0
  • Constructor Details

    • BranchBuildStrategyDescriptor

      public BranchBuildStrategyDescriptor()
  • Method Details

    • isApplicable

      public boolean isApplicable(@NonNull jenkins.scm.api.SCMSourceDescriptor sourceDescriptor)
      A branch build strategy may not be appropriate for every type of source, this method lets a strategy opt out of being selectable for a specific source type. When this method is called (via stapler) we do not have an instance of the source so this needs to be hooked
      Parameters:
      sourceDescriptor - the source descriptor.
      Returns:
      true iff this property strategy is relevant with this source.
    • isApplicable

      public boolean isApplicable(@NonNull MultiBranchProject project)
      A branch build strategy may not be appropriate for every project, this method lets a strategy opt out of being selectable for a specific project.

      By default it checks isApplicable(MultiBranchProjectDescriptor).

      Parameters:
      project - the project.
      Returns:
      true iff this property strategy is relevant with this project instance.
    • isApplicable

      protected boolean isApplicable(@NonNull MultiBranchProjectDescriptor projectDescriptor)
      Usually a branch property strategy is more concerned with the specific type of project than the specifics of the project instance.
      Parameters:
      projectDescriptor - the project type.
      Returns:
      true iff this property strategy is relevant with this project type.
    • all

      public static List<BranchBuildStrategyDescriptor> all()
      Gets all the BranchBuildStrategyDescriptor instances.
      Returns:
      all the BranchBuildStrategyDescriptor instances.
    • all

      public static List<BranchBuildStrategyDescriptor> all(@NonNull MultiBranchProject project, @NonNull jenkins.scm.api.SCMSourceDescriptor sourceDescriptor)
      Gets all the BranchBuildStrategyDescriptor instances applicable to the specified project and source.
      Parameters:
      project - the project
      sourceDescriptor - the source.
      Returns:
      all the BranchBuildStrategyDescriptor instances applicable to the specified project and source.