ValidationResolveSwapDiff
Callable
Parameters
previousItem: Item
The previous item to remove
newItem: Item
The new item to add
params: AppearanceUpdateParameters
The appearance update parameters that apply to the diff
Returns ItemDiffResolution
- The diff resolution - a wrapper object containing the final item and a flag indicating whether or not the change was valid.
Resolves an appearance diff where an item is being swapped (i.e. there was an item previously in the asset group, but the new item uses a different asset to the previous item). Swap diffs are handled as the composite of three operations: item removal, item addition, and then property modification. First we check whether the previous item can be removed, then whether the new item can be added, and finally we check that any added properties are permitted.