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
ASCMSourceTrait
forGitLabSCMSource
that overrides theGitLabServers
settings for web hook and system hook registration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HookRegistrationTrait.DescriptorImpl
Our constructor.-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description HookRegistrationTrait(GitLabHookRegistration webHookMode, GitLabHookRegistration systemHookMode)
Constructor.HookRegistrationTrait(String webHookMode, String systemHookMode)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
decorateContext(jenkins.scm.api.trait.SCMSourceContext<?,?> context)
GitLabHookRegistration
getSystemHookMode()
Gets the system hook mode of registration to apply.GitLabHookRegistration
getWebHookMode()
Gets the web hook mode of registration to apply.
-
-
-
Constructor Detail
-
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 Detail
-
getWebHookMode
@NonNull public final GitLabHookRegistration getWebHookMode()
Gets the web hook mode of registration to apply.- Returns:
- the web hook mode of registration to apply.
-
getSystemHookMode
@NonNull public final GitLabHookRegistration 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
-
-