Class BranchProjectFactoryDescriptor

java.lang.Object
hudson.model.Descriptor<BranchProjectFactory<?,?>>
jenkins.branch.BranchProjectFactoryDescriptor
All Implemented Interfaces:
Saveable, Loadable, OnMaster

public abstract class BranchProjectFactoryDescriptor extends Descriptor<BranchProjectFactory<?,?>>
Base class for all BranchProjectFactory instances.
  • Constructor Details

    • BranchProjectFactoryDescriptor

      protected BranchProjectFactoryDescriptor(Class<? extends BranchProjectFactory<?,?>> clazz, Class<? extends Job> branchProjectClass)
      Explicit constructor to use when type inference fails.
      Parameters:
      clazz - the BranchProjectFactory that this descriptor is for.
      branchProjectClass - the Job type that the BranchProjectFactory creates.
      Since:
      2.0
    • BranchProjectFactoryDescriptor

      protected BranchProjectFactoryDescriptor(Class<? extends BranchProjectFactory<?,?>> clazz)
      Semi explicit constructor to use when the descriptor is not an inner class of the BranchProjectFactory.
      Parameters:
      clazz - the BranchProjectFactory that this descriptor is for.
      Since:
      2.0
    • BranchProjectFactoryDescriptor

      protected BranchProjectFactoryDescriptor()
      Fully inferring constructor to use when the descriptor is an inner class of the BranchProjectFactory and type parameter inference works because it just should work.
      Since:
      2.0
  • Method Details

    • getProjectClass

      @NonNull public Class<? extends Job> getProjectClass()
      Returns the base class of the projects that are produced by this factory.
      Returns:
      the base class of the projects that are produced by this factory.
      Since:
      2.0
    • isApplicable

      public abstract boolean isApplicable(Class<? extends MultiBranchProject> clazz)
      Returns true if and only if this BranchPropertyDescriptor is applicable in the specified type of MultiBranchProject.
      Parameters:
      clazz - the type of MultiBranchProject.
      Returns:
      true if this factory can be used in the MultiBranchProject.