Package com.logicaldoc.util.plugin
Class PluginRegistry
java.lang.Object
com.logicaldoc.util.plugin.PluginRegistry
- Direct Known Subclasses:
- DefaultPluginRegistry
Central point where plugins are loaded and handled. The class is abstract and
 must be personalized as needed. The used implementation can be specified with
 the 'logicaldoc.app.pluginregistry' system property.
- Since:
- 3.0
- Author:
- Marco Meschieri - LogicalDOC
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionCollection<org.java.plugin.registry.Extension> getExtensions(String pluginId, String extensionPoint) Returns the extensions connected to the specified extension pointstatic PluginRegistryorg.java.plugin.PluginManagerorg.java.plugin.registry.PluginDescriptorRetrieve the plugin descriptorstatic FilegetPluginHome(String pluginName) This method retrieves the folder of the given plugin.static FilegetPluginResource(String pluginName, String path) This method retrieves a plugin folder resource (file or folder).Collection<org.java.plugin.registry.PluginDescriptor> Retrieves the list of registered pluginsstatic FileThis method retrieves the plugins root folder.List<org.java.plugin.registry.Extension> getSortedExtensions(String pluginId, String extensionPoint, String sortingParameter) Returns the extensions connected to the specified extension pointvoidInitializes all found pluginsbooleanvoid
- 
Constructor Details- 
PluginRegistrypublic PluginRegistry()
 
- 
- 
Method Details- 
getInstance
- 
initInitializes all found plugins- Parameters:
- pluginsDir- the root folder where the plugins files are located
- Throws:
- PluginException- Error trying to publish the plugins
 
- 
getManagerpublic org.java.plugin.PluginManager getManager()
- 
getExtensionspublic Collection<org.java.plugin.registry.Extension> getExtensions(String pluginId, String extensionPoint) Returns the extensions connected to the specified extension point- Parameters:
- pluginId- The plugin identifier
- extensionPoint- The extension point id
- Returns:
- List of connected extensions
 
- 
getSortedExtensionspublic List<org.java.plugin.registry.Extension> getSortedExtensions(String pluginId, String extensionPoint, String sortingParameter) Returns the extensions connected to the specified extension point- Parameters:
- pluginId- The plugin identifier
- extensionPoint- The extension point id
- sortingParameter- Extensions will be sorted by this parameter (if null 'position' parameter is used)
- Returns:
- List of connected extensions
 
- 
getPluginsRetrieves the list of registered plugins- Returns:
- The list of registered plugins descriptors
 
- 
getPluginRetrieve the plugin descriptor- Parameters:
- pluginId- identifier of the plugin
- Returns:
- The plugin descriptor
 
- 
isRestartRequiredpublic boolean isRestartRequired()
- 
setRestartRequiredpublic void setRestartRequired()
- 
getPluginHomeThis method retrieves the folder of the given plugin. If not exists, it creates the folder. The folder is: conf.plugindir/pluginName- Parameters:
- pluginName- The plugin name
- Returns:
- the directory used as plugin's home
 
- 
getPluginsDirThis method retrieves the plugins root folder. If not exists, it creates the folder. The folder is: conf.plugindir- Returns:
- root of the plugins data folders
 
- 
getPluginResourceThis method retrieves a plugin folder resource (file or folder). If the resource is a folder and not exists, it creates the folder. The folder will be: conf.plugindir/pluginName/path- Parameters:
- pluginName- The plugin name
- path- The resource path
- Returns:
- the plugin's resource
 
 
-