Skip to content

Commit 24b61bf

Browse files
committed
#169: Remove unneeded main method in template.
1 parent b45d279 commit 24b61bf

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

src/main/java/com/commercetools/sync/products/templates/beforeupdatecallback/SyncSingleLocale.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
package com.commercetools.sync.products.templates.beforeupdatecallback;
22

3-
import com.commercetools.sync.products.ProductSync;
4-
import com.commercetools.sync.products.ProductSyncOptions;
5-
import com.commercetools.sync.products.ProductSyncOptionsBuilder;
6-
import io.sphere.sdk.client.SphereClient;
73
import io.sphere.sdk.commands.UpdateAction;
84
import io.sphere.sdk.models.LocalizedString;
95
import io.sphere.sdk.models.LocalizedStringEntry;
@@ -17,7 +13,6 @@
1713
import io.sphere.sdk.products.commands.updateactions.SetMetaKeywords;
1814
import io.sphere.sdk.products.commands.updateactions.SetMetaTitle;
1915
import io.sphere.sdk.producttypes.ProductType;
20-
import org.slf4j.Logger;
2116

2217
import javax.annotation.Nonnull;
2318
import java.util.List;
@@ -30,21 +25,6 @@
3025
import static java.util.stream.Collectors.toMap;
3126

3227
final class SyncSingleLocale {
33-
34-
private static void sync(@Nonnull final SphereClient ctpClient,
35-
@Nonnull final Logger logger,
36-
@Nonnull final List<ProductDraft> newProductDrafts) {
37-
final ProductSyncOptions syncOptions =
38-
ProductSyncOptionsBuilder.of(ctpClient)
39-
.errorCallback(logger::error)
40-
.warningCallback(logger::warn)
41-
.beforeUpdateCallback(SyncSingleLocale::syncFrenchDataOnly)
42-
.build();
43-
44-
final ProductSync productSync = new ProductSync(syncOptions);
45-
productSync.sync(newProductDrafts).toCompletableFuture().join();
46-
}
47-
4828
/**
4929
* Takes in a {@link List} of product update actions that was built from comparing a {@code newDraft} and an
5030
* {@code oldProduct} and maps the update actions so that only localizations with value {@link Locale#FRENCH}

0 commit comments

Comments
 (0)