public class ProductTypeBatchProcessor
extends java.lang.Object
| Constructor and Description |
|---|
ProductTypeBatchProcessor(java.util.List<io.sphere.sdk.producttypes.ProductTypeDraft> productTypeDrafts,
ProductTypeSync productTypeSync) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.String> |
getKeysToCache() |
static java.util.Optional<java.lang.String> |
getProductTypeKey(io.sphere.sdk.products.attributes.AttributeType attributeType)
This method is meant be only used internally by the library.
|
java.util.Set<io.sphere.sdk.producttypes.ProductTypeDraft> |
getValidDrafts() |
void |
validateBatch()
This method validates the batch of drafts, and only for valid drafts it adds the valid draft
to a
validDrafts set, the keys of their referenced productTypes and
the keys of the missing parents to a keysToCache set. |
public ProductTypeBatchProcessor(@Nonnull
java.util.List<io.sphere.sdk.producttypes.ProductTypeDraft> productTypeDrafts,
@Nonnull
ProductTypeSync productTypeSync)
public void validateBatch()
validDrafts set, the keys of their referenced productTypes and
the keys of the missing parents to a keysToCache set.
A valid productType draft is one which satisfies the following conditions:
@Nonnull
public static java.util.Optional<java.lang.String> getProductTypeKey(@Nonnull
io.sphere.sdk.products.attributes.AttributeType attributeType)
throws InvalidReferenceException
attributeType - the attributeType to attempt to fetch the product type key of, if it contains a
nestedType reference.InvalidReferenceException - thrown if the productType key in the nested reference is invalid.public java.util.Set<io.sphere.sdk.producttypes.ProductTypeDraft> getValidDrafts()
public java.util.Set<java.lang.String> getKeysToCache()