Search in sources :

Example 26 with AttributeMetaData

use of com.commercetools.sync.products.AttributeMetaData in project commercetools-sync-java by commercetools.

the class BuildProductVariantAttributesUpdateActionsTest method withNoMatchingAttributes_ShouldBuildUnsetAndSetActions.

@Test
void withNoMatchingAttributes_ShouldBuildUnsetAndSetActions() {
    // Preparation
    final String productKey = "foo";
    final String variantKey = "foo";
    when(oldProduct.getKey()).thenReturn(productKey);
    final List<AttributeDraft> newAttributes = singletonList(AttributeDraftBuilder.of(BOOLEAN_ATTRIBUTE_TRUE).build());
    when(newProductVariant.getAttributes()).thenReturn(newAttributes);
    when(newProductVariant.getKey()).thenReturn(variantKey);
    final List<Attribute> oldAttributes = singletonList(TEXT_ATTRIBUTE_BAR);
    when(oldProductVariant.getAttributes()).thenReturn(oldAttributes);
    when(oldProductVariant.getKey()).thenReturn(variantKey);
    final HashMap<String, AttributeMetaData> attributesMetaData = new HashMap<>();
    final AttributeDefinition booleanAttributeDefinition = AttributeDefinitionBuilder.of(BOOLEAN_ATTRIBUTE_TRUE.getName(), ofEnglish("label"), BooleanAttributeType.of()).build();
    final AttributeDefinition textAttributeDefinition = AttributeDefinitionBuilder.of(TEXT_ATTRIBUTE_BAR.getName(), ofEnglish("label"), StringAttributeType.of()).build();
    attributesMetaData.put(BOOLEAN_ATTRIBUTE_TRUE.getName(), AttributeMetaData.of(booleanAttributeDefinition));
    attributesMetaData.put(TEXT_ATTRIBUTE_BAR.getName(), AttributeMetaData.of(textAttributeDefinition));
    // Test
    final List<UpdateAction<Product>> updateActions = buildProductVariantAttributesUpdateActions(oldProduct, newProductDraft, oldProductVariant, newProductVariant, attributesMetaData, syncOptions);
    // Assertion
    assertThat(updateActions).containsExactlyInAnyOrder(SetAttribute.ofUnsetAttribute(oldProductVariant.getId(), TEXT_ATTRIBUTE_BAR.getName(), true), SetAttribute.of(oldProductVariant.getId(), AttributeDraftBuilder.of(BOOLEAN_ATTRIBUTE_TRUE).build(), true));
}
Also used : AttributeDraft(io.sphere.sdk.products.attributes.AttributeDraft) Attribute(io.sphere.sdk.products.attributes.Attribute) SetAttribute(io.sphere.sdk.products.commands.updateactions.SetAttribute) AttributeMetaData(com.commercetools.sync.products.AttributeMetaData) HashMap(java.util.HashMap) UpdateAction(io.sphere.sdk.commands.UpdateAction) AttributeDefinition(io.sphere.sdk.products.attributes.AttributeDefinition) Test(org.junit.jupiter.api.Test)

Example 27 with AttributeMetaData

use of com.commercetools.sync.products.AttributeMetaData in project commercetools-sync-java by commercetools.

the class BuildProductVariantAttributesUpdateActionsTest method withSomeNonChangedMatchingAttributesAndNewAttributes_ShouldBuildSetAttributeActions.

