public class CartDiscountBatchValidator extends BaseBatchValidator<io.sphere.sdk.cartdiscounts.CartDiscountDraft,CartDiscountSyncOptions,CartDiscountSyncStatistics>
| Constructor and Description |
|---|
CartDiscountBatchValidator(CartDiscountSyncOptions syncOptions,
CartDiscountSyncStatistics syncStatistics) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.commons.lang3.tuple.ImmutablePair<java.util.Set<io.sphere.sdk.cartdiscounts.CartDiscountDraft>,java.util.Set<java.lang.String>> |
validateAndCollectReferencedKeys(java.util.List<io.sphere.sdk.cartdiscounts.CartDiscountDraft> cartDiscountDrafts)
Given the
List<CartDiscountDraft> of drafts this method attempts to validate
drafts and collect referenced type keys from the draft
and return an ImmutablePair<Set<CartDiscountDraft>
,Set<String>>
which contains the Set of valid drafts and referenced type keys. |
collectReferencedKeyFromCustomFieldsDraft, collectReferencedKeyFromReference, collectReferencedKeyFromResourceIdentifier, collectReferencedKeysFromAssetDrafts, handleError, handleErrorpublic CartDiscountBatchValidator(@Nonnull
CartDiscountSyncOptions syncOptions,
@Nonnull
CartDiscountSyncStatistics syncStatistics)
public org.apache.commons.lang3.tuple.ImmutablePair<java.util.Set<io.sphere.sdk.cartdiscounts.CartDiscountDraft>,java.util.Set<java.lang.String>> validateAndCollectReferencedKeys(@Nonnull
java.util.List<io.sphere.sdk.cartdiscounts.CartDiscountDraft> cartDiscountDrafts)
List<CartDiscountDraft> of drafts this method attempts to validate
drafts and collect referenced type keys from the draft
and return an ImmutablePair<Set<CartDiscountDraft>
,Set<String>>
which contains the Set of valid drafts and referenced type keys.
A valid cart discount draft is one which satisfies the following conditions:
validateAndCollectReferencedKeys in class BaseBatchValidator<io.sphere.sdk.cartdiscounts.CartDiscountDraft,CartDiscountSyncOptions,CartDiscountSyncStatistics>cartDiscountDrafts - the cart discount drafts to validate and collect referenced type keys.ImmutablePair<Set<ProductTypeDraft>,
Set<String>> which contains the Set of valid drafts and
referenced type keys.