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.
  • 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

      @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 class jenkins.scm.api.trait.SCMSourceTrait