Difference between revisions of "OS4X Enterprise plugin configuration"
Line 50: | Line 50: | ||
===== adding a new plugin ===== | ===== adding a new plugin ===== | ||
− | Clicking on the "'' | + | Clicking on the "''Add''" button [[Image:add.png]] on the plugin list page leads you to the insert page. |
[[Image:Plugin insert.png]] | [[Image:Plugin insert.png]] |
Revision as of 15:03, 1 May 2012
Plugin configuration
Plugins may need an online configuration of parameters. These parameters, which are defined in every plugin, may be exported in a XML. This XML must be printed to stdout if the parameter "-x
" is given to the plugin.
Example:
localhost:/opt/os4x/bin $ ./os4xplugin_copy -x <?xml version="1.0" encoding="UTF-8"?> <OS4X_plugin_config> <configuration_parameters> <configuration_parameter> <name>targetpath</name> <type>0</type> <defaultvalue></defaultvalue> <comment>Target path for copied file. Leave empty for OS4X's temporary directory.</comment> </configuration_parameter> <configuration_parameter> <name>overwrite</name> <type>2</type> <defaultvalue>1</defaultvalue> <comment>Overwrite existing target file?</comment> </configuration_parameter> <configuration_parameter> <name>create_path</name> <type>2</type> <defaultvalue>1</defaultvalue> <comment> Create target path if unavailable?</comment> </configuration_parameter> </configuration_parameters> </OS4X_plugin_config>
A single configuration parameter has four nodes:
- name: Key string for this configuration parameter. It will never be printed out to the user and should be as short as possible.
- type: Numeric type of configuration value. Valid types are:
- 0: simple strings
- 1: numeric
- 2: boolean
- 3: date
- 4: password
- 5: binary large object (aka BLOB)
- defaultvalue: Default value if no other value is configured.
- comment: Text which is displayed in the configuration GUI.
automatic plugin installation
Automatic plugin installation (adding the plugin itself to the database and/or modifying configuration parameters in the database) are possible via two ways:
web GUI
With the web GUI, several ways exist to update automatic plugin configuration.
adding a new plugin
Clicking on the "Add" button File:Add.png on the plugin list page leads you to the insert page.
You may upload the native plugin executable in order to install it automatically. All parameters and plugin information will be added automatically.
Alternatively, you may give the absolute position, the plugin name and comment manually.
updating an existing plugin
In order to update plugin parameter configuration, rename the binary to a non-existant plugin, then rename it back to the existant. This way, the configuration will be re-read.
command line
Starting the plugin via commandline with the parameter "-a
" installs the plugin (if not-existant in the plugin list) and checks all plugin configuration parameters.
Starting the plugin via commandline with the parameter "-x
" displays the plugin configuration parameters on the standard output, but doesn't install any values to the database.