Class PluginsService


  • public class PluginsService
    extends Object
    • Constructor Detail

      • PluginsService

        public PluginsService​(Settings settings,
                              Path configPath,
                              Path modulesDirectory,
                              Path pluginsDirectory,
                              Collection<Class<? extends Plugin>> classpathPlugins)
        Constructs a new PluginService
        Parameters:
        settings - The settings of the system
        modulesDirectory - The directory modules exist in, or null if modules should not be loaded from the filesystem
        pluginsDirectory - The directory plugins exist in, or null if plugins should not be loaded from the filesystem
        classpathPlugins - Plugins that exist in the classpath which should be loaded
    • Method Detail

      • getPluginSettings

        public List<Setting<?>> getPluginSettings()
      • getPluginSettingsFilter

        public List<String> getPluginSettingsFilter()
      • updatedSettings

        public Settings updatedSettings()
      • onIndexModule

        public void onIndexModule​(IndexModule indexModule)
      • findPluginDirs

        public static List<Path> findPluginDirs​(Path rootPath)
                                         throws IOException
        Extracts all installed plugin directories from the provided rootPath.
        Parameters:
        rootPath - the path where the plugins are installed
        Returns:
        a list of all plugin paths installed in the rootPath
        Throws:
        IOException - if an I/O exception occurred reading the directories
      • filterPlugins

        public <T> List<T> filterPlugins​(Class<T> type)