Interface ActionRegistry


public interface ActionRegistry
Registry for plugin-owned actions that runtime UI contributions can invoke.

Registration requires turboism.action.register. The runtime schedules handlers asynchronously; a handler must not assume the invoking or host UI thread. Register the returned handle with the plugin DisposableScope or close it on disable.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Immutable definition of an action registered with this registry.
    static interface 
    Invocation metadata supplied by the runtime.
  • Method Summary

    Modifier and Type
    Method
    Description
    Registers an action under the supplied plugin-local identifier.
  • Method Details

    • register

      Registration register(String id, ActionRegistry.Action action)
      Registers an action under the supplied plugin-local identifier.

      Duplicate identifiers replace the prior action; the prior handle becomes a no-op. The runtime validates ownership and permissions before accepting the registration.

      Parameters:
      id - non-blank action identifier used by menu and other UI contributions
      action - action definition; its ActionRegistry.Action.id() is descriptive and does not replace id as this registry's key
      Returns:
      a reversible registration; close it to unregister this action if it is still current
      Throws:
      NullPointerException - if id or action is null
      IllegalArgumentException - if id is blank
      CubismPermissionException - if the plugin lacks the registration permission