public class

PreReceiveHookModuleDescriptor

extends BaseScmHookModuleDescriptor<T>
java.lang.Object
   ↳ com.atlassian.plugin.descriptors.AbstractModuleDescriptor<T>
     ↳ com.atlassian.bitbucket.scm.BaseWeightedModuleDescriptor<T>
       ↳ com.atlassian.bitbucket.hook.BaseScmHookModuleDescriptor<T>
         ↳ com.atlassian.bitbucket.hook.PreReceiveHookModuleDescriptor

Class Overview

Provides a PreReceiveHook implementation.

Usage example:

     <pre-receive-hook key="myPreReceiveHook" name="Show some example" class="com.mycompany.example.plugin.myhook.MyPreReceiveHook">
       <description>A pre-receive hook example that disables deleting of branches</description>
     </pre-receive-hook>
 

The (optional) weight attribute defines the order in which PreReceiveHook implementations will be executed. Lower weights are executed earlier and the default weight is 1000. If a PreReceiveHook that is executed earlier returns true in its onReceive(Repository, Collection, HookResponse) method, subsequent hooks won't be executed. The module key (of the form plugin.key:module.key) will be used as a secondary sort factor to ensure a deterministic order for a given set of modules. The weight attribute was added in 3.8 and will be ignored in older versions of Stash.

Adding a weight will not necessarily lead to a stable and predictable execution order, as the overall order depends on the weight attribute values and module keys of other pre-receive hooks that may be added or removed over time.

Summary

Fields
public static final String XML_ELEMENT_NAME
[Expand]
Inherited Fields
From class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
From interface com.atlassian.bitbucket.util.Weighted
Public Constructors
PreReceiveHookModuleDescriptor(ModuleFactory moduleFactory)
[Expand]
Inherited Methods
From class com.atlassian.bitbucket.hook.BaseScmHookModuleDescriptor
From class com.atlassian.bitbucket.scm.BaseWeightedModuleDescriptor
From class com.atlassian.plugin.descriptors.AbstractModuleDescriptor
From class java.lang.Object
From interface com.atlassian.bitbucket.util.Weighted
From interface com.atlassian.plugin.ModuleDescriptor
From interface com.atlassian.plugin.Resourced
From interface com.atlassian.plugin.ScopeAware
From interface com.atlassian.plugin.StateAware
From interface java.lang.Comparable

Fields

public static final String XML_ELEMENT_NAME

Public Constructors

public PreReceiveHookModuleDescriptor (ModuleFactory moduleFactory)