We need you!

Icon

The IzPack documentation needs work, and you are invited to edit it!

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

The same principle applies to an assignment or calculation operation (i.e. =+-), so that a specific value (or values) could be replaced or modified. Where a match is found in this case, the matched value(s) are replaced/modified by the specified default value for the <entry>. Where no matching key is found, the specified value (or default, when specified) is inserted into the property file. In this way, the 'normal' set, increment, and decrement operations can be performed as expected. See the Examples section for sample config.

Parameters 

AttributeDescriptionRequired
keyThe property key to deal with. If this ends with a dot ., the key is automatically assumed to be an auto-numbered value, e.g. key = "key." would match a collection of keys "key.0", "key.1", etc. The operation below would apply on each of those keys.Yes.
value

The new value to set the property key to.
OR:
A match string to lookup a property with the specified key by its value, and thus select it for modification (see Lookup-by-value).

Yes, if operation="set" and default is not specified; optional otherwise.

Defaults to "1" for numeric data types, and to "" for the string type (i.e. the empty string), only for increment/decrement operations. 

default

A fallback value to set the property key to if no other definition can be found, i.e. if parameter value is not specified, or if the key is not already defined in the property file.
OR:
The new value for the target property/properties when using the lookup-by-value feature. 

Yes, if operation="set" and value is not specified; optional otherwise. When dataType="date", the keyword "now" is allowed.

Where no previous value is defined, defaults to "now" for the date type, and to "0" for the int type, only for increment/decrement operations. 

dataTypeInstructs that entry values be treated as a certain data type during processing. Support currently exists for treating a property value as a date or an integer, instead of as a plain string. Can be used with the pattern parameter to define string parsing and output formatting, and/or with the operation parameter to perform basic calculations.No; defaults to "string". Can also be set to "int" or "date".
operation

Overrides global patching behavior for specific entries, or allows basic calculations for numeric data types (i.e. int and date). When this attribute is omitted, the specified entry will be set to the specified value or default

Entries can be removed from the property file by specifying operation="remove". The entry is removed even if keepOldValues is true. Using operation="keep" preserves the original value of a key when using a fromfile, even if keepOldKeys is false. These operations are valid for all data types, and the parameters value/default do not have to be set. Where value is specified, only keys with matching values are subject to the operation (see Lookup-by-value).

Specifying operation="+" performs an increment operation on numeric data types, or an append operation on the string type. For numeric types, a decrement operation can also be performed, where the value is deducted from the original value of a key (or the specified default, where no original value exists). Use parameter unit to define the scope of increment/decrement on the date type.

No; defaults to "=". Valid values for all data types are "=" (set), "+" (increment/append), "remove", "keep". For numeric data types, the value "-" (decrement) is also valid.
lookupType

The lookup type to use when it is intended that the key/value property (or properties) should be selected for modification according to their value. The match string should be specified in the value parameter, and (for set, increment, and delete operations) the new value should be specified in the default parameter.

Supported lookup types are plain string comparison (case-sensitive) and Java-style regular expression.

No; defaults to "plain". Valid values are "plain""regexp".
unitDefines the date component to modify when dataType="date" and operation is "+" or "-".

No; defaults to "day". Can only be specified when dataType="date". Valid values are "millisecond", "second", "minute", "hour", "day", "week", "month""year".

patternFor numeric data types, a string formatting pattern can be specified using conventional Java formatting placeholders. This defines both the input parsing and output formatting pattern for this entry. See javadoc for DecimalFormat (applies to int) and SimpleDateFormat (applies to date).

No. The default pattern for date is "yyyy/MM/dd HH:mm".

...