Class CustomObjectBatchValidator

    • Method Detail

      • validateAndCollectReferencedKeys

        public org.apache.commons.lang3.tuple.ImmutablePair<java.util.Set<com.commercetools.api.models.custom_object.CustomObjectDraft>,​java.util.Set<CustomObjectCompositeIdentifier>> validateAndCollectReferencedKeys​(@Nonnull
                                                                                                                                                                                                                               java.util.List<com.commercetools.api.models.custom_object.CustomObjectDraft> 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<com.commercetools.api.models.custom_object.CustomObjectDraft,​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).