public class CustomObjectBatchValidator extends BaseBatchValidator<io.sphere.sdk.customobjects.CustomObjectDraft<com.fasterxml.jackson.databind.JsonNode>,CustomObjectSyncOptions,CustomObjectSyncStatistics>
Constructor and Description |
---|
CustomObjectBatchValidator(CustomObjectSyncOptions syncOptions,
CustomObjectSyncStatistics syncStatistics) |
Modifier and Type | Method and Description |
---|---|
org.apache.commons.lang3.tuple.ImmutablePair<java.util.Set<io.sphere.sdk.customobjects.CustomObjectDraft<com.fasterxml.jackson.databind.JsonNode>>,java.util.Set<CustomObjectCompositeIdentifier>> |
validateAndCollectReferencedKeys(java.util.List<io.sphere.sdk.customobjects.CustomObjectDraft<com.fasterxml.jackson.databind.JsonNode>> customObjectDrafts)
Given the
List <CustomObjectDraft > of drafts this method attempts to
validate drafts and return an ImmutablePair <Set <CustomObjectDraft >, Set <CustomObjectCompositeIdentifier >> which
contains the Set of valid drafts and valid custom object identifiers (container with
key). |
collectReferencedKeyFromCustomFieldsDraft, collectReferencedKeyFromReference, collectReferencedKeyFromResourceIdentifier, collectReferencedKeysFromAssetDrafts, handleError, handleError
public CustomObjectBatchValidator(@Nonnull CustomObjectSyncOptions syncOptions, @Nonnull CustomObjectSyncStatistics syncStatistics)
public org.apache.commons.lang3.tuple.ImmutablePair<java.util.Set<io.sphere.sdk.customobjects.CustomObjectDraft<com.fasterxml.jackson.databind.JsonNode>>,java.util.Set<CustomObjectCompositeIdentifier>> validateAndCollectReferencedKeys(@Nonnull java.util.List<io.sphere.sdk.customobjects.CustomObjectDraft<com.fasterxml.jackson.databind.JsonNode>> customObjectDrafts)
List
<CustomObjectDraft
> of drafts this method attempts to
validate drafts and return an ImmutablePair
<Set
<CustomObjectDraft
>, Set
<CustomObjectCompositeIdentifier
>> which
contains the Set
of valid drafts and valid custom object identifiers (container with
key).
A valid custom object draft is one which satisfies the following conditions:
validateAndCollectReferencedKeys
in class BaseBatchValidator<io.sphere.sdk.customobjects.CustomObjectDraft<com.fasterxml.jackson.databind.JsonNode>,CustomObjectSyncOptions,CustomObjectSyncStatistics>
customObjectDrafts
- the custom object drafts to validate and collect valid custom object
identifiers.ImmutablePair
<Set
<CustomObjectDraft
>, Set
<CustomObjectCompositeIdentifier
>> which contains the Set
of
valid drafts and valid custom object identifiers (container with key).