public class ProductBatchValidator extends BaseBatchValidator<io.sphere.sdk.products.ProductDraft,ProductSyncOptions,ProductSyncStatistics>
| Modifier and Type | Class and Description |
|---|---|
static class |
ProductBatchValidator.ReferencedKeys |
| Constructor and Description |
|---|
ProductBatchValidator(ProductSyncOptions syncOptions,
ProductSyncStatistics syncStatistics) |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Set<java.lang.String> |
getReferencedProductKeys(io.sphere.sdk.products.ProductVariantDraft variantDraft)
Get a set of referenced product keys on all attribute drafts on the supplied Product Variant
Draft.
|
org.apache.commons.lang3.tuple.ImmutablePair<java.util.Set<io.sphere.sdk.products.ProductDraft>,ProductBatchValidator.ReferencedKeys> |
validateAndCollectReferencedKeys(java.util.List<io.sphere.sdk.products.ProductDraft> productDrafts)
Given the
List<ProductDraft> of drafts this method attempts to validate
drafts and collect referenced keys from the draft and return an ImmutablePair<Set< ProductDraft>,ProductBatchValidator.ReferencedKeys> which
contains the Set of valid drafts and referenced keys within a wrapper. |
collectReferencedKeyFromCustomFieldsDraft, collectReferencedKeyFromReference, collectReferencedKeyFromResourceIdentifier, collectReferencedKeysFromAssetDrafts, handleError, handleErrorpublic ProductBatchValidator(@Nonnull
ProductSyncOptions syncOptions,
@Nonnull
ProductSyncStatistics syncStatistics)
public org.apache.commons.lang3.tuple.ImmutablePair<java.util.Set<io.sphere.sdk.products.ProductDraft>,ProductBatchValidator.ReferencedKeys> validateAndCollectReferencedKeys(@Nonnull java.util.List<io.sphere.sdk.products.ProductDraft> productDrafts)
List<ProductDraft> of drafts this method attempts to validate
drafts and collect referenced keys from the draft and return an ImmutablePair<Set< ProductDraft>,ProductBatchValidator.ReferencedKeys> which
contains the Set of valid drafts and referenced keys within a wrapper.
A valid product draft is one which satisfies the following conditions:
validateAndCollectReferencedKeys in class BaseBatchValidator<io.sphere.sdk.products.ProductDraft,ProductSyncOptions,ProductSyncStatistics>productDrafts - the product drafts to validate and collect referenced keys.ImmutablePair<Set<ProductDraft>, ProductBatchValidator.ReferencedKeys> which contains the Set of valid drafts
and referenced keys within a wrapper.@Nonnull
public static java.util.Set<java.lang.String> getReferencedProductKeys(@Nonnull
io.sphere.sdk.products.ProductVariantDraft variantDraft)
Note: Null attributes are skipped since they are validated at a later stage in (ProductVariantUpdateActionUtils)
variantDraft - the variant draft to get the referenced product keys from.