Package net.solarnetwork.node.setup
Interface PluginService
public interface PluginService
Service for managing dynamic "plugins" within the application.
- Version:
- 1.0
- Author:
- matt
-
Method Summary
Modifier and TypeMethodDescriptionavailablePlugins(PluginQuery query, Locale locale) Get a list of all available plugins.installedPlugins(Locale locale) Get a list of all installed plugins.installPlugins(Collection<String> uids, Locale locale) Install one or more plugins based on their UIDs.previewInstallPlugins(Collection<String> uids, Locale locale) Get a "preview" status for installing a set of plugins based on their UIDs.voidAsk the PluginService to refresh its list of available plugins.removePlugins(Collection<String> uids, Locale locale) Remove one or more plugins based on their UIDs.statusForProvisioningOperation(String provisionID, Locale locale) Get a provisioning status based on a provisioning operation ID.
-
Method Details
-
refreshAvailablePlugins
void refreshAvailablePlugins()Ask the PluginService to refresh its list of available plugins. This is designed for implementations where the available plugins might change over time. -
availablePlugins
Get a list of all available plugins.- Parameters:
query- an optional query to apply to limit the returned results by. Pass null to request all available Plugin instanceslocale- an optional locale to apply to PluginInfo- Returns:
- list of available plugins, or an empty list if none available
-
installedPlugins
Get a list of all installed plugins.- Parameters:
locale- an optional locale to apply to PluginInfo- Returns:
- list of installed plugins, or an empty list if none installed
-
removePlugins
Remove one or more plugins based on their UIDs. This method might return immediately to allow the provisioning operation to complete asynchronously.- Parameters:
uids- the collection of plugins to removelocale- an optional locale to apply to the returned PluginProvisionStatus- Returns:
- a status object
-
previewInstallPlugins
Get a "preview" status for installing a set of plugins based on their UIDs. This will return a status object synchronously that will contain details such as the list of plugins that will be installed and how many bytes must be downloaded. Note that the returnedPluginProvisionStatus.getProvisionID()will not be valid for passing tostatusForProvisioningOperation(String, Locale).- Parameters:
uids- the collection of plugins to removelocale- an optional locale to apply to the returned PluginProvisionStatus- Returns:
- a status object
-
installPlugins
Install one or more plugins based on their UIDs. This method might return immediately to allow the provisioning operation to complete asynchronously.- Parameters:
uids- the collection of plugins to removelocale- an optional locale to apply to the returned PluginProvisionStatus- Returns:
- a status object
-
statusForProvisioningOperation
Get a provisioning status based on a provisioning operation ID. The ID is one that would have been returned via a previous call to other methods likeinstalledPlugins(Locale). The service will only maintain status information for a limited amount of time, and thus might return null even for an ID previously returned.- Parameters:
provisionID- the provisioning operation ID to find the status forlocale- an optional locale to apply to the returned PluginProvisionStatus- Returns:
- the status, or null if the status is not available
-