Class CustomObjectBatchValidator

    • Method Detail

      • validateAndCollectReferencedKeys

        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)
        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).

        A valid custom object draft is one which satisfies the following conditions:

        1. It is not null
        Specified by:
        validateAndCollectReferencedKeys in class BaseBatchValidator<io.sphere.sdk.customobjects.CustomObjectDraft<com.fasterxml.jackson.databind.JsonNode>,​CustomObjectSyncOptions,​CustomObjectSyncStatistics>
        Parameters:
        customObjectDrafts - the custom object drafts to validate and collect valid custom object identifiers.
        Returns:
        ImmutablePair<Set<CustomObjectDraft>, Set<CustomObjectCompositeIdentifier>> which contains the Set of valid drafts and valid custom object identifiers (container with key).