It is sometimes useful to permit the end-user to modify certain characteristics of a pattern, such as whether to enable features that might be costly, or to change a set of default paths or package names. This is enabled with pattern
configuration blocks. Pattern configuration is new in TPL 1.2.
Changes in the pattern configuration block revision number may reset the pattern configuration changes to the default values
If you install a Technology Knowledge Update (TKU) which contains an update to a pattern configuration block that requires its major revision number to be incremented, any end-user configuration changes to that pattern (made through the pattern configuration block) are lost and the default pattern values are restored.
The following topics are covered in this section:
Configuration block definition
configuration blocks are top-level elements. Like other elements, they have a name and a version number. Pattern modules can import
configuration blocks from other modules, using the usual version numbering conventions.
The form of a
configuration block is:
Configuration items are given a human-readable description to be shown in the user interface, an identifier to use in patterns, and a default value. The default value is the value used if the configuration item has not been changed by the user. It also determines the type of the configuration item — the user interface will only allow the user to change the setting to a value with the same type. The valid types for configuration items are text string, integer, boolean, list of strings, and list of integers.
This example shows a number of configuration settings:
Using configuration settings
Configuration settings are used in patterns by giving the scoped name of the
configuration block, followed by the configuration setting name:
Types of default empty lists
The types of configurations items can usually be inferred from the type of the default value. However, if the default value of a configuration item is an empty list, the system cannot know whether it is a list of text strings or a list of integers. To tell the system the type of such a configuration item, an example of the type should be provided in parentheses after the empty list: