Package jenkins.branch
Class BranchBuildStrategyDescriptor
Descriptor for BranchBuildStrategy instances.- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class hudson.model.Descriptor
Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self -
Field Summary
Fields inherited from class hudson.model.Descriptor
clazz -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<BranchBuildStrategyDescriptor>all()Gets all theBranchBuildStrategyDescriptorinstances.static List<BranchBuildStrategyDescriptor>all(MultiBranchProject project, jenkins.scm.api.SCMSourceDescriptor sourceDescriptor) Gets all theBranchBuildStrategyDescriptorinstances applicable to the specified project and source.booleanisApplicable(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.protected booleanisApplicable(MultiBranchProjectDescriptor projectDescriptor) Usually a branch property strategy is more concerned with the specific type of project than the specifics of the project instance.booleanisApplicable(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.Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, configure, doHelp, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getStaticHelpUrl, getStaticHelpUrl, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
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
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
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
Gets all theBranchBuildStrategyDescriptorinstances.- Returns:
- all the
BranchBuildStrategyDescriptorinstances.
-
all
public static List<BranchBuildStrategyDescriptor> all(@NonNull MultiBranchProject project, @NonNull jenkins.scm.api.SCMSourceDescriptor sourceDescriptor) Gets all theBranchBuildStrategyDescriptorinstances applicable to the specified project and source.- Parameters:
project- the projectsourceDescriptor- the source.- Returns:
- all the
BranchBuildStrategyDescriptorinstances applicable to the specified project and source.
-