Class ProductTypeSyncUtils
- java.lang.Object
-
- com.commercetools.sync.producttypes.utils.ProductTypeSyncUtils
-
public final class ProductTypeSyncUtils extends java.lang.Object
-
-
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.producttypes.ProductType>>
buildActions(io.sphere.sdk.producttypes.ProductType oldProductType, io.sphere.sdk.producttypes.ProductTypeDraft newProductType, ProductTypeSyncOptions syncOptions)
Compares all the fields (including the attributes seeProductTypeUpdateActionUtils.buildAttributesUpdateActions(io.sphere.sdk.producttypes.ProductType, io.sphere.sdk.producttypes.ProductTypeDraft, com.commercetools.sync.producttypes.ProductTypeSyncOptions)
) of aProductType
and aProductTypeDraft
.
-
-
-
Method Detail
-
buildActions
@Nonnull public static java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.producttypes.ProductType>> buildActions(@Nonnull io.sphere.sdk.producttypes.ProductType oldProductType, @Nonnull io.sphere.sdk.producttypes.ProductTypeDraft newProductType, @Nonnull ProductTypeSyncOptions syncOptions)
Compares all the fields (including the attributes seeProductTypeUpdateActionUtils.buildAttributesUpdateActions(io.sphere.sdk.producttypes.ProductType, io.sphere.sdk.producttypes.ProductTypeDraft, com.commercetools.sync.producttypes.ProductTypeSyncOptions)
) of aProductType
and aProductTypeDraft
. It returns aList
ofUpdateAction
<ProductType
> as a result. If no update action is needed, for example in case where both theProductType
and theProductTypeDraft
have the same fields, an emptyList
is returned.- Parameters:
oldProductType
- theProductType
which should be updated.newProductType
- theProductTypeDraft
where we get the new data.syncOptions
- the sync options wrapper which contains options related to the sync process supplied by the user. For example, custom callbacks to call in case of warnings or errors occurring on the build update action process. And other options (SeeProductTypeSyncOptions
for more info.- Returns:
- A list of productType-specific update actions.
-
-