Class ExternalInventoryProperties
java.lang.Object
com.broadleafcommerce.cartoperation.service.provider.external.ExternalInventoryProperties
@ConfigurationProperties("broadleaf.cartoperation.inventoryprovider")
public class ExternalInventoryProperties
extends Object
Properties for interacting with an external Inventory system.
- Author:
- Kelly Tisdell (ktisdell)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionURI for checking inventory for a list of SKUsURI for checking inventory for a particular SKUURI for releasing inventory reservationsURI for reserving inventoryThe service client to use when calling inventory services.getUrl()The base url for an external inventory service.booleanIf set to true, message keys are returned for quantity availability errors instead of human readable messages.booleanIf true, exceptions fromExternalInventoryProvider.getInventorySummaries(Map, ContextInfo)and other methods that returninventory summaries, are thrown.booleanIf true, exceptions fromExternalInventoryProvider.isInventoryAvailable(String, int, ContextInfo)and all other methods namedisInventoryAvailableare thrown.voidsetBulkCheckAvailabilityUri(String bulkCheckAvailabilityUri) URI for checking inventory for a list of SKUsvoidsetCheckAvailabilityUri(String checkAvailabilityUri) URI for checking inventory for a particular SKUvoidsetMessageKeysForAvailabilityErrors(boolean messageKeysForAvailabilityErrors) If set to true, message keys are returned for quantity availability errors instead of human readable messages.voidsetReleaseReservationUri(String releaseReservationUri) URI for releasing inventory reservationsvoidsetReserveUri(String reserveUri) URI for reserving inventoryvoidsetServiceClient(String serviceClient) The service client to use when calling inventory services.voidsetThrowGetInventorySummariesExceptions(boolean throwGetInventorySummariesExceptions) If true, exceptions fromExternalInventoryProvider.getInventorySummaries(Map, ContextInfo)and other methods that returninventory summaries, are thrown.voidsetThrowIsInventoryAvailableExceptions(boolean throwIsInventoryAvailableExceptions) If true, exceptions fromExternalInventoryProvider.isInventoryAvailable(String, int, ContextInfo)and all other methods namedisInventoryAvailableare thrown.voidThe base url for an external inventory service.
-
Constructor Details
-
ExternalInventoryProperties
public ExternalInventoryProperties()
-
-
Method Details
-
getUrl
The base url for an external inventory service. -
getReserveUri
URI for reserving inventory -
getReleaseReservationUri
URI for releasing inventory reservations -
getCheckAvailabilityUri
URI for checking inventory for a particular SKU -
getBulkCheckAvailabilityUri
URI for checking inventory for a list of SKUs -
getServiceClient
The service client to use when calling inventory services. Default is "cartopsclient". -
isThrowIsInventoryAvailableExceptions
public boolean isThrowIsInventoryAvailableExceptions()If true, exceptions fromExternalInventoryProvider.isInventoryAvailable(String, int, ContextInfo)and all other methods namedisInventoryAvailableare thrown. Prior versions caught all exceptions and returned false for availability. Default is false.- Since:
- 3.0.0
-
isThrowGetInventorySummariesExceptions
public boolean isThrowGetInventorySummariesExceptions()If true, exceptions fromExternalInventoryProvider.getInventorySummaries(Map, ContextInfo)and other methods that returninventory summaries, are thrown. Prior versions caught all exceptions and return empty collections/maps. Default is false.- Since:
- 3.0.0
-
isMessageKeysForAvailabilityErrors
public boolean isMessageKeysForAvailabilityErrors()If set to true, message keys are returned for quantity availability errors instead of human readable messages. Default is false.- Since:
- 3.0.0
-
setUrl
The base url for an external inventory service. -
setReserveUri
URI for reserving inventory -
setReleaseReservationUri
URI for releasing inventory reservations -
setCheckAvailabilityUri
URI for checking inventory for a particular SKU -
setBulkCheckAvailabilityUri
URI for checking inventory for a list of SKUs -
setServiceClient
The service client to use when calling inventory services. Default is "cartopsclient". -
setThrowIsInventoryAvailableExceptions
public void setThrowIsInventoryAvailableExceptions(boolean throwIsInventoryAvailableExceptions) If true, exceptions fromExternalInventoryProvider.isInventoryAvailable(String, int, ContextInfo)and all other methods namedisInventoryAvailableare thrown. Prior versions caught all exceptions and returned false for availability. Default is false.- Since:
- 3.0.0
-
setThrowGetInventorySummariesExceptions
public void setThrowGetInventorySummariesExceptions(boolean throwGetInventorySummariesExceptions) If true, exceptions fromExternalInventoryProvider.getInventorySummaries(Map, ContextInfo)and other methods that returninventory summaries, are thrown. Prior versions caught all exceptions and return empty collections/maps. Default is false.- Since:
- 3.0.0
-
setMessageKeysForAvailabilityErrors
public void setMessageKeysForAvailabilityErrors(boolean messageKeysForAvailabilityErrors) If set to true, message keys are returned for quantity availability errors instead of human readable messages. Default is false.- Since:
- 3.0.0
-