public class CustomerBatchValidator extends BaseBatchValidator<io.sphere.sdk.customers.CustomerDraft,CustomerSyncOptions,CustomerSyncStatistics>
| Modifier and Type | Class and Description |
|---|---|
static class |
CustomerBatchValidator.ReferencedKeys |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CUSTOMER_DRAFT_EMAIL_NOT_SET |
static java.lang.String |
CUSTOMER_DRAFT_IS_NULL |
static java.lang.String |
CUSTOMER_DRAFT_KEY_NOT_SET |
| Constructor and Description |
|---|
CustomerBatchValidator(CustomerSyncOptions syncOptions,
CustomerSyncStatistics syncStatistics) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.commons.lang3.tuple.ImmutablePair<java.util.Set<io.sphere.sdk.customers.CustomerDraft>,CustomerBatchValidator.ReferencedKeys> |
validateAndCollectReferencedKeys(java.util.List<io.sphere.sdk.customers.CustomerDraft> customerDrafts)
Given the
List<CustomerDraft> of drafts this method attempts to validate
drafts and return an ImmutablePair<Set<CustomerDraft>, CustomerBatchValidator.ReferencedKeys> which contains the Set of valid drafts and
referenced keys within a wrapper. |
collectReferencedKeyFromCustomFieldsDraft, collectReferencedKeyFromReference, collectReferencedKeyFromResourceIdentifier, collectReferencedKeysFromAssetDrafts, handleError, handleErrorpublic static final java.lang.String CUSTOMER_DRAFT_IS_NULL
public static final java.lang.String CUSTOMER_DRAFT_KEY_NOT_SET
public static final java.lang.String CUSTOMER_DRAFT_EMAIL_NOT_SET
public CustomerBatchValidator(@Nonnull
CustomerSyncOptions syncOptions,
@Nonnull
CustomerSyncStatistics syncStatistics)
public org.apache.commons.lang3.tuple.ImmutablePair<java.util.Set<io.sphere.sdk.customers.CustomerDraft>,CustomerBatchValidator.ReferencedKeys> validateAndCollectReferencedKeys(@Nonnull java.util.List<io.sphere.sdk.customers.CustomerDraft> customerDrafts)
List<CustomerDraft> of drafts this method attempts to validate
drafts and return an ImmutablePair<Set<CustomerDraft>, CustomerBatchValidator.ReferencedKeys> which contains the Set of valid drafts and
referenced keys within a wrapper.
A valid customer draft is one which satisfies the following conditions:
validateAndCollectReferencedKeys in class BaseBatchValidator<io.sphere.sdk.customers.CustomerDraft,CustomerSyncOptions,CustomerSyncStatistics>customerDrafts - the customer drafts to validate and collect referenced keys.ImmutablePair<Set<CustomerDraft>, CustomerBatchValidator.ReferencedKeys> which contains the Set of valid drafts
and referenced keys within a wrapper.