Home
Categories
Dictionary
Download
Project Details
Changes Log
Tutorials
FAQ
License

Named configurations



In some cases it can be useful to specify a named configuration 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.

For the moment named configurations are not supported for the application configuration. It is only supported for Plugins.

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 is also possible to define more than one configuration for a Plugin (configurations must be separated by a semicolon). For example:
   MDIPluginClass: my.plugin.MyPluginClass
   MDIPluginConfig: myConfig;myConfig2

Accessing configuration properties for a named configuration


It is better to access configuration properties by their names (for setting or getting their values) for a name configuration.

Deserializing and serializing a named configuration

There are two ways to deserialize and serialize a named configuration:
  • If you did not access properties by their names, you must use the getConfiguration and putConfiguration methods with the configuration name
  • Else if you access properties by their names, you won't need to implement these methods, because the framework will do it for you

Without accessing configuration properties by name

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