public class PropertyDrivenCartItemProductMapper extends Object implements CartItemProductMapper
Constructor and Description |
---|
PropertyDrivenCartItemProductMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
CartItemMappingProperties cartItemMappingProperties) |
Modifier and Type | Method and Description |
---|---|
protected CartItemMappingProperties |
getCartItemMappingProperties() |
protected com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
protected void |
mapFieldsToCartItemAttributes(com.broadleafcommerce.cart.client.domain.CartItem cartItem,
Object source,
List<CartItemMappingProperties.FieldMapping> fieldMappings) |
protected void |
mapFieldToCartItemAttribute(com.broadleafcommerce.cart.client.domain.CartItem cartItem,
com.jayway.jsonpath.DocumentContext context,
String attributeName,
String valuePath) |
void |
mapProductToCartItem(com.broadleafcommerce.cart.client.domain.CartItem cartItem,
Product product,
Variant variant)
|
void |
mapProductToCartItem(@NonNull com.broadleafcommerce.cart.client.domain.CartItem cartItem,
@NonNull Product product,
Variant variant,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
|
protected Object |
readValueByPath(com.jayway.jsonpath.DocumentContext context,
String path) |
public PropertyDrivenCartItemProductMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper, CartItemMappingProperties cartItemMappingProperties)
public void mapProductToCartItem(com.broadleafcommerce.cart.client.domain.CartItem cartItem, Product product, Variant variant)
CartItemProductMapper
mapProductToCartItem
in interface CartItemProductMapper
cartItem
- the cart item to map information intoproduct
- the product to map information fromvariant
- the variant to map information from, if availablepublic void mapProductToCartItem(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.CartItem cartItem, @NonNull @NonNull Product product, @Nullable Variant variant, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
CartItemProductMapper
mapProductToCartItem
in interface CartItemProductMapper
cartItem
- the cart item to map information intoproduct
- the product to map information fromvariant
- the variant to map information from, if availablecontextInfo
- Context information around sandbox and multitenant stateprotected void mapFieldsToCartItemAttributes(com.broadleafcommerce.cart.client.domain.CartItem cartItem, Object source, List<CartItemMappingProperties.FieldMapping> fieldMappings)
protected void mapFieldToCartItemAttribute(com.broadleafcommerce.cart.client.domain.CartItem cartItem, com.jayway.jsonpath.DocumentContext context, String attributeName, String valuePath)
@Nullable protected Object readValueByPath(com.jayway.jsonpath.DocumentContext context, @Nullable String path)
protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
protected CartItemMappingProperties getCartItemMappingProperties()
Copyright © 2021. All rights reserved.