public enum HookScriptType extends Enum<HookScriptType>
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.
Enum Constant and Description |
---|
POST
Post-style hooks are invoked after changes have been accepted.
|
PRE
Pre-style hooks are invoked before changes are applied to a repository to review, and potentially reject,
the changes.
|
Modifier and Type | Method and Description |
---|---|
static HookScriptType |
fromId(int id) |
int |
getId() |
static HookScriptType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HookScriptType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final HookScriptType POST
PostRepositoryHook
)RepositoryHookService.postUpdate(T)
public static final HookScriptType PRE
PreRepositoryHook
)RepositoryHookService.preUpdate(T)
public static HookScriptType[] values()
for (HookScriptType c : HookScriptType.values()) System.out.println(c);
public static HookScriptType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@Nonnull public static HookScriptType fromId(int id)
id
- the ID to retrieve a type forIllegalArgumentException
- if no type has the specified IDpublic int getId()
Copyright © 2019 Atlassian. All rights reserved.