public abstract class BaseBatchValidator<D,O extends BaseSyncOptions,S extends BaseSyncStatistics>
extends java.lang.Object
| Constructor and Description |
|---|
BaseBatchValidator(O syncOptions,
S syncStatistics) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
collectReferencedKeyFromCustomFieldsDraft(io.sphere.sdk.types.CustomFieldsDraft customFieldsDraft,
java.util.function.Consumer<java.lang.String> keyConsumer) |
protected <T> void |
collectReferencedKeyFromReference(io.sphere.sdk.models.Reference<T> reference,
java.util.function.Consumer<java.lang.String> keyInReferenceSupplier) |
protected <T> void |
collectReferencedKeyFromResourceIdentifier(io.sphere.sdk.models.ResourceIdentifier<T> resourceIdentifier,
java.util.function.Consumer<java.lang.String> keyConsumer) |
protected void |
collectReferencedKeysFromAssetDrafts(java.util.List<io.sphere.sdk.models.AssetDraft> assetDrafts,
java.util.function.Consumer<java.lang.String> keyConsumer) |
protected void |
handleError(java.lang.String errorMessage) |
protected void |
handleError(SyncException syncException) |
abstract org.apache.commons.lang3.tuple.ImmutablePair<java.util.Set<D>,?> |
validateAndCollectReferencedKeys(java.util.List<D> drafts)
Given the
List<D> (e.g.CategoryDraft) of drafts this method
attempts to validate drafts and collect referenced keys from the draft and return an ImmutablePair<Set<D>, ?> which contains the Set of valid
drafts and referenced keys. |
public abstract org.apache.commons.lang3.tuple.ImmutablePair<java.util.Set<D>,?> validateAndCollectReferencedKeys(@Nonnull java.util.List<D> drafts)
List<D> (e.g.CategoryDraft) of drafts this method
attempts to validate drafts and collect referenced keys from the draft and return an ImmutablePair<Set<D>, ?> which contains the Set of valid
drafts and referenced keys.drafts - the drafts to validate.ImmutablePair<Set<D>, ?> which contains the Set of valid drafts and referenced keys.protected <T> void collectReferencedKeyFromResourceIdentifier(@Nullable
io.sphere.sdk.models.ResourceIdentifier<T> resourceIdentifier,
@Nonnull
java.util.function.Consumer<java.lang.String> keyConsumer)
protected void collectReferencedKeyFromCustomFieldsDraft(@Nullable
io.sphere.sdk.types.CustomFieldsDraft customFieldsDraft,
@Nonnull
java.util.function.Consumer<java.lang.String> keyConsumer)
protected void collectReferencedKeysFromAssetDrafts(@Nullable
java.util.List<io.sphere.sdk.models.AssetDraft> assetDrafts,
@Nonnull
java.util.function.Consumer<java.lang.String> keyConsumer)
protected <T> void collectReferencedKeyFromReference(@Nullable
io.sphere.sdk.models.Reference<T> reference,
@Nonnull
java.util.function.Consumer<java.lang.String> keyInReferenceSupplier)
protected void handleError(@Nonnull
SyncException syncException)
protected void handleError(@Nonnull
java.lang.String errorMessage)