public abstract class GitSCMExtensionTraitDescriptor extends jenkins.scm.api.trait.SCMSourceTraitDescriptor
Descriptor of a GitSCMExtension.Descriptor.FormException, Descriptor.PropertyType, Descriptor.Selfclazz| Modifier | Constructor and Description |
|---|---|
protected |
GitSCMExtensionTraitDescriptor()
Infers the type of the corresponding
GitSCMExtensionTrait from the outer class. |
protected |
GitSCMExtensionTraitDescriptor(Class<? extends jenkins.scm.api.trait.SCMSourceTrait> clazz,
Class<? extends GitSCMExtension> extension)
Constructor to use when type inference using
GitSCMExtensionTraitDescriptor() does not work. |
| Modifier and Type | Method and Description |
|---|---|
jenkins.scm.api.trait.SCMSourceTrait |
convertToTrait(GitSCMExtension extension)
Converts the supplied
GitSCMExtension (which must be of type getExtensionClass()) into
its corresponding GitSCMExtensionTrait. |
Class<? extends jenkins.scm.api.trait.SCMBuilder> |
getBuilderClass() |
Class<? extends GitSCMExtension> |
getExtensionClass()
Returns the type of
GitSCMExtension that the GitSCMExtensionTrait wraps. |
GitSCMExtensionDescriptor |
getExtensionDescriptor()
Returns the
GitSCMExtensionDescriptor for this getExtensionClass(). |
String |
getHelpFile() |
Class<? extends SCM> |
getScmClass() |
getContextClass, getSourceClass, isApplicableTo, isApplicableTo, isApplicableTo, isApplicableToBuilder, isApplicableToBuilder, isApplicableToContext, isApplicableToContextisApplicableToSCM, isApplicableToSCMaddHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, doHelp, find, find, findByDescribableClassName, findById, getCategory, getCheckMethod, getCheckUrl, getConfigFile, getConfigPage, getCurrentDescriptorByNameUrl, getDescriptorFullUrl, getDescriptorUrl, getDisplayName, 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, toMapprotected GitSCMExtensionTraitDescriptor(Class<? extends jenkins.scm.api.trait.SCMSourceTrait> clazz, Class<? extends GitSCMExtension> extension)
GitSCMExtensionTraitDescriptor() does not work.clazz - Pass in the type of SCMTraitextension - Pass in the type of GitSCMExtension.protected GitSCMExtensionTraitDescriptor()
GitSCMExtensionTrait from the outer class.
This version works when you follow the common convention, where a descriptor
is written as the static nested class of the describable class.public Class<? extends jenkins.scm.api.trait.SCMBuilder> getBuilderClass()
getBuilderClass in class jenkins.scm.api.trait.SCMSourceTraitDescriptorpublic Class<? extends SCM> getScmClass()
getScmClass in class jenkins.scm.api.trait.SCMTraitDescriptor<jenkins.scm.api.trait.SCMSourceTrait>@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public GitSCMExtensionDescriptor getExtensionDescriptor()
GitSCMExtensionDescriptor for this getExtensionClass().GitSCMExtensionDescriptor for this getExtensionClass().public Class<? extends GitSCMExtension> getExtensionClass()
GitSCMExtension that the GitSCMExtensionTrait wraps.GitSCMExtension that the GitSCMExtensionTrait wraps.@CheckForNull public jenkins.scm.api.trait.SCMSourceTrait convertToTrait(@NonNull GitSCMExtension extension)
GitSCMExtension (which must be of type getExtensionClass()) into
its corresponding GitSCMExtensionTrait.
The default implementation assumes that the Descriptor.clazz has a public constructor taking either no arguments
or a single argument of type getExtensionClass() and will just call that. Override this method if you
need more complex conversion logic, for example LocalBranch only makes sense for a
LocalBranch.getLocalBranch() value of ** so
LocalBranchTrait.DescriptorImpl.convertToTrait(GitSCMExtension) returns null for all other
LocalBranch configurations.extension - the GitSCMExtension (must be of type getExtensionClass())GitSCMExtensionTrait or null if the supplied GitSCMExtension is not
appropriate for conversion to a GitSCMExtensionTraitUnsupportedOperationException - if the conversion failed because of a implementation bug.public String getHelpFile()
getHelpFile in class Descriptor<jenkins.scm.api.trait.SCMSourceTrait>Copyright © 2007–2021. All rights reserved.