public class ShoppingListBatchValidator extends BaseBatchValidator<io.sphere.sdk.shoppinglists.ShoppingListDraft,ShoppingListSyncOptions,ShoppingListSyncStatistics>
Modifier and Type | Class and Description |
---|---|
static class |
ShoppingListBatchValidator.ReferencedKeys |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SHOPPING_LIST_DRAFT_IS_NULL |
static java.lang.String |
SHOPPING_LIST_DRAFT_KEY_NOT_SET |
static java.lang.String |
SHOPPING_LIST_DRAFT_NAME_NOT_SET |
Constructor and Description |
---|
ShoppingListBatchValidator(ShoppingListSyncOptions syncOptions,
ShoppingListSyncStatistics syncStatistics) |
Modifier and Type | Method and Description |
---|---|
org.apache.commons.lang3.tuple.ImmutablePair<java.util.Set<io.sphere.sdk.shoppinglists.ShoppingListDraft>,ShoppingListBatchValidator.ReferencedKeys> |
validateAndCollectReferencedKeys(java.util.List<io.sphere.sdk.shoppinglists.ShoppingListDraft> shoppingListDrafts)
Given the
List <ShoppingListDraft > of drafts this method attempts to
validate drafts and collect referenced type keys from the draft and return an ImmutablePair <Set < ShoppingListDraft >,ShoppingListBatchValidator.ReferencedKeys >
which contains the Set of valid drafts and referenced keys. |
collectReferencedKeyFromCustomFieldsDraft, collectReferencedKeyFromReference, collectReferencedKeyFromResourceIdentifier, collectReferencedKeysFromAssetDrafts, handleError, handleError
public static final java.lang.String SHOPPING_LIST_DRAFT_KEY_NOT_SET
public static final java.lang.String SHOPPING_LIST_DRAFT_IS_NULL
public static final java.lang.String SHOPPING_LIST_DRAFT_NAME_NOT_SET
public ShoppingListBatchValidator(@Nonnull ShoppingListSyncOptions syncOptions, @Nonnull ShoppingListSyncStatistics syncStatistics)
public org.apache.commons.lang3.tuple.ImmutablePair<java.util.Set<io.sphere.sdk.shoppinglists.ShoppingListDraft>,ShoppingListBatchValidator.ReferencedKeys> validateAndCollectReferencedKeys(@Nonnull java.util.List<io.sphere.sdk.shoppinglists.ShoppingListDraft> shoppingListDrafts)
List
<ShoppingListDraft
> of drafts this method attempts to
validate drafts and collect referenced type keys from the draft and return an ImmutablePair
<Set
< ShoppingListDraft
>,ShoppingListBatchValidator.ReferencedKeys
>
which contains the Set
of valid drafts and referenced keys.
A valid shopping list draft is one which satisfies the following conditions:
validateAndCollectReferencedKeys
in class BaseBatchValidator<io.sphere.sdk.shoppinglists.ShoppingListDraft,ShoppingListSyncOptions,ShoppingListSyncStatistics>
shoppingListDrafts
- the shopping list drafts to validate and collect referenced keys.ImmutablePair
<Set
<ShoppingListDraft
>, ShoppingListBatchValidator.ReferencedKeys
> which contains the Set
of valid drafts and referenced keys
within a wrapper.