- Goals
- User guide
- Classlib developers guide
- Developer guide
- Tester guide
- Porting guide
- Blogs
- Project development
- Glossary
- Proposals
- FAQ
- Papers & presentations
- References
- Research
Configuration script files
The Configure tool uses a "script" to tell it what configuration options to capture, how to capture them and where to put them. Here is a simple example illustrating the basic structure of a script file:
<configureScript>
<type name="integer.type" pattern="[0-9]+"/>
<type name="yesno.type">
<alt value="yes"/>
<alt value="no"/>
</type>
<propFile name="test.properties">
<property name="prop1" type="integer.type"
description="Enter an integer"
default="0"/>
<property name="prop2" type="yesno.type"
description="Do you want to?"
default="no"/>
</propFile>
<screen title="Testing set 1">
<item property="prop1"/>
<item property="prop2"/>
</screen>
</configureScript>
The main elements of a script are "types", "property sets" and "screens". Lets describe these in that order.
A "type" element introduces a property type which defines a set of allowed values for properties specified later in the script file. A property type's value set can be defined using a regular expression (pattern) or by listing the value set. For more details refer to the "Specifying property types" page.
A "propFile" element introduces a property set consisting of the properties to be written to a given property file. Each property in the property set is specified in terms of a property name and a previously defined type, together with a (one line) description and an optional default value. For more details refer to the "Specifying property files" page.
A "screen" element defines the dialog sequence that is used to request configuration properties from the user. The screen consists of a list of properties, together with (multi-line) explanations to be displayed to the user. For more details refer to the "Specifying property screens" page.
Finally, the "Advanced features" page describes the control properties and the import mechanism.
- Printer-friendly version
- Login to post comments