Interface PluginManager


  • public interface PluginManager
    The PluginManager handles loading and unload plugins from the system.
    • Method Detail

      • getRepostiory

        ArtifactRepository getRepostiory()
        Gets the plugin and library repository.
        Returns:
        global repository.
      • getLoaderRegistry

        PluginLoaderRegistry getLoaderRegistry()
        Gets this PluginManager's PluginLoaderRegistry instance, used to load plugins from LocalArtifacts.
        Returns:
        PluginLoaderRegistry instance.
      • getLoadedPlugins

        java.util.Collection<Plugin> getLoadedPlugins()
        Gets an immutable collection of loaded plugins.
        Returns:
        Plugin collection.
      • getPlugins

        java.util.Collection<PluginRegistration> getPlugins()
        Gets an immutable collection of registered plugins.
        Returns:
        Plugin collection.
      • install

        PluginRegistration install​(ArtifactIdentifier artifactIdentifier)
                            throws java.lang.IllegalArgumentException,
                                   PluginLoadException
        Adds a plugin to the system.
        Parameters:
        artifactIdentifier - Plugin ArtifactIdentifier to add.
        Returns:
        PluginRegistration instance that was installed.
        Throws:
        java.lang.IllegalArgumentException - if there is a problem obtaining a plugin from the given artifact identifier
        PluginLoadException - if there is a problem loading the plugin
      • uninstall

        boolean uninstall​(PluginRegistration registration)
        Removes a plugin from the system.
        Parameters:
        registration - Plugin registration instance to remove.
        Returns:
        true if the plugin was removed, false otherwise.
      • isInstalled

        boolean isInstalled​(ArtifactIdentifier artifactIdentifier)
        Finds if the specified artifact identifier is installed.
        Parameters:
        artifactIdentifier - artifact identifier to check.
        Returns:
        true if the identifier is installed, false otherwise.
      • getPlugin

        default PluginRegistration getPlugin​(ArtifactIdentifier id)
        Finds a previously installed plugin by its artifact identifier.
        Parameters:
        id - artifact identifier
        Returns:
        Plugin instance if one is found, null otherwise.
      • getPlugin

        default PluginRegistration getPlugin​(ManifestIdentifier id)
        Finds a previously installed plugin by its artifact identifier.
        Parameters:
        id - manifest identifier
        Returns:
        Plugin instance if one is found, null otherwise.
      • getEnabledPlugins

        default java.util.Collection<Plugin> getEnabledPlugins()
        Gets a list of enabled plugins.
        Returns:
        enabled plugins.
      • getDisabledPlugins

        default java.util.Collection<Plugin> getDisabledPlugins()
        Gets a list of disabled plugins.
        Returns:
        disabled plugins.
      • resolveIdentifier

        ArtifactIdentifier resolveIdentifier​(java.lang.String friendlyName)
        Resolves an identifier by its friendly name, or returns an artifact identifier otherwise.
        Parameters:
        friendlyName - Friendly name.
        Returns:
        ArtifactIdentifier instance.