Class BranchPropertyDescriptor

java.lang.Object
hudson.model.Descriptor<BranchProperty>
jenkins.branch.BranchPropertyDescriptor
All Implemented Interfaces:
Saveable, Loadable, OnMaster
Direct Known Subclasses:
BuildRetentionBranchProperty.DescriptorImpl, NoTriggerBranchProperty.DescriptorImpl, RateLimitBranchProperty.DescriptorImpl, UntrustedBranchProperty.DescriptorImpl

public abstract class BranchPropertyDescriptor extends Descriptor<BranchProperty>
Author:
Kohsuke Kawaguchi
  • Constructor Details

    • BranchPropertyDescriptor

      public BranchPropertyDescriptor()
  • Method Details

    • isApplicable

      public boolean isApplicable(@NonNull MultiBranchProject project)
      A branch property may not be appropriate for every project, this method lets a property opt out of being selectable for a specific project.
      Parameters:
      project - the project.
      Returns:
      true iff this property is relevant with this project instance.
    • isApplicable

      protected boolean isApplicable(@NonNull MultiBranchProjectDescriptor projectDescriptor)
      Usually a branch property 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 is relevant with this project type.
    • all

      public static List<BranchPropertyDescriptor> all()
      All the registered BranchPropertyDescriptors.
      Returns:
      All the registered BranchPropertyDescriptors.
    • all

      public static List<BranchPropertyDescriptor> all(@NonNull MultiBranchProject project)
      Gets all the BranchPropertyDescriptor instances applicable to the specified project. Probably unused.
      Parameters:
      project - the project
      Returns:
      all the BranchPropertyDescriptor instances applicable to the specified project.