Interface PluginService


public interface PluginService
Service for managing dynamic "plugins" within the application.
Version:
1.0
Author:
matt
  • 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

      List<Plugin> availablePlugins(PluginQuery query, Locale locale)
      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 instances
      locale - an optional locale to apply to PluginInfo
      Returns:
      list of available plugins, or an empty list if none available
    • installedPlugins

      List<Plugin> installedPlugins(Locale locale)
      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

      PluginProvisionStatus removePlugins(Collection<String> uids, Locale locale)
      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 remove
      locale - an optional locale to apply to the returned PluginProvisionStatus
      Returns:
      a status object
    • previewInstallPlugins

      PluginProvisionStatus previewInstallPlugins(Collection<String> uids, Locale locale)
      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 returned PluginProvisionStatus.getProvisionID() will not be valid for passing to statusForProvisioningOperation(String, Locale).
      Parameters:
      uids - the collection of plugins to remove
      locale - an optional locale to apply to the returned PluginProvisionStatus
      Returns:
      a status object
    • installPlugins

      PluginProvisionStatus installPlugins(Collection<String> uids, Locale locale)
      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 remove
      locale - an optional locale to apply to the returned PluginProvisionStatus
      Returns:
      a status object
    • statusForProvisioningOperation

      PluginProvisionStatus statusForProvisioningOperation(String provisionID, Locale locale)
      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 like installedPlugins(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 for
      locale - an optional locale to apply to the returned PluginProvisionStatus
      Returns:
      the status, or null if the status is not available