Package net.gleske.scmfilter.impl.trait
Class RegexSCMOriginFilterTrait
java.lang.Object
hudson.model.AbstractDescribableImpl<T>
jenkins.scm.api.trait.SCMTrait<jenkins.scm.api.trait.SCMSourceTrait>
jenkins.scm.api.trait.SCMSourceTrait
net.gleske.scmfilter.impl.trait.RegexSCMOriginFilterTrait
- All Implemented Interfaces:
ExtensionPoint
,Describable<jenkins.scm.api.trait.SCMSourceTrait>
public class RegexSCMOriginFilterTrait
extends jenkins.scm.api.trait.SCMSourceTrait
Decorates a
SCMSource
with a SCMHeadPrefilter
that excludes SCMHead
instances with names that
do not match a user supplied regular expression.- Since:
- 0.5
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Our descriptor.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorDescriptionRegexSCMOriginFilterTrait
(String regex) Deprecated.RegexSCMOriginFilterTrait
(String regex, String tagRegex) Stapler constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
decorateContext
(jenkins.scm.api.trait.SCMSourceContext<?, ?> context) getRegex()
Gets the branch regular expression.Gets the tag regular expression.Methods inherited from class jenkins.scm.api.trait.SCMSourceTrait
_for, _for, all, applyToBuilder, applyToContext, applyToObserver, decorateBuilder, decorateObserver, getDescriptor, includeCategory, isCategoryEnabled
Methods inherited from class jenkins.scm.api.trait.SCMTrait
asSetList, asSetList, find
-
Constructor Details
-
RegexSCMOriginFilterTrait
@DataBoundConstructor public RegexSCMOriginFilterTrait(@NonNull String regex, @NonNull String tagRegex) Stapler constructor.- Parameters:
regex
- the branch regular expression.tagRegex
- the tag regular expression.
-
RegexSCMOriginFilterTrait
Deprecated.Deprecated constructor kept around for compatibility and migration.- Parameters:
regex
- the regular expression.
-
-
Method Details
-
getRegex
Gets the branch regular expression.- Returns:
- the branch regular expression.
-
getTagRegex
Gets the tag regular expression.- Returns:
- the tag regular expression.
-
decorateContext
protected void decorateContext(jenkins.scm.api.trait.SCMSourceContext<?, ?> context) - Overrides:
decorateContext
in classjenkins.scm.api.trait.SCMSourceTrait
-