Package jenkins.scm.api.trait
Class SCMHeadAuthorityDescriptor
- java.lang.Object
-
- hudson.model.Descriptor<SCMHeadAuthority<?,?,?>>
-
- jenkins.scm.api.trait.SCMHeadAuthorityDescriptor
-
public abstract class SCMHeadAuthorityDescriptor extends Descriptor<SCMHeadAuthority<?,?,?>>
Descriptor
base class forSCMHeadAuthority
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
Constructors Modifier Constructor Description protected
SCMHeadAuthorityDescriptor()
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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
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, 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, getRequiredGlobalConfigPagePermission, getT, getViewPage, isInstance, isSubTypeOf, load, newInstance, newInstance, newInstancesFromHeteroList, newInstancesFromHeteroList, save, self, toArray, toList, toMap
-
-
-
-
Constructor Detail
-
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 Detail
-
isApplicableToHead
@OverrideMustInvoke public boolean isApplicableToHead(@NonNull SCMHead head)
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
@OverrideMustInvoke public boolean isApplicableToRevision(@NonNull SCMRevision revision)
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
@OverrideMustInvoke public boolean isApplicableToRequest(@NonNull SCMSourceRequest request)
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
public boolean isApplicableToOrigin(@NonNull SCMHeadOrigin origin)
Checks if thisSCMHeadAuthorityDescriptor
is applicable to the suppliedSCMHeadOrigin
.- Parameters:
origin
- theSCMHeadOrigin
.- Returns:
true
if applicable.
-
isApplicableToOrigin
public boolean isApplicableToOrigin(@NonNull Class<? extends SCMHeadOrigin> originClass)
Checks if thisSCMHeadAuthorityDescriptor
is applicable to the suppliedSCMHeadOrigin
.- Parameters:
originClass
- the type ofSCMHeadOrigin
.- Returns:
true
if applicable.
-
-