Class ProductSyncOptionsBuilder

    • Method Detail

      • syncFilter

        @Nonnull
        public ProductSyncOptionsBuilder syncFilter​(@Nonnull
                                                    SyncFilter syncFilter)
        Set option that defines SyncFilter for the sync, which defines either a blacklist or a whitelist for filtering certain update action groups.

        The action groups can be a list of any of the values of the enum ActionGroup, namely:

        • ATTRIBUTES
        • PRICES
        • IMAGES
        • CATEGORIES
        • .. and others
        Parameters:
        syncFilter - defines either a blacklist or a whitelist for filtering certain update action groups.
        Returns:
        this instance of ProductSyncOptionsBuilder
      • ensurePriceChannels

        @Nonnull
        public ProductSyncOptionsBuilder ensurePriceChannels​(boolean ensurePriceChannels)
        Set option that indicates whether sync process should create a price channel of given key when it doesn't exist in a target project yet. If set to true, the sync process would try to create the new price channel of the given key, otherwise the sync process would log an error and fail to process the draft with the given price channel key.

        This property is ENSURE_CHANNELS_DEFAULT by default.

        Parameters:
        ensurePriceChannels - boolean that indicates whether sync process should create price channel of given key when it doesn't exist in a target project yet
        Returns:
        this instance of ProductSyncOptionsBuilder
      • getThis

        protected ProductSyncOptionsBuilder getThis()
        Description copied from class: BaseSyncOptionsBuilder
        Returns this instance of T, which extends BaseSyncOptionsBuilder. The purpose of this method is to make sure that this is an instance of a class which extends BaseSyncOptionsBuilder in order to be used in the generic methods of the class. Otherwise, without this method, the methods above would need to cast this to T which could lead to a runtime error of the class was extended in a wrong way.
        Specified by:
        getThis in class BaseSyncOptionsBuilder<ProductSyncOptionsBuilder,​ProductSyncOptions,​com.commercetools.api.models.product.ProductProjection,​com.commercetools.api.models.product.ProductDraft,​com.commercetools.api.models.product.ProductUpdateAction>
        Returns:
        an instance of the class that overrides this method.