Class CartOperationServiceProperties
- java.lang.Object
-
- com.broadleafcommerce.cartoperation.service.CartOperationServiceProperties
-
@ConfigurationProperties("broadleaf.cartoperation.service") public class CartOperationServiceProperties extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CartOperationServiceProperties.BulkAddToCartOperation
Contains properties for bulk add to cart operations from the API.static class
CartOperationServiceProperties.ItemListSecurity
Properties related to access control of item lists.static class
CartOperationServiceProperties.PriceInvalidation
Contains properties that determine whether certain operations from the API cause prices to be invalidated.
-
Constructor Summary
Constructors Constructor Description CartOperationServiceProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CartOperationServiceProperties.BulkAddToCartOperation
getBulkAddToCartOperation()
The bulk properties configuration.Duration
getCartPricingTimeToLive()
The amount of time before the cart's pricing is considered stale.String
getDefaultVirtualFulfillmentOptionName()
The default fulfillment option name for theFulfillmentType.VIRTUAL
fulfillment type.CartOperationServiceProperties.ItemListSecurity
getItemListSecurity()
String
getMergingType()
Globally determines how Products should merge with other similar items when they get added to a cart.CartOperationServiceProperties.PriceInvalidation
getPriceInvalidation()
The price invalidation configuration.boolean
isCalculateFulfillmentPricingWithAdjustments()
Whether the fulfillment pricing should consider the adjustments on the order and order items.boolean
isCalculateProratedFulfillmentPricing()
Whether the fulfillment pricing should consider prorated price of the order items, after factoring in the order adjustments.boolean
isFailConfigErrorOnAdd()
If there is a configuration error for a cart item when attempting to add it to a cart, fail the attempt.boolean
isMatchCartItemAssetToVariant()
Determines whether theCartItem.getImageAsset()
should match the selectedVariant
if possible instead of theProduct.getPrimaryAsset()
.void
setBulkAddToCartOperation(CartOperationServiceProperties.BulkAddToCartOperation bulkAddToCartOperation)
The bulk properties configuration.void
setCalculateFulfillmentPricingWithAdjustments(boolean calculateFulfillmentPricingWithAdjustments)
Whether the fulfillment pricing should consider the adjustments on the order and order items.void
setCalculateProratedFulfillmentPricing(boolean calculateProratedFulfillmentPricing)
Whether the fulfillment pricing should consider prorated price of the order items, after factoring in the order adjustments.void
setCartPricingTimeToLive(Duration cartPricingTimeToLive)
The amount of time before the cart's pricing is considered stale.void
setDefaultVirtualFulfillmentOptionName(String defaultVirtualFulfillmentOptionName)
The default fulfillment option name for theFulfillmentType.VIRTUAL
fulfillment type.void
setFailConfigErrorOnAdd(boolean failConfigErrorOnAdd)
If there is a configuration error for a cart item when attempting to add it to a cart, fail the attempt.void
setItemListSecurity(CartOperationServiceProperties.ItemListSecurity itemListSecurity)
void
setMatchCartItemAssetToVariant(boolean matchCartItemAssetToVariant)
Determines whether theCartItem.getImageAsset()
should match the selectedVariant
if possible instead of theProduct.getPrimaryAsset()
.void
setMergingType(String mergingType)
Globally determines how Products should merge with other similar items when they get added to a cart.void
setPriceInvalidation(CartOperationServiceProperties.PriceInvalidation priceInvalidation)
The price invalidation configuration.
-
-
-
Method Detail
-
isFailConfigErrorOnAdd
public boolean isFailConfigErrorOnAdd()
If there is a configuration error for a cart item when attempting to add it to a cart, fail the attempt. This need to "fail fast" might be required if there isn't a good way to fix the configuration errors after adding to cart.
-
isCalculateFulfillmentPricingWithAdjustments
public boolean isCalculateFulfillmentPricingWithAdjustments()
Whether the fulfillment pricing should consider the adjustments on the order and order items.
-
isCalculateProratedFulfillmentPricing
public boolean isCalculateProratedFulfillmentPricing()
Whether the fulfillment pricing should consider prorated price of the order items, after factoring in the order adjustments.
-
getDefaultVirtualFulfillmentOptionName
public String getDefaultVirtualFulfillmentOptionName()
The default fulfillment option name for theFulfillmentType.VIRTUAL
fulfillment type.
-
getMergingType
public String getMergingType()
Globally determines how Products should merge with other similar items when they get added to a cart. Will be overridden by merge values on a Product. Out of box supported values are those inDefaultMergingType
.
-
getPriceInvalidation
public CartOperationServiceProperties.PriceInvalidation getPriceInvalidation()
The price invalidation configuration. Controls when prices on a cart or its items are considered invalid when clients use certain API operations.
-
getBulkAddToCartOperation
public CartOperationServiceProperties.BulkAddToCartOperation getBulkAddToCartOperation()
The bulk properties configuration.
-
getItemListSecurity
public CartOperationServiceProperties.ItemListSecurity getItemListSecurity()
-
getCartPricingTimeToLive
public Duration getCartPricingTimeToLive()
The amount of time before the cart's pricing is considered stale. Once this duration is exceeded, the cart will be fully repriced on its next retrieval.
-
isMatchCartItemAssetToVariant
public boolean isMatchCartItemAssetToVariant()
Determines whether theCartItem.getImageAsset()
should match the selectedVariant
if possible instead of theProduct.getPrimaryAsset()
. The matching will be done viaDefaultCartItemProductService
if theVariant
hasoptionValues
to use to match with aproduct asset
by tag.
-
setFailConfigErrorOnAdd
public void setFailConfigErrorOnAdd(boolean failConfigErrorOnAdd)
If there is a configuration error for a cart item when attempting to add it to a cart, fail the attempt. This need to "fail fast" might be required if there isn't a good way to fix the configuration errors after adding to cart.
-
setCalculateFulfillmentPricingWithAdjustments
public void setCalculateFulfillmentPricingWithAdjustments(boolean calculateFulfillmentPricingWithAdjustments)
Whether the fulfillment pricing should consider the adjustments on the order and order items.
-
setCalculateProratedFulfillmentPricing
public void setCalculateProratedFulfillmentPricing(boolean calculateProratedFulfillmentPricing)
Whether the fulfillment pricing should consider prorated price of the order items, after factoring in the order adjustments.
-
setDefaultVirtualFulfillmentOptionName
public void setDefaultVirtualFulfillmentOptionName(String defaultVirtualFulfillmentOptionName)
The default fulfillment option name for theFulfillmentType.VIRTUAL
fulfillment type.
-
setMergingType
public void setMergingType(String mergingType)
Globally determines how Products should merge with other similar items when they get added to a cart. Will be overridden by merge values on a Product. Out of box supported values are those inDefaultMergingType
.
-
setPriceInvalidation
public void setPriceInvalidation(CartOperationServiceProperties.PriceInvalidation priceInvalidation)
The price invalidation configuration. Controls when prices on a cart or its items are considered invalid when clients use certain API operations.
-
setBulkAddToCartOperation
public void setBulkAddToCartOperation(CartOperationServiceProperties.BulkAddToCartOperation bulkAddToCartOperation)
The bulk properties configuration.
-
setItemListSecurity
public void setItemListSecurity(CartOperationServiceProperties.ItemListSecurity itemListSecurity)
-
setCartPricingTimeToLive
public void setCartPricingTimeToLive(Duration cartPricingTimeToLive)
The amount of time before the cart's pricing is considered stale. Once this duration is exceeded, the cart will be fully repriced on its next retrieval.
-
setMatchCartItemAssetToVariant
public void setMatchCartItemAssetToVariant(boolean matchCartItemAssetToVariant)
Determines whether theCartItem.getImageAsset()
should match the selectedVariant
if possible instead of theProduct.getPrimaryAsset()
. The matching will be done viaDefaultCartItemProductService
if theVariant
hasoptionValues
to use to match with aproduct asset
by tag.
-
-