Class PluginToolkit

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.swing.event.EventListenerList idListenerList  
    • Constructor Summary

      Constructors 
      Constructor Description
      PluginToolkit()
      Constuct a new default plugin toolkit.
    • Field Detail

      • idListenerList

        protected javax.swing.event.EventListenerList idListenerList
    • Constructor Detail

      • PluginToolkit

        public PluginToolkit()
        Constuct a new default plugin toolkit.
    • Method Detail

      • addPluginDir

        public boolean addPluginDir​(java.lang.String pluginDir)
        Add a new path in the plugin search path.
        Parameters:
        pluginDir - the path to insert in the plugin search list.
        Returns:
        boolean true if the plugin search dir is added, false otherwise.
      • addPluginDir

        public boolean addPluginDir​(java.io.File pluginDir)
        Add a new path in the plugin search path.
        Parameters:
        pluginDir - the path to insert in the plugin search list.
        Returns:
        boolean true if the plugin search dir is added, false otherwise.
      • removePluginDir

        public boolean removePluginDir​(java.lang.String pluginDir)
        Remove the given path from the plugin search path list.
        Parameters:
        pluginDir - the plugin directory to remove.
        Returns:
        true if the directory is succesfully removed, false otherwise.
      • removePluginDir

        public boolean removePluginDir​(java.io.File pluginDir)
        Remove the given path from the plugin search path list.
        Parameters:
        pluginDir - the plugin directory to remove.
        Returns:
        true if the directory is succesfully removed, false otherwise.
      • setPluginPackage

        public void setPluginPackage​(java.lang.String pluginPackage)
        Set the core package of the plugins.
        Parameters:
        pluginPackage - the core package of the plugins
      • loadPlugins

        public java.util.ArrayList<IPlugin> loadPlugins()
        Load all plugins available in the locations given to the toolkit. This method scan the available locations and looks for plugins with given package name. When available plugins are detected, the method instanciate them and store the instanciated plugins in the returned list.
        Returns:
        ArrayList<IPlugin> the plugins availables and instanciated.
        See Also:
        addPluginDir(String), addPluginDir(File), removePluginDir(String), removePluginDir(File)