Package su.onno.ui
Class WidgetPluginScanner
java.lang.Object
su.onno.ui.WidgetPluginScanner
Discovers consumer widget-plugin modules on the classpath at startup. The
su.onno.widgets
Gradle plugin compiles each src/main/widgets/*.tsx into onno-plugins/<name>.js,
which ships in the app's jar; this scanner globs that location once and holds the sorted script
file names.
The names feed two things: ThemeController advertises them (base-path-prefixed) as
pluginScripts from GET /api/config, and a resource handler serves the files under
{onno.ui.path}/plugins/**. Scanning once at boot is fine — the classpath is fixed for the
life of the process.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe discovered plugin module file names (e.g.The single-classpath location the resource handler serves the modules from (trailing slash).The discovered plugin stylesheet file names (e.g.
-
Constructor Details
-
WidgetPluginScanner
-
-
Method Details
-
scriptNames
The discovered plugin module file names (e.g.EventLog.js), sorted, deduplicated. -
styleNames
The discovered plugin stylesheet file names (e.g.com-acme-app-widgets.css), sorted, deduplicated. -
serveLocation
The single-classpath location the resource handler serves the modules from (trailing slash).
-