Package jenkins.plugins.git.traits
Class LocalBranchTrait.DescriptorImpl
- java.lang.Object
-
- hudson.model.Descriptor<T>
-
- jenkins.scm.api.trait.SCMTraitDescriptor<jenkins.scm.api.trait.SCMSourceTrait>
-
- jenkins.scm.api.trait.SCMSourceTraitDescriptor
-
- jenkins.plugins.git.traits.GitSCMExtensionTraitDescriptor
-
- jenkins.plugins.git.traits.LocalBranchTrait.DescriptorImpl
-
- Enclosing class:
- LocalBranchTrait
@Extension @Symbol({"localBranch","localBranchTrait"}) public static class LocalBranchTrait.DescriptorImpl extends GitSCMExtensionTraitDescriptor
OurDescriptor
-
-
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 Constructor Description DescriptorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jenkins.scm.api.trait.SCMSourceTrait
convertToTrait(GitSCMExtension extension)
Converts the suppliedGitSCMExtension
(which must be of typeGitSCMExtensionTraitDescriptor.getExtensionClass()
) into its correspondingGitSCMExtensionTrait
.String
getDisplayName()
-
Methods inherited from class jenkins.plugins.git.traits.GitSCMExtensionTraitDescriptor
getBuilderClass, getExtensionClass, getExtensionDescriptor, getHelpFile, getScmClass
-
Methods inherited from class jenkins.scm.api.trait.SCMSourceTraitDescriptor
getContextClass, getSourceClass, isApplicableTo, isApplicableTo, isApplicableTo, isApplicableToBuilder, isApplicableToBuilder, isApplicableToContext, isApplicableToContext
-
Methods inherited from class jenkins.scm.api.trait.SCMTraitDescriptor
isApplicableToSCM, isApplicableToSCM
-
Methods inherited from class hudson.model.Descriptor
addHelpFileRedirect, bindJSON, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getGlobalConfigPage, getGlobalPropertyType, getHelpFile, getHelpFile, getId, getJsonSafeClassName, getKlass, getPlugin, getPossibleViewNames, getPropertyType, getPropertyType, getPropertyTypeOrDie, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Method Detail
-
getDisplayName
public String getDisplayName()
- Overrides:
getDisplayName
in classDescriptor<jenkins.scm.api.trait.SCMSourceTrait>
-
convertToTrait
public jenkins.scm.api.trait.SCMSourceTrait convertToTrait(@NonNull GitSCMExtension extension)
Converts the suppliedGitSCMExtension
(which must be of typeGitSCMExtensionTraitDescriptor.getExtensionClass()
) into its correspondingGitSCMExtensionTrait
. The default implementation assumes that theDescriptor.clazz
has a public constructor taking either no arguments or a single argument of typeGitSCMExtensionTraitDescriptor.getExtensionClass()
and will just call that. Override this method if you need more complex conversion logic, for exampleLocalBranch
only makes sense for aLocalBranch.getLocalBranch()
value of**
soconvertToTrait(GitSCMExtension)
returnsnull
for all otherLocalBranch
configurations.- Overrides:
convertToTrait
in classGitSCMExtensionTraitDescriptor
- Parameters:
extension
- theGitSCMExtension
(must be of typeGitSCMExtensionTraitDescriptor.getExtensionClass()
)- Returns:
- the
GitSCMExtensionTrait
ornull
if the suppliedGitSCMExtension
is not appropriate for conversion to aGitSCMExtensionTrait
-
-