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 aProductTypeand 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 aProductTypeand aProductTypeDraft. It returns aListofUpdateAction<ProductType> as a result. If no update action is needed, for example in case where both theProductTypeand theProductTypeDrafthave the same fields, an emptyListis returned.- Parameters:
oldProductType- theProductTypewhich should be updated.newProductType- theProductTypeDraftwhere 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 (SeeProductTypeSyncOptionsfor more info.- Returns:
- A list of productType-specific update actions.
-
-