Interface Action


public interface Action
An action of an extension, as Extension.action(String, ActionHandler) made it.
  • Method Summary

    Modifier and Type
    Method
    Description
    id()
     
    on(Execution execution)
    Where the handler runs: the global region thread (Execution.GLOBAL) until set, like a command from the console.
    page(@Nullable String page)
    Ties the action to a page: only the sessions that may see that page run it, so the page's permission covers it too, and ActionContext.page() is always that page.
    permission(@Nullable String permission)
    The permission needed to run the action, on top of the extension's.
  • Method Details

    • id

      String id()
      Returns:
      the action's name
    • permission

      Action permission(@Nullable String permission)
      The permission needed to run the action, on top of the extension's. The dashboard shows its buttons to everyone who sees the page, and refuses the action to those without it.
      Parameters:
      permission - a permission, or null for the extension's alone
      Returns:
      this action
    • page

      Action page(@Nullable String page)
      Ties the action to a page: only the sessions that may see that page run it, so the page's permission covers it too, and ActionContext.page() is always that page. An action left free runs from any page of the extension that the session may see.
      Parameters:
      page - the page's name, or null to leave the action free
      Returns:
      this action
      Since:
      1.1.0
    • on

      Action on(Execution execution)
      Where the handler runs: the global region thread (Execution.GLOBAL) until set, like a command from the console.
      Parameters:
      execution - where it runs
      Returns:
      this action