Enum Class HookScriptType
- All Implemented Interfaces:
Serializable
,Comparable<HookScriptType>
,Constable
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.
- Since:
- 6.2
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic HookScriptType
fromId
(int id) int
getId()
static HookScriptType
Returns the enum constant of this class with the specified name.static HookScriptType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
POST
Post-style hooks are invoked after changes have been accepted. (PostRepositoryHook
)- See Also:
-
PRE
Pre-style hooks are invoked before changes are applied to a repository to review, and potentially reject, the changes. (PreRepositoryHook
)- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromId
- 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
-
getId
public int getId()- Returns:
- the type's ID
-