Home
Categories
Dictionary
Download
Project Details
Changes Log
Tutorials
FAQ
License

Plugins configuration



The configuration for a Plugin will be automatically retrieved by the application by calling the Plugin.getPluginConfiguration() method. This method returns the Configuration associated with the Plugin.

For example:
   public class OpenImagePlugin extends AbstractMDIPlugin {
      
     public OpenImagePlugin() {
     }   
      
     public Configuration getPluginConfiguration() {
       return MyConfiguration.getInstance();
     }           

Serializing or deserializing the Plugin configuration

Main Article: Configuration instance

The Configuration associated with the Plugin can be deserialized or serialized by the methods used for the configuration:
pluginconfiggeneral

Specifying named configurations

Main Article: Named configurations

In some cases it can be useful to specify one or several named configurations for a Plugin.

This can be useful if you want to share a configuration between several Plugins. In that case you will have only one set of properties associated with a configuration name, and you can refer to this same configuration for more than one Plugin.

Defining configurations for a Plugin

Main Article: Plugin Manifest

The MDIPluginConfig manifest property allows to specify the configuration or configurations associated with the Plugin. For example:
   MDIPluginClass: my.plugin.MyPluginClass
   MDIPluginConfig: myConfig
It must be a list of names separated by ";" characters. For example, the following declaration specifies two configurations:
   MDIPluginClass: my.plugin.MyPluginClass
   MDIPluginConfig: myConfig;myConfig2

Deserializing and serializing a named configuration

The Configuration associated with the Plugin can be deserialized or serialized for each named configuration associated by the methods used for the configuration:
pluginconfig

See also


Categories: Conf

Copyright 2006-2023 Herve Girod. All Rights Reserved. Documentation and source under the LGPL v2 and Apache 2.0 licences