public abstract class SCMSourceDescriptor extends Descriptor<SCMSource> implements org.jenkins.ui.icon.IconSpec
Descriptor for SCMSources.Descriptor.FormException, Descriptor.PropertyType, Descriptor.Self| Modifier and Type | Field and Description |
|---|---|
protected Set<SCMHeadCategory> |
categories
The set of
SCMHeadCategory singletons for this type of SCMSource |
clazz| Constructor and Description |
|---|
SCMSourceDescriptor() |
| Modifier and Type | Method and Description |
|---|---|
protected SCMHeadCategory[] |
createCategories()
Creates the singleton
SCMHeadCategory instances that this type of SCMSource is capable of
producing. |
static List<SCMSourceDescriptor> |
forOwner(Class<? extends SCMSourceOwner> clazz)
Returns the list of descriptors that are appropriate for a specified type of owner and
isUserInstantiable(). |
static List<SCMSourceDescriptor> |
forOwner(Class<? extends SCMSourceOwner> clazz,
boolean onlyUserInstantiable)
Returns the list of descriptors that are appropriate for a specified type of owner with the additional
filter by
isUserInstantiable(). |
static List<SCMSourceDescriptor> |
forOwner(SCMSourceOwner owner)
Returns the list of descriptors that are appropriate for a specified owner and
isUserInstantiable(). |
static List<SCMSourceDescriptor> |
forOwner(SCMSourceOwner owner,
boolean onlyUserInstantiable)
Returns the list of descriptors that are appropriate for a specified owner with the additional filter by
isUserInstantiable(). |
Set<SCMHeadCategory> |
getCategories()
Returns the set of
SCMHeadCategory that this SCMSource supports. |
String |
getIconClassName()
Used to categorize this kind of
SCMSource |
String |
getId(SCMSource source)
Return or generate the ID for a source instance.
|
String |
getPronoun()
Get the term used in the UI to represent this kind of
SCMSource. |
List<SCMSourceTrait> |
getTraitsDefaults()
Returns the default traits for this
SCMSource. |
boolean |
isApplicable(Class<? extends SCMSourceOwner> owner)
Returns
true if this source type is applicable to the given owner. |
boolean |
isUserInstantiable()
Returns
true if the source type is one that the user is permitted to configure. |
addHelpFileRedirect, calcAutoCompleteSettings, calcFillSettings, configure, configure, 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, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMapprotected transient Set<SCMHeadCategory> categories
SCMHeadCategory singletons for this type of SCMSourcegetCategories()@NonNull public String getId(@CheckForNull SCMSource source)
source - the source or null if a new source.public boolean isApplicable(Class<? extends SCMSourceOwner> owner)
true if this source type is applicable to the given owner.owner - the type of owner.@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean isUserInstantiable()
true if the source type is one that the user is permitted to configure. Where a source is
used to wrap or decorate another source it may make sense to return false.true if the source type is one that the user is permitted to configure via the UI.@NonNull public List<SCMSourceTrait> getTraitsDefaults()
SCMSource.@NonNull public static List<SCMSourceDescriptor> forOwner(@CheckForNull SCMSourceOwner owner)
isUserInstantiable().owner - the owner.@NonNull public static List<SCMSourceDescriptor> forOwner(@CheckForNull SCMSourceOwner owner, boolean onlyUserInstantiable)
isUserInstantiable().owner - the owner.onlyUserInstantiable - true if only those descriptors that are isUserInstantiable().@NonNull public static List<SCMSourceDescriptor> forOwner(Class<? extends SCMSourceOwner> clazz)
isUserInstantiable().clazz - the type of owner.@NonNull public static List<SCMSourceDescriptor> forOwner(Class<? extends SCMSourceOwner> clazz, boolean onlyUserInstantiable)
isUserInstantiable().clazz - the type of owner.onlyUserInstantiable - true if only those descriptors that are isUserInstantiable().public String getIconClassName()
SCMSourcegetIconClassName in interface org.jenkins.ui.icon.IconSpec@CheckForNull public String getPronoun()
SCMSource. Must start with a capital letter.null to fall back to the calling context's default.@NonNull public final Set<SCMHeadCategory> getCategories()
SCMHeadCategory that this SCMSource supports. There will always be
exactly one SCMCategory.isUncategorized() instance in the returned set.SCMHeadCategory that this SCMSource supports.@NonNull protected SCMHeadCategory[] createCategories()
SCMHeadCategory instances that this type of SCMSource is capable of
producing.SCMHeadCategory instances for this type of SCMSourcegetCategories()Copyright © 2016–2019. All rights reserved.