Package jenkins.scm.impl.trait
Class RegexSCMHeadFilterTrait
java.lang.Object
hudson.model.AbstractDescribableImpl<T>
jenkins.scm.api.trait.SCMTrait<SCMSourceTrait>
jenkins.scm.api.trait.SCMSourceTrait
jenkins.scm.impl.trait.RegexSCMHeadFilterTrait
- All Implemented Interfaces:
ExtensionPoint
,Describable<SCMSourceTrait>
Decorates a
SCMSource
with a SCMHeadPrefilter
that excludes SCMHead
instances with names that
do not match a user supplied regular expression.- Since:
- 2.2.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Our descriptor.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
decorateContext
(SCMSourceContext<?, ?> context) SPI: Override this method to decorate aSCMSourceContext
.getRegex()
Gets the regular expression.Methods inherited from class jenkins.scm.api.trait.SCMSourceTrait
_for, _for, all, applyToBuilder, applyToContext, applyToObserver, decorateBuilder, decorateObserver, getDescriptor, includeCategory, isCategoryEnabled
-
Constructor Details
-
RegexSCMHeadFilterTrait
Stapler constructor.- Parameters:
regex
- the regular expression.
-
-
Method Details
-
getRegex
Gets the regular expression.- Returns:
- the regular expression.
-
decorateContext
SPI: Override this method to decorate aSCMSourceContext
. You can assume that yourSCMSourceTraitDescriptor.isApplicableToContext(Class)
istrue
within this method and that the provided context is an instance ofSCMSourceTraitDescriptor.getContextClass()
.- Overrides:
decorateContext
in classSCMSourceTrait
- Parameters:
context
- the context (invariant:SCMSourceTraitDescriptor.isApplicableToContext(Class)
istrue
andSCMSourceTraitDescriptor.getContextClass()
Class.isInstance(Object)
) istrue
)
-