Class UpdateActionsSortUtils
- java.lang.Object
 - 
- com.commercetools.sync.internals.utils.UpdateActionsSortUtils
 
 
- 
public final class UpdateActionsSortUtils extends java.lang.ObjectThis class is only meant for the internal use of the commercetools-sync-java library. 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.products.Product>>sortPriceActions(java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.products.Product>> updateActions)Given a list of update actions, this method returns a copy of the supplied list but sorted with the following precedence:RemovePriceChangePriceorSetProductPriceCustomTypeorSetProductPriceCustomFieldAddPrice 
 - 
 
- 
- 
Method Detail
- 
sortPriceActions
@Nonnull public static java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.products.Product>> sortPriceActions(@Nonnull java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.products.Product>> updateActions)Given a list of update actions, this method returns a copy of the supplied list but sorted with the following precedence:RemovePriceChangePriceorSetProductPriceCustomTypeorSetProductPriceCustomFieldAddPrice
This is to ensure that there are no conflicts when adding a new price that might have a duplicate value for a unique field, which could already be changed or removed.
- Parameters:
 updateActions- list of update actions to sort.- Returns:
 - a new sorted list of update actions (remove, change, add).
 
 
 - 
 
 -