Plugin API Reference

Most AuraBoot plugins are pure configuration (JSON DSL). When configuration is not enough, the Plugin API exposes two surfaces:

  • SPIs — extension points you implement (annotate with @Extension) to contribute behavior into the platform's pipelines.
  • Services — host-managed beans you inject (@Autowired) to call platform capabilities.

Discovery is built on PF4J (classloader isolation, lifecycle, extension index) layered on Spring (DI, transactions). Plugins are discovered via plugin.json + META-INF/extensions.idx and managed through the Plugin Marketplace.

Lifecycle

Every plugin extends AuraPlugin. The base class exposes the lifecycle as final methods and dispatches to the protected do* hooks you override; the constructor and getNamespace() are required:

public class MyPlugin extends AuraPlugin {
    public MyPlugin(PluginWrapper wrapper) { super(wrapper); }

    @Override public String getNamespace() { return "my-plugin"; }

    @Override protected void doInstall(PluginInstallContext context)     { /* one-time setup */ }
    @Override protected void doEnable(PluginEnableContext context)       { /* register, start workers */ }
    @Override protected void doDisable(PluginDisableContext context)     { /* unregister, stop workers */ }
    @Override protected void doUninstall(PluginUninstallContext context) { /* cleanup persistent state */ }
}

Each lifecycle hook receives its own context type (PluginInstallContext / PluginEnableContext / PluginDisableContext / PluginUninstallContext), all of which extend PluginContext. PluginContext exposes getTenantId(), getPluginId(), getNamespace(), getVersion(), getSettings(), and getSetting(key) / getSetting(key, defaultValue). To call host services, inject them via Spring @Autowired (see below).

SPIs (extension points)

SPIPurpose
CommandHandlerExtensionHook into the Command Pipeline at preExecute / postExecute / onError.
EventListenerExtensionSubscribe to outbox-published domain events (at-least-once).
DataProviderExtensionSupply dynamic data sources to Page Blocks, dashboards, reports.
ValidatorExtensionField-level / cross-field validation beyond DSL constraints.
MenuProviderExtensionContribute menu items dynamically from a plugin.
RestEndpointExtensionRegister custom REST routes served by the platform dispatcher at /api/ext/{namespace}/**.

Services (host beans)

ServicePurpose
MetaModelServiceRead model / field / page / command metadata after overlay merge.
DataAccessorParameterized CRUD over mt_<modelCode> tables with tenant scope.
ConversationTurnServiceThe single chokepoint every chat / agent / ACP turn must traverse.
CommandExecutorProgrammatic entry to the Command Pipeline.

Spring bean injection

All @Extension classes are Spring-managed; inject any host service via @Autowired. Use @Autowired(required = false) for optional accessors (such as FileAccessor, AiProviderAccessor, KnowledgeBaseAccessor) so the plugin runs against both OSS and enterprise platforms.

Publishing to the Marketplace

  1. Validate — aura plugin validate plugins/my-plugin
  2. Package — the CLI bundles JSON resources and compiled extensions
  3. Publish — upload to the Marketplace or distribute as a zip
  4. Install — other tenants install via the Marketplace UI or aura plugin publish

Marketplace metadata lives under plugin.jsonmarketplace:

{
  "marketplace": {
    "category": "CRM",
    "tags": ["sales", "lead-management"],
    "screenshots": ["screenshot-1.png", "screenshot-2.png"],
    "pricing": "free",
    "supportUrl": "https://github.com/yourorg/my-plugin/issues"
  }
}

Next steps