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
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.
|key||The 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.1", etc. The operation below would apply on each of those keys.
The new value to set the property key to.
A match string to lookup a property with the specified key by its value, and thus select it for modification (see Lookup-by-value).
default is not specified; optional otherwise.
"1" for numeric data types, and to
"" for the
string type (i.e. the empty string), only for increment/decrement operations.
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.
The new value for the target property/properties when using the lookup-by-value feature.
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.
|dataType||Instructs 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
Overrides global patching behavior for specific entries, or allows basic calculations for numeric data types (i.e.
date). When this attribute is omitted, the specified entry will be set to the specified
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
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).
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
|No; defaults to |
"=". Valid values for all data types are
"keep". For numeric data types, the value
"-" (decrement) is also valid.
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
Supported lookup types are plain string comparison (case-sensitive) and Java-style regular expression.
|No; defaults to |
"plain". Valid values are
|unit||Defines the date component to modify when |
No; defaults to
"day". Can only be specified when
date". Valid values are
|pattern||For 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
No. The default pattern for