Package jenkins.scm.api.trait
Class SCMNavigatorTraitDescriptor
- java.lang.Object
-
- hudson.model.Descriptor<T>
-
- jenkins.scm.api.trait.SCMTraitDescriptor<SCMNavigatorTrait>
-
- jenkins.scm.api.trait.SCMNavigatorTraitDescriptor
-
- Direct Known Subclasses:
RegexSCMSourceFilterTrait.DescriptorImpl
,WildcardSCMSourceFilterTrait.DescriptorImpl
public abstract class SCMNavigatorTraitDescriptor extends SCMTraitDescriptor<SCMNavigatorTrait>
Abstract base class forDescriptor
ofSCMNavigatorTrait
implementations.- Since:
- 2.2.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
SCMNavigatorTraitDescriptor()
Infers the type of the correspondingSCMNavigatorTrait
from the outer class.protected
SCMNavigatorTraitDescriptor(Class<? extends SCMNavigatorTrait> clazz)
Constructor to use when type inference usingSCMNavigatorTraitDescriptor()
does not work.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends SCMSourceBuilder>
getBuilderClass()
Returns the type ofSCMSourceBuilder
that thisSCMNavigatorTrait
is applicable to.Class<? extends SCMNavigatorContext>
getContextClass()
Returns the type ofSCMNavigatorContext
that thisSCMNavigatorTrait
is applicable to.Class<? extends SCMNavigator>
getNavigatorClass()
Returns the type ofSCMNavigator
that thisSCMNavigatorTrait
is applicable to.Class<? extends SCMSource>
getSourceClass()
Returns the type ofSCMSource
that thisSCMNavigatorTrait
is applicable to.boolean
isApplicableTo(Class<? extends SCMNavigator> navigatorClass)
Checks if theSCMNavigatorTrait
is relevant to the specified type ofSCMNavigator
.boolean
isApplicableTo(SCMNavigator navigator)
Checks if theSCMNavigatorTrait
is relevant to the specifiedSCMNavigator
.boolean
isApplicableTo(SCMNavigatorDescriptor descriptor)
Checks if theSCMNavigatorTrait
is relevant to the specifiedSCMNavigatorDescriptor
.boolean
isApplicableToBuilder(Class<? extends SCMSourceBuilder> builderClass)
Checks if theSCMNavigatorTrait
is relevant to the specified type ofSCMSourceBuilder
.boolean
isApplicableToBuilder(SCMSourceBuilder<?,?> builder)
Checks if theSCMNavigatorTrait
is relevant to the specifiedSCMSourceBuilder
.boolean
isApplicableToContext(Class<? extends SCMNavigatorContext> contextClass)
Checks if theSCMNavigatorTrait
is relevant to the specified type ofSCMNavigatorContext
.boolean
isApplicableToContext(SCMNavigatorContext context)
Checks if theSCMNavigatorTrait
is relevant to the specifiedSCMNavigatorContext
.boolean
isApplicableToSource(Class<? extends SCMSource> sourceClass)
Checks if theSCMNavigatorTrait
is relevant to the specified type ofSCMSource
.boolean
isApplicableToSource(SCMSource source)
Checks if theSCMNavigatorTrait
is relevant to the specifiedSCMSource
.boolean
isApplicableToSource(SCMSourceDescriptor descriptor)
Checks if theSCMNavigatorTrait
is relevant to the specifiedSCMSourceDescriptor
.-
Methods inherited from class jenkins.scm.api.trait.SCMTraitDescriptor
getScmClass, isApplicableToSCM, isApplicableToSCM
-
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
-
SCMNavigatorTraitDescriptor
protected SCMNavigatorTraitDescriptor(@NonNull Class<? extends SCMNavigatorTrait> clazz)
Constructor to use when type inference usingSCMNavigatorTraitDescriptor()
does not work.- Parameters:
clazz
- Pass in the type ofSCMNavigatorTrait
-
SCMNavigatorTraitDescriptor
protected SCMNavigatorTraitDescriptor()
Infers the type of the correspondingSCMNavigatorTrait
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
-
getBuilderClass
public Class<? extends SCMSourceBuilder> getBuilderClass()
Returns the type ofSCMSourceBuilder
that thisSCMNavigatorTrait
is applicable to.- Returns:
- the type of
SCMSourceBuilder
that thisSCMNavigatorTrait
is applicable to.
-
isApplicableToBuilder
public boolean isApplicableToBuilder(@NonNull Class<? extends SCMSourceBuilder> builderClass)
Checks if theSCMNavigatorTrait
is relevant to the specified type ofSCMSourceBuilder
.- Parameters:
builderClass
- the type ofSCMBuilder
.- Returns:
true
if applicable to the specified type ofSCMSourceBuilder
.
-
isApplicableToBuilder
public boolean isApplicableToBuilder(@NonNull SCMSourceBuilder<?,?> builder)
Checks if theSCMNavigatorTrait
is relevant to the specifiedSCMSourceBuilder
.- Parameters:
builder
- theSCMSourceBuilder
.- Returns:
true
if applicable to the specified type ofSCMSourceBuilder
.
-
getContextClass
public Class<? extends SCMNavigatorContext> getContextClass()
Returns the type ofSCMNavigatorContext
that thisSCMNavigatorTrait
is applicable to.- Returns:
- the type of
SCMNavigatorContext
that thisSCMNavigatorTrait
is applicable to.
-
isApplicableToContext
public boolean isApplicableToContext(@NonNull Class<? extends SCMNavigatorContext> contextClass)
Checks if theSCMNavigatorTrait
is relevant to the specified type ofSCMNavigatorContext
.- Parameters:
contextClass
- the type ofSCMNavigatorContext
.- Returns:
true
if applicable to the specified type ofSCMNavigatorContext
.
-
isApplicableToContext
public boolean isApplicableToContext(@NonNull SCMNavigatorContext context)
Checks if theSCMNavigatorTrait
is relevant to the specifiedSCMNavigatorContext
.- Parameters:
context
- theSCMNavigatorContext
.- Returns:
true
if applicable to the specified type ofSCMNavigatorContext
.
-
getSourceClass
public Class<? extends SCMSource> getSourceClass()
Returns the type ofSCMSource
that thisSCMNavigatorTrait
is applicable to.- Returns:
- the type of
SCMSource
that thisSCMNavigatorTrait
is applicable to.
-
isApplicableToSource
public boolean isApplicableToSource(@NonNull Class<? extends SCMSource> sourceClass)
Checks if theSCMNavigatorTrait
is relevant to the specified type ofSCMSource
.
-
isApplicableToSource
public boolean isApplicableToSource(@NonNull SCMSourceDescriptor descriptor)
Checks if theSCMNavigatorTrait
is relevant to the specifiedSCMSourceDescriptor
.- Parameters:
descriptor
- theSCMSourceDescriptor
.- Returns:
true
if applicable to the specifiedSCMSourceDescriptor
.
-
isApplicableToSource
public boolean isApplicableToSource(@NonNull SCMSource source)
Checks if theSCMNavigatorTrait
is relevant to the specifiedSCMSource
.
-
getNavigatorClass
public Class<? extends SCMNavigator> getNavigatorClass()
Returns the type ofSCMNavigator
that thisSCMNavigatorTrait
is applicable to.- Returns:
- the type of
SCMNavigator
that thisSCMNavigatorTrait
is applicable to.
-
isApplicableTo
public boolean isApplicableTo(@NonNull Class<? extends SCMNavigator> navigatorClass)
Checks if theSCMNavigatorTrait
is relevant to the specified type ofSCMNavigator
.- Parameters:
navigatorClass
- the type ofSCMNavigator
.- Returns:
true
if applicable to the specified type ofSCMNavigator
.
-
isApplicableTo
public boolean isApplicableTo(@NonNull SCMNavigatorDescriptor descriptor)
Checks if theSCMNavigatorTrait
is relevant to the specifiedSCMNavigatorDescriptor
.- Parameters:
descriptor
- theSCMNavigatorDescriptor
.- Returns:
true
if applicable to the specifiedSCMNavigatorDescriptor
.
-
isApplicableTo
public boolean isApplicableTo(@NonNull SCMNavigator navigator)
Checks if theSCMNavigatorTrait
is relevant to the specifiedSCMNavigator
.- Parameters:
navigator
- theSCMNavigator
.- Returns:
true
if applicable to the specifiedSCMNavigator
.
-
-