public final enum

HookScriptType

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ com.atlassian.bitbucket.hook.script.HookScriptType

Class Overview

Denotes a HookScript's type.

Because pre-style hook scripts are able to reject changes, they are generally written with different expectations/behaviors than post-style scripts, which can only react to changes. Each HookScript has a specific type, and is invoked accordingly.

Summary

Enum Values
HookScriptType  POST  Post-style hooks are invoked after changes have been accepted. 
HookScriptType  PRE  Pre-style hooks are invoked before changes are applied to a repository to review, and potentially reject, the changes. 
Public Methods
@Nonnull static HookScriptType fromId(int id)
int getId()
static HookScriptType valueOf(String name)
final static HookScriptType[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final HookScriptType POST

Post-style hooks are invoked after changes have been accepted. (PostRepositoryHook)

See Also

public static final HookScriptType PRE

Pre-style hooks are invoked before changes are applied to a repository to review, and potentially reject, the changes. (PreRepositoryHook)

See Also

Public Methods

@Nonnull public static HookScriptType fromId (int id)

Parameters
id the ID to retrieve a type for
Returns
  • the type associated with the ID
Throws
IllegalArgumentException if no type has the specified ID

public int getId ()

Returns
  • the type's ID

public static HookScriptType valueOf (String name)

public static final HookScriptType[] values ()