Package jenkins.scm.api.trait
Class SCMHeadAuthorityDescriptor
Descriptor
base class for SCMHeadAuthority
implementations.- Since:
- 3.4.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
ModifierConstructorDescriptionprotected
Infers the type of the correspondingSCMHeadAuthority
from the outer class.protected
SCMHeadAuthorityDescriptor
(Class<? extends SCMHeadAuthority<?, ?, ?>> clazz, Class<? extends SCMSourceRequest> requestClass, Class<? extends SCMHeadMixin> headClass, Class<? extends SCMRevision> revisionClass) Constructor to use when type inference usingSCMHeadAuthorityDescriptor()
does not work. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isApplicableToHead
(Class<? extends SCMHeadMixin> headClass) Checks if thisSCMHeadAuthorityDescriptor
is applicable to the supplied type ofSCMHead
.boolean
isApplicableToHead
(SCMHead head) Checks if thisSCMHeadAuthorityDescriptor
is applicable to the suppliedSCMHead
.boolean
isApplicableToOrigin
(Class<? extends SCMHeadOrigin> originClass) Checks if thisSCMHeadAuthorityDescriptor
is applicable to the suppliedSCMHeadOrigin
.boolean
isApplicableToOrigin
(SCMHeadOrigin origin) Checks if thisSCMHeadAuthorityDescriptor
is applicable to the suppliedSCMHeadOrigin
.boolean
isApplicableToRequest
(Class<? extends SCMSourceRequest> requestClass) Checks if thisSCMHeadAuthorityDescriptor
is applicable to the supplied type ofSCMSourceRequest
.boolean
isApplicableToRequest
(SCMSourceRequest request) Checks if thisSCMHeadAuthorityDescriptor
is applicable to the suppliedSCMSourceRequest
.boolean
isApplicableToRevision
(Class<? extends SCMRevision> revisionClass) Checks if thisSCMHeadAuthorityDescriptor
is applicable to the supplied type ofSCMRevision
.boolean
isApplicableToRevision
(SCMRevision revision) Checks if thisSCMHeadAuthorityDescriptor
is applicable to the suppliedSCMRevision
.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
-
SCMHeadAuthorityDescriptor
protected SCMHeadAuthorityDescriptor(Class<? extends SCMHeadAuthority<?, ?, ?>> clazz, Class<? extends SCMSourceRequest> requestClass, Class<? extends SCMHeadMixin> headClass, Class<? extends SCMRevision> revisionClass) Constructor to use when type inference usingSCMHeadAuthorityDescriptor()
does not work.- Parameters:
clazz
- Pass in the type ofSCMHeadAuthority
requestClass
- the type ofSCMSourceRequest
.headClass
- the type ofSCMHead
.revisionClass
- the type ofSCMRevision
.
-
SCMHeadAuthorityDescriptor
protected SCMHeadAuthorityDescriptor()Infers the type of the correspondingSCMHeadAuthority
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.
-
-
Method Details
-
isApplicableToHead
Checks if thisSCMHeadAuthorityDescriptor
is applicable to the suppliedSCMHead
.- Parameters:
head
- theSCMHead
.- Returns:
true
if applicable.
-
isApplicableToHead
@OverrideMustInvoke public boolean isApplicableToHead(@NonNull Class<? extends SCMHeadMixin> headClass) Checks if thisSCMHeadAuthorityDescriptor
is applicable to the supplied type ofSCMHead
.- Parameters:
headClass
- the type ofSCMHead
.- Returns:
true
if applicable.
-
isApplicableToRevision
Checks if thisSCMHeadAuthorityDescriptor
is applicable to the suppliedSCMRevision
.- Parameters:
revision
- theSCMRevision
.- Returns:
true
if applicable.
-
isApplicableToRevision
@OverrideMustInvoke public boolean isApplicableToRevision(@NonNull Class<? extends SCMRevision> revisionClass) Checks if thisSCMHeadAuthorityDescriptor
is applicable to the supplied type ofSCMRevision
.- Parameters:
revisionClass
- the type ofSCMRevision
.- Returns:
true
if applicable.
-
isApplicableToRequest
Checks if thisSCMHeadAuthorityDescriptor
is applicable to the suppliedSCMSourceRequest
.- Parameters:
request
- theSCMSourceRequest
.- Returns:
true
if applicable.
-
isApplicableToRequest
@OverrideMustInvoke public boolean isApplicableToRequest(@NonNull Class<? extends SCMSourceRequest> requestClass) Checks if thisSCMHeadAuthorityDescriptor
is applicable to the supplied type ofSCMSourceRequest
.- Parameters:
requestClass
- the type ofSCMSourceRequest
.- Returns:
true
if applicable.
-
isApplicableToOrigin
Checks if thisSCMHeadAuthorityDescriptor
is applicable to the suppliedSCMHeadOrigin
.- Parameters:
origin
- theSCMHeadOrigin
.- Returns:
true
if applicable.
-
isApplicableToOrigin
Checks if thisSCMHeadAuthorityDescriptor
is applicable to the suppliedSCMHeadOrigin
.- Parameters:
originClass
- the type ofSCMHeadOrigin
.- Returns:
true
if applicable.
-