Package jenkins.branch
Class NamedExceptionsBranchPropertyStrategy
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<BranchPropertyStrategy>
-
- jenkins.branch.BranchPropertyStrategy
-
- jenkins.branch.NamedExceptionsBranchPropertyStrategy
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<BranchPropertyStrategy>
public class NamedExceptionsBranchPropertyStrategy extends BranchPropertyStrategy
Allows named branches to get different properties from the rest.- Author:
- Stephen Connolly
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
NamedExceptionsBranchPropertyStrategy.DescriptorImpl
static class
NamedExceptionsBranchPropertyStrategy.Named
Holds the specific named exception details.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description NamedExceptionsBranchPropertyStrategy(BranchProperty[] defaultProperties, NamedExceptionsBranchPropertyStrategy.Named[] namedExceptions)
Stapler's constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<BranchProperty>
getDefaultProperties()
Gets the default properties.List<NamedExceptionsBranchPropertyStrategy.Named>
getNamedExceptions()
Gets the named exceptions to the defaults.List<BranchProperty>
getPropertiesFor(jenkins.scm.api.SCMHead head)
Returns the list of properties to be injected into theBranch
for the specifiedSCMHead
.-
Methods inherited from class jenkins.branch.BranchPropertyStrategy
getDescriptor
-
-
-
-
Constructor Detail
-
NamedExceptionsBranchPropertyStrategy
@DataBoundConstructor public NamedExceptionsBranchPropertyStrategy(@CheckForNull BranchProperty[] defaultProperties, @CheckForNull NamedExceptionsBranchPropertyStrategy.Named[] namedExceptions)
Stapler's constructor.- Parameters:
defaultProperties
- the properties.namedExceptions
- the named exceptions.
-
-
Method Detail
-
getDefaultProperties
@NonNull public List<BranchProperty> getDefaultProperties()
Gets the default properties.- Returns:
- the default properties.
-
getNamedExceptions
@NonNull public List<NamedExceptionsBranchPropertyStrategy.Named> getNamedExceptions()
Gets the named exceptions to the defaults.- Returns:
- the named exceptions to the defaults.
-
getPropertiesFor
@NonNull public List<BranchProperty> getPropertiesFor(jenkins.scm.api.SCMHead head)
Returns the list of properties to be injected into theBranch
for the specifiedSCMHead
.- Specified by:
getPropertiesFor
in classBranchPropertyStrategy
- Parameters:
head
- theSCMHead
- Returns:
- the list of properties.
-
-