Package jenkins.scm.impl.trait
Class RegexSCMSourceFilterTrait
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<T>
-
- jenkins.scm.api.trait.SCMTrait<SCMNavigatorTrait>
-
- jenkins.scm.api.trait.SCMNavigatorTrait
-
- jenkins.scm.impl.trait.RegexSCMSourceFilterTrait
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<SCMNavigatorTrait>
public class RegexSCMSourceFilterTrait extends SCMNavigatorTrait
Decorates aSCMNavigator
with aSCMSourcePrefilter
that excludes projects with names that do not match a user supplied regular expression.- Since:
- 2.2.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RegexSCMSourceFilterTrait.DescriptorImpl
Our descriptor.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description RegexSCMSourceFilterTrait(String regex)
Stapler constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
decorateContext(SCMNavigatorContext<?,?> context)
SPI: Override this method to decorate aSCMNavigatorContext
.String
getRegex()
Gets the regular expression.-
Methods inherited from class jenkins.scm.api.trait.SCMNavigatorTrait
_for, _for, all, applyToBuilder, applyToContext, applyToObserver, decorateBuilder, decorateObserver, getDescriptor, includeCategory, isCategoryEnabled
-
-
-
-
Constructor Detail
-
RegexSCMSourceFilterTrait
@DataBoundConstructor public RegexSCMSourceFilterTrait(@NonNull String regex)
Stapler constructor.- Parameters:
regex
- the regular expression.
-
-
Method Detail
-
getRegex
@NonNull public String getRegex()
Gets the regular expression.- Returns:
- the regular expression.
-
decorateContext
protected void decorateContext(SCMNavigatorContext<?,?> context)
SPI: Override this method to decorate aSCMNavigatorContext
. You can assume that yourSCMNavigatorTraitDescriptor.isApplicableToContext(Class)
istrue
within this method and that the provided context is an instance ofSCMNavigatorTraitDescriptor.getContextClass()
.- Overrides:
decorateContext
in classSCMNavigatorTrait
- Parameters:
context
- the context (invariant:SCMNavigatorTraitDescriptor.isApplicableToContext(Class)
istrue
andSCMNavigatorTraitDescriptor.getContextClass()
Class.isInstance(Object)
) istrue
)
-
-