Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-269

Refactoring of configuration parameter, jdbc parameter and plugin.xsd for using the same syntax

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 2.0.0 M3
    • 2.0.0 M3
    • Kernel
    • None

      Current implementation of configuration parameter, JdbcParameter and other kind of parameter are duplicated with different XML syntax in plugin.xml.
      The following XML will be changed, from:

        <param id="runtime.datasource.core.jdbc.driver">
          <LabelKey>PLUGINS_CORE_DATASOURCE_CORE_CONFIG_DRIVER_LABEL</LabelKey>
          <DescriptionKey>PLUGINS_CORE_DATASOURCE_CORE_CONFIG_DRIVER_DESCRIPTION</DescriptionKey>
          <Type>string</Type>
          <DefaultValue>com.mysql.jdbc.Driver</DefaultValue>
          <Validation>
           <mandatory/>
          </Validation>
          <Category>PLUGINS_CORE_DATASOURCE_CORE_CONFIG_JDBC_CATEGORY_DATASOURCE</Category>
          <Group>PLUGINS_CORE_DATASOURCE_CORE_CONFIG_JDBC_CATEGORY_DATASOURCE_GROUP_CORE</Group>
          <Order>10</Order>
        </param>
      

      to:

        <param id="runtime.datasource.core.jdbc.driver" type="string">
          <label i18n="true">PLUGINS_CORE_DATASOURCE_CORE_CONFIG_DRIVER_LABEL</label>
          <description i18n="true">PLUGINS_CORE_DATASOURCE_CORE_CONFIG_DRIVER_DESCRIPTION</description>
          <validation>
            <mandatory/>
          </validation>
          <default-value>com.mysql.jdbc.Driver</default-value>
          <category i18n="true">PLUGINS_CORE_DATASOURCE_CORE_CONFIG_JDBC_CATEGORY_DATASOURCE</category>
          <group i18n="true">PLUGINS_CORE_DATASOURCE_CORE_CONFIG_JDBC_CATEGORY_DATASOURCE_GROUP_CORE</group>
          <order>10</order>
        </param>
      

      There will be completion on type attribute because before we always forget for a number if it is an int, an integer or a long .

      Validation and enumeration can now have both static implementation or Avalon based implementation.
      Validator can now provide multiple error label (I18nizableText) instead of just a boolean.

      With RUNTIME-268 the XML syntax can be extended for definition of parameter with additional properties.
      org.ametys.runtime.util.parameter.AbstractParameterParser can therefore be used for parsing a XML configuration into a org.ametys.runtime.util.parameter.Parameter subtype.

            Unassigned Unassigned
            yabon Sébastien Launay (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: