Class DefaultPluginsCollector

  • All Implemented Interfaces:
    PluginsCollector

    public class DefaultPluginsCollector
    extends java.lang.Object
    implements PluginsCollector
    Default implementation of plug-ins collector interface. Supported configuration parameters are:
    org.java.plugin.boot.pluginsRepositories
    Comma separated list of local plug-in repositories, given folders will be scanned for plug-ins. Default value is ./plugins.
    org.java.plugin.boot.pluginsLocationsDescriptors
    Comma separated list of URLs for XML syntax files that describe available plug-in locations (see file syntax bellow). No default value provided.

    Given repositories are scanned recursively collecting all folders that contain plugin.xml or plugin-fragment.xml and *.zip and *.jar files.

    Plug-ins locations descriptor is a simple XML syntax file that stores locations of all available plug-in manifests and contexts (in terms of PluginManager.PluginLocation). Here is an example:

    <plugins>
       <plugin
         manifest="http://localhost/myPlugins/plugin1/plugin.xml"
         context="http://localhost/myPlugins/plugin1/"/>
       <plugin
         manifest="http://localhost/myPlugins/plugin2/plugin.xml"
         context="http://localhost/myPlugins/plugin2/"/>
       <plugin
         manifest="http://www.plugins.com/repository/plugin1/plugin.xml"
         context="http://www.plugins.com/repository/plugin1/"/>
       <plugin
         manifest="http://www.plugins.com/repository/plugin1/plugin.xml"
         context="http://www.plugins.com/repository/plugin1/"/>
     </plugins>
    Using such simple descriptor you may, for example, publish plug-ins on a site to make them available for clients without needing to download plug-ins manually.

    Version:
    $Id$