@Dependent public class PluginJarProcessor extends Object
PluginProcessor
and are added to the host page's <head> element by Errai,
so the plugin scripts execute before the web application's main script runs.
This is required to ensure plugins and their managed beans are discoverable by
Errai's bean manager when the main application bootstraps.
Uberfire Runtime Plugins are loaded after Errai and Uberfire bootstrap.Constructor and Description |
---|
PluginJarProcessor(javax.enterprise.inject.Instance<PluginProcessor> pluginProcessors,
javax.enterprise.event.Event<PluginReloadedEvent> pluginsReloadedEvent) |
Modifier and Type | Method and Description |
---|---|
void |
init(String pluginsDir,
String pluginsDeploymentDir)
Processes and loads the currently deployed plugins.
|
void |
loadPlugins(Path path,
boolean notifyClients)
Unpacks the provided plugin (path pointing to a JAR file), searches for
the corresponding plugins files and process the plugin with the
corresponding
PluginProcessor . |
void |
reload()
Clears the plugins and reloads all currently deployed plugins.
|
@Inject public PluginJarProcessor(@Any javax.enterprise.inject.Instance<PluginProcessor> pluginProcessors, javax.enterprise.event.Event<PluginReloadedEvent> pluginsReloadedEvent)
public void init(String pluginsDir, String pluginsDeploymentDir) throws IOException
pluginsDir
- the plugin directory, must not be null.pluginsDeploymentDir
- the directory to deploy plugin contents to, must not be null.IOException
public void reload() throws IOException
PluginReloadedEvent
when done.IOException
public void loadPlugins(Path path, boolean notifyClients)
PluginProcessor
.path
- path to a deployed jar file.notifyClients
- true if clients should be notified (of added and updated
plugins) through CDI events, otherwise false.Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.