When defining "supportedSourceAndTargetList" elements the "priority" and "maxSourceSizeBytes" are optional
and normally have the default values of 50 and -1 (no limit). It is possible to change those defaults. In precedence
order from most specific to most general these are defined by combinations of "transformerName" and "sourceMediaType".
transformer and source media type default- both specifiedtransformer default- only the transformer name is specifiedsource media type default- only the source media type is specifiedsystem wide default- neither are specified.
Both "priority" and "maxSourceSizeBytes" may be specified in an element, but if only one is specified it is only that
value that is being defaulted.
Being able to change the defaults is particularly useful once a T-Engine has been developed as it allows a system
administrator to handle limitations that are only found later. The system wide defaults are generally not used but are
included for completeness.
The following example says that the "Office" transformer by default should only handle zip files up to 18 Mb and by
default the maximum size of a .doc file to be transformed is 4 Mb. The third example defaults the priority,
possibly allowing another transformer that has specified a priority of say 50 to be used in
preference.
Defaults values are only applied after T-Engine and pipeline files have been read.
{
"supportedDefaults": [
{
"transformerName": "Office", // default for a source type within a transformer
"sourceMediaType": "application/zip",
"maxSourceSizeBytes": 18874368
},
{
"sourceMediaType": "application/msword", // defaults for a source type
"maxSourceSizeBytes": 4194304,
"priority": 45
},
{
"priority": 60 // system wide default
},
{
"maxSourceSizeBytes": -1 // system wide default
}
]
...
}