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