public interface ProductTypeService
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletionStage<java.util.Optional<java.util.Map<java.lang.String,AttributeMetaData>>> |
fetchCachedProductAttributeMetaDataMap(java.lang.String productTypeId)
TODO FIX JAVADOC AND TEST METHOD
Given a
productType, this method first checks if a cached map of ProductType ids -> map of
AttributeMetaData is not empty. |
java.util.concurrent.CompletionStage<java.util.Optional<java.lang.String>> |
fetchCachedProductTypeId(java.lang.String key)
Given a
key, this method first checks if a cached map of ProductType keys -> ids is not empty. |
@Nonnull
java.util.concurrent.CompletionStage<java.util.Optional<java.lang.String>> fetchCachedProductTypeId(@Nonnull
java.lang.String key)
key, this method first checks if a cached map of ProductType keys -> ids is not empty.
If not, it returns a completed future that contains an optional that contains what this key maps to in
the cache. If the cache is empty, the method populates the cache with the mapping of all ProductType keys to ids
in the CTP project, by querying the CTP project for all ProductTypes.
After that, the method returns a CompletionStage<Optional<String>>
in which the result of it's completion could contain an
Optional with the id inside of it or an empty Optional if no ProductType was
found in the CTP project with this key.
key - the key by which a ProductType id should be fetched from the CTP project.CompletionStage<Optional<String>> in which the result of its
completion could contain an Optional with the id inside of it or an empty Optional if no
ProductType was found in the CTP project with this key.@Nonnull java.util.concurrent.CompletionStage<java.util.Optional<java.util.Map<java.lang.String,AttributeMetaData>>> fetchCachedProductAttributeMetaDataMap(@Nonnull java.lang.String productTypeId)
productType, this method first checks if a cached map of ProductType ids -> map of
AttributeMetaData is not empty. If not, it returns a completed future that contains an optional that
contains what this productType id maps to in the cache. If the cache is empty,
the method populates the cache with the mapping of all ProductType ids to maps of each product type's attributes'
AttributeMetaData in the CTP project, by querying the CTP project for all ProductTypes.
After that, the method returns a CompletionStage<Optional<String>>
in which the result of it's completion could contain an
Optional with a map of the attributes names -> AttributeMetaData inside of it or an empty
Optional if no ProductType was found in the CTP project with this id.
productTypeId - the id by which a a map of the attributes names -> AttributeMetaData
corresponding to the product type should be fetched from the CTP project.CompletionStage<Optional<String>> in which the result of its
completion could contain an Optional with the id inside of it or an empty Optional if no
ProductType was found in the CTP project with this key.