@Test
void withSomeNonChangedMatchingAttributesAndNewAttributes_ShouldBuildSetAttributeActions() {
    // Preparation
    final String productKey = "foo";
    final String variantKey = "foo";
    when(oldProduct.getKey()).thenReturn(productKey);
    final List<AttributeDraft> newAttributes = asList(AttributeDraftBuilder.of(BOOLEAN_ATTRIBUTE_TRUE).build(), AttributeDraftBuilder.of(TEXT_ATTRIBUTE_BAR).build(), AttributeDraftBuilder.of(TIME_ATTRIBUTE_10_08_46).build());
    when(newProductVariant.getAttributes()).thenReturn(newAttributes);
    when(newProductVariant.getKey()).thenReturn(variantKey);
    final List<Attribute> oldAttributes = asList(BOOLEAN_ATTRIBUTE_TRUE, TEXT_ATTRIBUTE_BAR);
    when(oldProductVariant.getAttributes()).thenReturn(oldAttributes);
    when(oldProductVariant.getKey()).thenReturn(variantKey);
    final HashMap<String, AttributeMetaData> attributesMetaData = new HashMap<>();
    final AttributeDefinition booleanAttributeDefinition = AttributeDefinitionBuilder.of(BOOLEAN_ATTRIBUTE_TRUE.getName(), ofEnglish("label"), BooleanAttributeType.of()).build();
    final AttributeDefinition textAttributeDefinition = AttributeDefinitionBuilder.of(TEXT_ATTRIBUTE_BAR.getName(), ofEnglish("label"), StringAttributeType.of()).build();
    final AttributeDefinition timeAttributeDefinition = AttributeDefinitionBuilder.of(TIME_ATTRIBUTE_10_08_46.getName(), ofEnglish("label"), TimeAttributeType.of()).build();
    attributesMetaData.put(BOOLEAN_ATTRIBUTE_TRUE.getName(), AttributeMetaData.of(booleanAttributeDefinition));
    attributesMetaData.put(TEXT_ATTRIBUTE_BAR.getName(), AttributeMetaData.of(textAttributeDefinition));
    attributesMetaData.put(TIME_ATTRIBUTE_10_08_46.getName(), AttributeMetaData.of(timeAttributeDefinition));
    // Test
    final List<UpdateAction<Product>> updateActions = buildProductVariantAttributesUpdateActions(oldProduct, newProductDraft, oldProductVariant, newProductVariant, attributesMetaData, syncOptions);
    // Assertion
    assertThat(updateActions).containsExactly(SetAttribute.of(oldProductVariant.getId(), AttributeDraftBuilder.of(TIME_ATTRIBUTE_10_08_46).build(), true));
}
Also used : AttributeDraft(io.sphere.sdk.products.attributes.AttributeDraft) Attribute(io.sphere.sdk.products.attributes.Attribute) SetAttribute(io.sphere.sdk.products.commands.updateactions.SetAttribute) AttributeMetaData(com.commercetools.sync.products.AttributeMetaData) HashMap(java.util.HashMap) UpdateAction(io.sphere.sdk.commands.UpdateAction) AttributeDefinition(io.sphere.sdk.products.attributes.AttributeDefinition) Test(org.junit.jupiter.api.Test)

Example 28 with AttributeMetaData

use of com.commercetools.sync.products.AttributeMetaData in project commercetools-sync-java by commercetools.

the class BuildProductVariantAttributesUpdateActionsTest method withNoMatchingAttributes_WithSomeNoExistingMetaData_ShouldBuildSomeActionsAndTriggerErrorCallback.

@Test
void withNoMatchingAttributes_WithSomeNoExistingMetaData_ShouldBuildSomeActionsAndTriggerErrorCallback() {
    // Preparation
    final String productKey = "foo";
    final String variantKey = "foo";
    when(oldProduct.getKey()).thenReturn(productKey);
    final List<AttributeDraft> newAttributes = singletonList(AttributeDraftBuilder.of(BOOLEAN_ATTRIBUTE_TRUE).build());
    when(newProductVariant.getAttributes()).thenReturn(newAttributes);
    when(newProductVariant.getKey()).thenReturn(variantKey);
    final List<Attribute> oldAttributes = singletonList(TEXT_ATTRIBUTE_BAR);
    when(oldProductVariant.getAttributes()).thenReturn(oldAttributes);
    when(oldProductVariant.getKey()).thenReturn(variantKey);
    final HashMap<String, AttributeMetaData> attributesMetaData = new HashMap<>();
    final AttributeDefinition textAttributeDefinition = AttributeDefinitionBuilder.of(TEXT_ATTRIBUTE_BAR.getName(), ofEnglish("label"), StringAttributeType.of()).build();
    attributesMetaData.put(TEXT_ATTRIBUTE_BAR.getName(), AttributeMetaData.of(textAttributeDefinition));
    // Test
    final List<UpdateAction<Product>> updateActions = buildProductVariantAttributesUpdateActions(oldProduct, newProductDraft, oldProductVariant, newProductVariant, attributesMetaData, syncOptions);
    // Assertion
    assertThat(updateActions).containsExactly(SetAttribute.ofUnsetAttribute(oldProductVariant.getId(), TEXT_ATTRIBUTE_BAR.getName(), true));
    assertThat(errorMessages).containsExactly(format(FAILED_TO_BUILD_ATTRIBUTE_UPDATE_ACTION, BOOLEAN_ATTRIBUTE_TRUE.getName(), variantKey, productKey, format(ATTRIBUTE_NOT_IN_ATTRIBUTE_METADATA, BOOLEAN_ATTRIBUTE_TRUE.getName())));
}
Also used : AttributeDraft(io.sphere.sdk.products.attributes.AttributeDraft) Attribute(io.sphere.sdk.products.attributes.Attribute) SetAttribute(io.sphere.sdk.products.commands.updateactions.SetAttribute) AttributeMetaData(com.commercetools.sync.products.AttributeMetaData) HashMap(java.util.HashMap) UpdateAction(io.sphere.sdk.commands.UpdateAction) AttributeDefinition(io.sphere.sdk.products.attributes.AttributeDefinition) Test(org.junit.jupiter.api.Test)

