Interface MinimalHookScript

All Known Subinterfaces:
HookScript

public interface MinimalHookScript
A minimal representation of a HookScript, retaining only its ID and version.
Since:
6.2
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Retrieves the script's globally unique ID.
    int
    Retrieves the script's version.
  • Method Details

    • getId

      long getId()
      Retrieves the script's globally unique ID.

      When a hook script is created it is assigned an ID, which can be used to retrieve the script later in order to update or delete it, or configure it to run in a given scope. Apps are expected to track the IDs of the scripts they create so they can manage them afterward.

      Returns:
      the script's ID
    • getVersion

      int getVersion()
      Retrieves the script's version.

      Each time a script's contents are updated, it receives a new version. Updating a script's description, name or plugin key does not update its version.

      If a script's contents are updated concurrently, one updater will succeed and the rest will fail. If a script's metadata is updated concurrently, the last updater "wins" and other updates are overwritten.

      Returns:
      the version of the script