Enum Class HookScriptType

java.lang.Object
java.lang.Enum<HookScriptType>
com.atlassian.bitbucket.hook.script.HookScriptType
All Implemented Interfaces:
Serializable, Comparable<HookScriptType>, Constable

public enum HookScriptType extends Enum<HookScriptType>
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
  • Enum Constant Details

  • Method Details

    • values

      public static HookScriptType[] 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

      public static HookScriptType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • fromId

      @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
    • getId

      public int getId()
      Returns:
      the type's ID