Example 29 with AttributeMetaData

use of com.commercetools.sync.products.AttributeMetaData in project commercetools-sync-java by commercetools.

the class BuildProductVariantAttributesUpdateActionsTest method withAllMatchingAttributes_ShouldNotBuildActions.

@Test
void withAllMatchingAttributes_ShouldNotBuildActions() {
    // Preparation
    final String productKey = "foo";
    final String variantKey = "foo";
    when(oldProduct.getKey()).thenReturn(productKey);
    final List<AttributeDraft> newAttributes = asList(AttributeDraftBuilder.of(BOOLEAN_ATTRIBUTE_TRUE).build(), AttributeDraftBuilder.of(TEXT_ATTRIBUTE_BAR).build());
    when(newProductVariant.getAttributes()).thenReturn(newAttributes);
    when(newProductVariant.getKey()).thenReturn(variantKey);
    final List<Attribute> oldAttributes = asList(BOOLEAN_ATTRIBUTE_TRUE, TEXT_ATTRIBUTE_BAR);
    when(oldProductVariant.getAttributes()).thenReturn(oldAttributes);
    when(oldProductVariant.getKey()).thenReturn(variantKey);
    final HashMap<String, AttributeMetaData> attributesMetaData = new HashMap<>();
    final AttributeDefinition booleanAttributeDefinition = AttributeDefinitionBuilder.of(BOOLEAN_ATTRIBUTE_TRUE.getName(), ofEnglish("label"), BooleanAttributeType.of()).build();
    final AttributeDefinition textAttributeDefinition = AttributeDefinitionBuilder.of(TEXT_ATTRIBUTE_BAR.getName(), ofEnglish("label"), StringAttributeType.of()).build();
    attributesMetaData.put(BOOLEAN_ATTRIBUTE_TRUE.getName(), AttributeMetaData.of(booleanAttributeDefinition));
    attributesMetaData.put(TEXT_ATTRIBUTE_BAR.getName(), AttributeMetaData.of(textAttributeDefinition));
    // Test
    final List<UpdateAction<Product>> updateActions = buildProductVariantAttributesUpdateActions(oldProduct, newProductDraft, oldProductVariant, newProductVariant, attributesMetaData, syncOptions);
    // Assertion
    assertThat(updateActions).isEmpty();
}
Also used : AttributeDraft(io.sphere.sdk.products.attributes.AttributeDraft) Attribute(io.sphere.sdk.products.attributes.Attribute) SetAttribute(io.sphere.sdk.products.commands.updateactions.SetAttribute) AttributeMetaData(com.commercetools.sync.products.AttributeMetaData) HashMap(java.util.HashMap) UpdateAction(io.sphere.sdk.commands.UpdateAction) AttributeDefinition(io.sphere.sdk.products.attributes.AttributeDefinition) Test(org.junit.jupiter.api.Test)

Example 30 with AttributeMetaData

use of com.commercetools.sync.products.AttributeMetaData in project commercetools-sync-java by commercetools.

the class ProductUpdateActionUtils method buildVariantsUpdateActions.

