Class HookRegistrationTrait
java.lang.Object
hudson.model.AbstractDescribableImpl<T>
jenkins.scm.api.trait.SCMTrait<jenkins.scm.api.trait.SCMSourceTrait>
jenkins.scm.api.trait.SCMSourceTrait
io.jenkins.plugins.gitlabbranchsource.HookRegistrationTrait
- All Implemented Interfaces:
ExtensionPoint
,Describable<jenkins.scm.api.trait.SCMSourceTrait>
public class HookRegistrationTrait
extends jenkins.scm.api.trait.SCMSourceTrait
A
SCMSourceTrait
for GitLabSCMSource
that overrides the GitLabServers
settings for web hook and system hook registration.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Our constructor.Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorDescriptionHookRegistrationTrait
(GitLabHookRegistration webHookMode, GitLabHookRegistration systemHookMode) Constructor.HookRegistrationTrait
(String webHookMode, String systemHookMode) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
decorateContext
(jenkins.scm.api.trait.SCMSourceContext<?, ?> context) final GitLabHookRegistration
Gets the system hook mode of registration to apply.final GitLabHookRegistration
Gets the web hook mode of registration to apply.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
-
HookRegistrationTrait
@DataBoundConstructor public HookRegistrationTrait(@NonNull String webHookMode, @NonNull String systemHookMode) Constructor.- Parameters:
webHookMode
- the web hook mode of registration to apply.systemHookMode
- the system hook mode of registration to apply.
-
HookRegistrationTrait
public HookRegistrationTrait(@NonNull GitLabHookRegistration webHookMode, @NonNull GitLabHookRegistration systemHookMode) Constructor.- Parameters:
webHookMode
- the web hook mode of registration to apply.systemHookMode
- the system hook mode of registration to apply.
-
-
Method Details
-
getWebHookMode
Gets the web hook mode of registration to apply.- Returns:
- the web hook mode of registration to apply.
-
getSystemHookMode
Gets the system hook mode of registration to apply.- Returns:
- the system hook mode of registration to apply.
-
decorateContext
protected void decorateContext(jenkins.scm.api.trait.SCMSourceContext<?, ?> context) - Overrides:
decorateContext
in classjenkins.scm.api.trait.SCMSourceTrait
-