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
ConstructorsModifierConstructorDescriptionprotectedInfers the type of the correspondingSCMHeadAuthorityfrom the outer class.protectedSCMHeadAuthorityDescriptor(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 TypeMethodDescriptionbooleanisApplicableToHead(Class<? extends SCMHeadMixin> headClass) Checks if thisSCMHeadAuthorityDescriptoris applicable to the supplied type ofSCMHead.booleanisApplicableToHead(SCMHead head) Checks if thisSCMHeadAuthorityDescriptoris applicable to the suppliedSCMHead.booleanisApplicableToOrigin(Class<? extends SCMHeadOrigin> originClass) Checks if thisSCMHeadAuthorityDescriptoris applicable to the suppliedSCMHeadOrigin.booleanisApplicableToOrigin(SCMHeadOrigin origin) Checks if thisSCMHeadAuthorityDescriptoris applicable to the suppliedSCMHeadOrigin.booleanisApplicableToRequest(Class<? extends SCMSourceRequest> requestClass) Checks if thisSCMHeadAuthorityDescriptoris applicable to the supplied type ofSCMSourceRequest.booleanisApplicableToRequest(SCMSourceRequest request) Checks if thisSCMHeadAuthorityDescriptoris applicable to the suppliedSCMSourceRequest.booleanisApplicableToRevision(Class<? extends SCMRevision> revisionClass) Checks if thisSCMHeadAuthorityDescriptoris applicable to the supplied type ofSCMRevision.booleanisApplicableToRevision(SCMRevision revision) Checks if thisSCMHeadAuthorityDescriptoris 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 ofSCMHeadAuthorityrequestClass- the type ofSCMSourceRequest.headClass- the type ofSCMHead.revisionClass- the type ofSCMRevision.
-
SCMHeadAuthorityDescriptor
protected SCMHeadAuthorityDescriptor()Infers the type of the correspondingSCMHeadAuthorityfrom 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 thisSCMHeadAuthorityDescriptoris applicable to the suppliedSCMHead.- Parameters:
head- theSCMHead.- Returns:
trueif applicable.
-
isApplicableToHead
@OverrideMustInvoke public boolean isApplicableToHead(@NonNull Class<? extends SCMHeadMixin> headClass) Checks if thisSCMHeadAuthorityDescriptoris applicable to the supplied type ofSCMHead.- Parameters:
headClass- the type ofSCMHead.- Returns:
trueif applicable.
-
isApplicableToRevision
Checks if thisSCMHeadAuthorityDescriptoris applicable to the suppliedSCMRevision.- Parameters:
revision- theSCMRevision.- Returns:
trueif applicable.
-
isApplicableToRevision
@OverrideMustInvoke public boolean isApplicableToRevision(@NonNull Class<? extends SCMRevision> revisionClass) Checks if thisSCMHeadAuthorityDescriptoris applicable to the supplied type ofSCMRevision.- Parameters:
revisionClass- the type ofSCMRevision.- Returns:
trueif applicable.
-
isApplicableToRequest
Checks if thisSCMHeadAuthorityDescriptoris applicable to the suppliedSCMSourceRequest.- Parameters:
request- theSCMSourceRequest.- Returns:
trueif applicable.
-
isApplicableToRequest
@OverrideMustInvoke public boolean isApplicableToRequest(@NonNull Class<? extends SCMSourceRequest> requestClass) Checks if thisSCMHeadAuthorityDescriptoris applicable to the supplied type ofSCMSourceRequest.- Parameters:
requestClass- the type ofSCMSourceRequest.- Returns:
trueif applicable.
-
isApplicableToOrigin
Checks if thisSCMHeadAuthorityDescriptoris applicable to the suppliedSCMHeadOrigin.- Parameters:
origin- theSCMHeadOrigin.- Returns:
trueif applicable.
-
isApplicableToOrigin
Checks if thisSCMHeadAuthorityDescriptoris applicable to the suppliedSCMHeadOrigin.- Parameters:
originClass- the type ofSCMHeadOrigin.- Returns:
trueif applicable.
-