/**
 * Compares the variants (including the master variants) of a {@link ProductDraft} and a {@link
 * Product}. It returns a {@link List} of variant related update actions. For example:
 *
 * <ul>
 *   <li>{@link AddVariant}
 *   <li>{@link RemoveVariant}
 *   <li>{@link ChangeMasterVariant}
 *   <li>{@link io.sphere.sdk.products.commands.updateactions.SetAttribute}
 *   <li>{@link io.sphere.sdk.products.commands.updateactions.SetAttributeInAllVariants}
 *   <li>{@link io.sphere.sdk.products.commands.updateactions.SetSku}
 *   <li>{@link io.sphere.sdk.products.commands.updateactions.AddExternalImage}
 *   <li>{@link io.sphere.sdk.products.commands.updateactions.RemoveImage}
 *   <li>{@link io.sphere.sdk.products.commands.updateactions.AddPrice}
 *   <li>... and more variant level update actions.
 * </ul>
 *
 * If both the {@link ProductProjection} and the {@link ProductDraft} have identical variants,
 * then no update actions are needed and hence an empty {@link List} is returned.
 *
 * <p>NOTE: Comparison is done against the staged projection of the old product.
 *
 * <p>{@link ProductProjection} which should be updated.
 *
 * @param oldProduct the productprojection which should be updated.
 * @param newProduct the product draft where we get the new meta title.
 * @param 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 (See {@link
 *     ProductSyncOptions} for more info).
 * @param attributesMetaData a map of attribute name -&gt; {@link AttributeMetaData}; which
 *     defines attribute information: its name and whether it has the constraint "SameForAll" or
 *     not.
 * @return A list of product variant-specific update actions.
 */
