public class PluginConfigurationParser extends Object
File
or an
InputStream
. This configuration describes which new commands this
plugin provides as well as additional jars to load for existing commands.
A example configuration looks like the following:
<?xml version="1.0" encoding="UTF-8"?> <plugin xmlns="http://icedtea.classpath.org/thermostat/plugins/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://icedtea.classpath.org/thermostat/plugins/v1.0"> <commands> <command> <name>platform</name> <description>launches a bare bone Platform Client</description> <options> <group> <required>true</required> <option> <long>optA</long> <short>a</short> <required>true</required> </option> <option> <long>optB</long> <short>b</short> <required>true</required> </option> <option> <long>optC</long> <short>b</short> <required>false</required> </option> <option common="true"> <long>dbUrl</long> </option> <option common="true"> <long>username</long> </option> <option common="true"> <long>password</long> </option> <option common="true"> <long>logLevel</long> </option> </group> <option> <long>heapId</long> <short>h</short> <argument>heapArgument</argument> <required>true</required> <description>the ID of the heapdump to analyze</description> </option> <option> <long>limit</long> <short>L</short> <argument>limitArgument</argument> <required>false</required> <description>limit search to top N results, defaults to 10</description> </option> </options> <bundles> <bundle>thermostat-platform-common-0.6.0-SNAPSHOT.jar</bundle> <bundle>thermostat-platform-swing-0.6.0-SNAPSHOT.jar</bundle> </bundles> <dependencies> <dependency>thermostat-client-core-0.6.0-SNAPSHOT.jar</dependency> </dependencies> </command> <command> <name>platform2</name> <description>launches a bare bone Platform Client</description> <options> <option> <long>heapId2</long> <short>h</short> <argument>heapId2Argument</argument> <required>true</required> <description>the ID of the heapdump to analyze</description> </option> <option> <long>limit2</long> <short>L</short> <argument>limit2Argument</argument> <required>false</required> <description>limit search to top N results, defaults to 10</description> </option> </options> <bundles> <bundle>thermostat-platform-common-0.6.0-SNAPSHOT.jar</bundle> <bundle>thermostat-platform-controllers-0.6.0-SNAPSHOT.jar</bundle> </bundles> <dependencies> <dependency>thermostat-common-core-0.6.0-SNAPSHOT.jar</dependency> </dependencies> </command> </commands> <extensions> <extension> <name>platform3</name> <bundles> <bundle>thermostat-platform-common-0.6.0-SNAPSHOT.jar</bundle> <bundle>thermostat-platform-controllers-0.6.0-SNAPSHOT.jar</bundle> <bundle>thermostat-platform-command-0.6.0-SNAPSHOT.jar</bundle> <bundle>thermostat-platform-common-export-0.6.0-SNAPSHOT.jar</bundle> <bundle>thermostat-platform-swing-0.6.0-SNAPSHOT.jar</bundle> </bundles> <dependencies> <dependency>thermostat-common-core-0.6.0-SNAPSHOT.jar</dependency> <dependency>thermostat-client-core-0.6.0-SNAPSHOT.jar</dependency> </dependencies> </extension> </extensions> </plugin>
This class is thread-safe
Constructor and Description |
---|
PluginConfigurationParser() |
public PluginConfiguration parse(File configurationFile) throws FileNotFoundException, PluginConfigurationValidatorException
Copyright © 2013. All Rights Reserved.