@Nonnull
public static List<UpdateAction<Product>> buildVariantsUpdateActions(@Nonnull final ProductProjection oldProduct, @Nonnull final ProductDraft newProduct, @Nonnull final ProductSyncOptions syncOptions, @Nonnull final Map<String, AttributeMetaData> attributesMetaData) {
    if (haveInvalidMasterVariants(oldProduct, newProduct, syncOptions)) {
        return emptyList();
    }
    final ProductVariant oldMasterVariant = oldProduct.getMasterVariant();
    final List<ProductVariant> oldProductVariantsWithoutMaster = oldProduct.getVariants();
    final Map<String, ProductVariant> oldProductVariantsNoMaster = collectionToMap(oldProductVariantsWithoutMaster, ProductVariant::getKey);
    final Map<String, ProductVariant> oldProductVariantsWithMaster = new HashMap<>(oldProductVariantsNoMaster);
    oldProductVariantsWithMaster.put(oldMasterVariant.getKey(), oldMasterVariant);
    final List<ProductVariantDraft> newAllProductVariants = new ArrayList<>(newProduct.getVariants());
    newAllProductVariants.add(newProduct.getMasterVariant());
    // Remove missing variants, but keep master variant (MV can't be removed)
    final List<UpdateAction<Product>> updateActions = buildRemoveUpdateActions(oldProductVariantsWithoutMaster, newAllProductVariants, ProductVariant::getKey, ProductVariantDraft::getKey, variant -> RemoveVariant.ofVariantId(variant.getId(), true));
    emptyIfNull(newAllProductVariants).forEach(newProductVariant -> {
        if (newProductVariant == null) {
            handleBuildVariantsUpdateActionsError(oldProduct, NULL_VARIANT, syncOptions);
        } else {
            final String newProductVariantKey = newProductVariant.getKey();
            if (isBlank(newProductVariantKey)) {
                handleBuildVariantsUpdateActionsError(oldProduct, BLANK_VARIANT_KEY, syncOptions);
            } else {
                final ProductVariant matchingOldVariant = oldProductVariantsWithMaster.get(newProductVariantKey);
                final List<UpdateAction<Product>> updateOrAddVariant = ofNullable(matchingOldVariant).map(oldVariant -> collectAllVariantUpdateActions(getSameForAllUpdateActions(updateActions), oldProduct, newProduct, oldVariant, newProductVariant, attributesMetaData, syncOptions)).orElseGet(() -> singletonList(buildAddVariantUpdateActionFromDraft(newProductVariant)));
                updateActions.addAll(updateOrAddVariant);
            }
        }
    });
    updateActions.addAll(buildChangeMasterVariantUpdateAction(oldProduct, newProduct, syncOptions));
    return updateActions;
}
Also used : ProductVariant(io.sphere.sdk.products.ProductVariant) AddToCategory(io.sphere.sdk.products.commands.updateactions.AddToCategory) SKU(com.commercetools.sync.products.ActionGroup.SKU) Reference(io.sphere.sdk.models.Reference) ProductVariantDraft(io.sphere.sdk.products.ProductVariantDraft) SyncException(com.commercetools.sync.commons.exceptions.SyncException) CommonTypeUpdateActionUtils.buildUpdateActionForReferences(com.commercetools.sync.commons.utils.CommonTypeUpdateActionUtils.buildUpdateActionForReferences) SetCategoryOrderHint(io.sphere.sdk.products.commands.updateactions.SetCategoryOrderHint) UpdateAction(io.sphere.sdk.commands.UpdateAction) SearchKeywords(io.sphere.sdk.search.SearchKeywords) BaseSyncOptions(com.commercetools.sync.commons.BaseSyncOptions) ProductVariantUpdateActionUtils.buildProductVariantImagesUpdateActions(com.commercetools.sync.products.utils.ProductVariantUpdateActionUtils.buildProductVariantImagesUpdateActions) Collections.singletonList(java.util.Collections.singletonList) ChangeName(io.sphere.sdk.products.commands.updateactions.ChangeName) SetTaxCategory(io.sphere.sdk.products.commands.updateactions.SetTaxCategory) UnorderedCollectionSyncUtils.buildRemoveUpdateActions(com.commercetools.sync.internals.utils.UnorderedCollectionSyncUtils.buildRemoveUpdateActions) Map(java.util.Map) PRICES(com.commercetools.sync.products.ActionGroup.PRICES) AddVariant(io.sphere.sdk.products.commands.updateactions.AddVariant) ProductDraft(io.sphere.sdk.products.ProductDraft) ProductProjection(io.sphere.sdk.products.ProductProjection) ChangeMasterVariant(io.sphere.sdk.products.commands.updateactions.ChangeMasterVariant) Collectors.toSet(java.util.stream.Collectors.toSet) ProductVariantUpdateActionUtils.buildProductVariantAttributesUpdateActions(com.commercetools.sync.products.utils.ProductVariantUpdateActionUtils.buildProductVariantAttributesUpdateActions) Collections.emptyList(java.util.Collections.emptyList) Category(io.sphere.sdk.categories.Category) SetAttributeInAllVariants(io.sphere.sdk.products.commands.updateactions.SetAttributeInAllVariants) Set(java.util.Set) ActionGroup(com.commercetools.sync.products.ActionGroup) AttributeMetaData(com.commercetools.sync.products.AttributeMetaData) Product(io.sphere.sdk.products.Product) CommonTypeUpdateActionUtils.areResourceIdentifiersEqual(com.commercetools.sync.commons.utils.CommonTypeUpdateActionUtils.areResourceIdentifiersEqual) State(io.sphere.sdk.states.State) Collectors(java.util.stream.Collectors) String.format(java.lang.String.format) ChangeSlug(io.sphere.sdk.products.commands.updateactions.ChangeSlug) FilterUtils.executeSupplierIfPassesFilter(com.commercetools.sync.commons.utils.FilterUtils.executeSupplierIfPassesFilter) Objects(java.util.Objects) LocalizedString(io.sphere.sdk.models.LocalizedString) IMAGES(com.commercetools.sync.products.ActionGroup.IMAGES) List(java.util.List) Publish(io.sphere.sdk.products.commands.updateactions.Publish) Optional(java.util.Optional) Objects.nonNull(java.util.Objects.nonNull) ProductSyncOptions(com.commercetools.sync.products.ProductSyncOptions) ResourceIdentifier(io.sphere.sdk.models.ResourceIdentifier) CategoryOrderHints(io.sphere.sdk.products.CategoryOrderHints) SetMetaKeywords(io.sphere.sdk.products.commands.updateactions.SetMetaKeywords) SetSearchKeywords(io.sphere.sdk.products.commands.updateactions.SetSearchKeywords) CollectionUtils.collectionToMap(com.commercetools.sync.commons.utils.CollectionUtils.collectionToMap) SetMetaTitle(io.sphere.sdk.products.commands.updateactions.SetMetaTitle) HashMap(java.util.HashMap) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) SetDescription(io.sphere.sdk.products.commands.updateactions.SetDescription) TransitionState(io.sphere.sdk.products.commands.updateactions.TransitionState) SyncFilter(com.commercetools.sync.products.SyncFilter) CollectionUtils.emptyIfNull(com.commercetools.sync.commons.utils.CollectionUtils.emptyIfNull) ATTRIBUTES(com.commercetools.sync.products.ActionGroup.ATTRIBUTES) ProductVariantUpdateActionUtils.buildProductVariantSkuUpdateAction(com.commercetools.sync.products.utils.ProductVariantUpdateActionUtils.buildProductVariantSkuUpdateAction) CollectionUtils.filterCollection(com.commercetools.sync.commons.utils.CollectionUtils.filterCollection) SetMetaDescription(io.sphere.sdk.products.commands.updateactions.SetMetaDescription) Unpublish(io.sphere.sdk.products.commands.updateactions.Unpublish) Nonnull(javax.annotation.Nonnull) Collections.emptyMap(java.util.Collections.emptyMap) Optional.ofNullable(java.util.Optional.ofNullable) ProductVariantUpdateActionUtils.buildProductVariantPricesUpdateActions(com.commercetools.sync.products.utils.ProductVariantUpdateActionUtils.buildProductVariantPricesUpdateActions) ASSETS(com.commercetools.sync.products.ActionGroup.ASSETS) RemoveVariant(io.sphere.sdk.products.commands.updateactions.RemoveVariant) Collectors.toList(java.util.stream.Collectors.toList) StringUtils.isBlank(org.apache.commons.lang3.StringUtils.isBlank) CommonTypeUpdateActionUtils.buildUpdateActions(com.commercetools.sync.commons.utils.CommonTypeUpdateActionUtils.buildUpdateActions) BooleanUtils.toBoolean(org.apache.commons.lang3.BooleanUtils.toBoolean) CommonTypeUpdateActionUtils.buildUpdateAction(com.commercetools.sync.commons.utils.CommonTypeUpdateActionUtils.buildUpdateAction) ProductVariantUpdateActionUtils.buildProductVariantAssetsUpdateActions(com.commercetools.sync.products.utils.ProductVariantUpdateActionUtils.buildProductVariantAssetsUpdateActions) RemoveFromCategory(io.sphere.sdk.products.commands.updateactions.RemoveFromCategory) Collections(java.util.Collections) Referenceable(io.sphere.sdk.models.Referenceable) ResourceImpl(io.sphere.sdk.models.ResourceImpl) HashMap(java.util.HashMap) UpdateAction(io.sphere.sdk.commands.UpdateAction) ProductVariantUpdateActionUtils.buildProductVariantSkuUpdateAction(com.commercetools.sync.products.utils.ProductVariantUpdateActionUtils.buildProductVariantSkuUpdateAction) CommonTypeUpdateActionUtils.buildUpdateAction(com.commercetools.sync.commons.utils.CommonTypeUpdateActionUtils.buildUpdateAction) ArrayList(java.util.ArrayList) ProductVariantDraft(io.sphere.sdk.products.ProductVariantDraft) LocalizedString(io.sphere.sdk.models.LocalizedString) ProductVariant(io.sphere.sdk.products.ProductVariant) Nonnull(javax.annotation.Nonnull)

Aggregations

AttributeMetaData (com.commercetools.sync.products.AttributeMetaData)30 HashMap (java.util.HashMap)28 UpdateAction (io.sphere.sdk.commands.UpdateAction)26 Test (org.junit.jupiter.api.Test)26 AttributeDraft (io.sphere.sdk.products.attributes.AttributeDraft)21 SetAttribute (io.sphere.sdk.products.commands.updateactions.SetAttribute)21 Attribute (io.sphere.sdk.products.attributes.Attribute)20 AttributeDefinition (io.sphere.sdk.products.attributes.AttributeDefinition)18 ProductDraft (io.sphere.sdk.products.ProductDraft)8 ProductSyncOptions (com.commercetools.sync.products.ProductSyncOptions)6 ProductProjection (io.sphere.sdk.products.ProductProjection)6 ProductVariantDraft (io.sphere.sdk.products.ProductVariantDraft)6 SyncFilter (com.commercetools.sync.products.SyncFilter)4 ProductVariantAttributeUpdateActionUtils.buildProductVariantAttributeUpdateAction (com.commercetools.sync.products.utils.ProductVariantAttributeUpdateActionUtils.buildProductVariantAttributeUpdateAction)4 LocalizedString (io.sphere.sdk.models.LocalizedString)4 CollectionUtils.emptyIfNull (com.commercetools.sync.commons.utils.CollectionUtils.emptyIfNull)3 ActionGroup (com.commercetools.sync.products.ActionGroup)3 Product (io.sphere.sdk.products.Product)3 ProductVariant (io.sphere.sdk.products.ProductVariant)3 RemoveVariant (io.sphere.sdk.products.commands.updateactions.RemoveVariant)3