Class DefaultATPService
java.lang.Object
com.sap.sapoaacosintegration.services.rest.impl.DefaultAbstractCosRestService
com.sap.sapoaacosintegration.services.atp.impl.DefaultCosATPService
com.sap.sapoaacarintegration.services.atp.impl.DefaultATPService
- All Implemented Interfaces:
ATPService,CosRestService
Default ATP service
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncallRestAvailabilityServiceForProduct(String cartGuid, String itemId, ProductModel product) Call the REST Service in Customer Activity Repository (CAR) for a given product to get current product availabilitycallRestAvailabilityServiceForProductAndSource(ProductModel product, String source) Call the REST Service in Customer Activity Repository (CAR) for a given product to get current product availability in the given sourcecallRestAvailabilityServiceForProductAndSource(String cartGuid, String itemId, ProductModel product, String source) Call the REST Service in Customer Activity Repository (CAR) for a given product to get current product availability in the given sourcecallRestAvailabilityServiceForProductAndSources(String cartGuid, String itemId, ProductModel product, List<String> sourcesList) Call the REST Service in Customer Activity Repository (CAR) for a given product and sources list to get current product availability linescallRestAvailabilityServiceForProducts(String cartGuid, List<String> itemIdList, String productUnit, List<ProductModel> productList) Call the REST Service in Customer Activity Repository (CAR) for a given product list to get current product availability linesprotected ATPResultHandlerprotected HttpEntityBuilderprotected HttpHeaderProviderprotected URLProviderorg.springframework.http.HttpEntityvoidsetAtpResourcePathBuilder(ATPResourcePathBuilder atpResourcePathBuilder) voidsetAtpResultHandler(ATPResultHandler atpResultHandler) voidsetCommonUtils(CommonUtils commonUtils) voidsetHttpEntityBuilder(HttpEntityBuilder httpEntityBuilder) voidsetHttpHeaderProvider(HttpHeaderProvider httpHeaderProvider) voidsetOaaRestService(DefaultRestService oaaRestService) voidsetUrlProvider(URLProvider urlProvider) Methods inherited from class com.sap.sapoaacosintegration.services.atp.impl.DefaultCosATPService
exchangeRestTemplateAndExtractATPProductResult, getCosAtpResourcePathBuilder, getCosAtpResultHandler, getCosServiceUtils, getIntegrationRestTemplateFactory, getServiceUtils, setCosAtpResourcePathBuilder, setCosAtpResultHandler, setCosServiceUtils, setIntegrationRestTemplateFactory, setServiceUtilsMethods inherited from class com.sap.sapoaacosintegration.services.rest.impl.DefaultAbstractCosRestService
checkHttpStatusCode, getSessionService, setBackendDown, setSessionService
-
Constructor Details
-
DefaultATPService
public DefaultATPService()
-
-
Method Details
-
callRestAvailabilityServiceForProduct
public List<ATPAvailability> callRestAvailabilityServiceForProduct(String cartGuid, String itemId, ProductModel product) throws ATPException, BackendDownException Description copied from interface:ATPServiceCall the REST Service in Customer Activity Repository (CAR) for a given product to get current product availability- Specified by:
callRestAvailabilityServiceForProductin interfaceATPService- Overrides:
callRestAvailabilityServiceForProductin classDefaultCosATPService- Parameters:
cartGuid- The id for the cart.itemId- The id for the item.product- The product availability to be checked.- Returns:
- list of current product availability
- Throws:
ATPExceptionBackendDownException
-
callRestAvailabilityServiceForProductAndSource
public List<ATPAvailability> callRestAvailabilityServiceForProductAndSource(String cartGuid, String itemId, ProductModel product, String source) throws ATPException, BackendDownException Description copied from interface:ATPServiceCall the REST Service in Customer Activity Repository (CAR) for a given product to get current product availability in the given source- Specified by:
callRestAvailabilityServiceForProductAndSourcein interfaceATPService- Overrides:
callRestAvailabilityServiceForProductAndSourcein classDefaultCosATPService- Parameters:
cartGuid- The id for the cart.itemId- The id for the item.product- The product availability to be checked.source- The source availability to be checked.- Returns:
- list of current product location availability.
- Throws:
ATPExceptionBackendDownException
-
callRestAvailabilityServiceForProductAndSource
public List<ATPAvailability> callRestAvailabilityServiceForProductAndSource(ProductModel product, String source) throws ATPException, BackendDownException Description copied from interface:ATPServiceCall the REST Service in Customer Activity Repository (CAR) for a given product to get current product availability in the given source- Specified by:
callRestAvailabilityServiceForProductAndSourcein interfaceATPService- Overrides:
callRestAvailabilityServiceForProductAndSourcein classDefaultCosATPService- Parameters:
product- The product availability to be checked.source- The source availability to be checked.- Returns:
- list of current product location availability.
- Throws:
ATPExceptionBackendDownException
-
callRestAvailabilityServiceForProducts
public List<ATPProductAvailability> callRestAvailabilityServiceForProducts(String cartGuid, List<String> itemIdList, String productUnit, List<ProductModel> productList) throws ATPException, BackendDownException Description copied from interface:ATPServiceCall the REST Service in Customer Activity Repository (CAR) for a given product list to get current product availability lines- Specified by:
callRestAvailabilityServiceForProductsin interfaceATPService- Overrides:
callRestAvailabilityServiceForProductsin classDefaultCosATPService- Parameters:
cartGuid- The id for the cart.itemIdList- Must have the same order as parameter productListproductUnit- Single unit for all productsproductList- Must have the same order as parameter itemIdList- Returns:
- list of current availability for given products
- Throws:
ATPExceptionBackendDownException
-
callRestAvailabilityServiceForProductAndSources
public List<ATPProductAvailability> callRestAvailabilityServiceForProductAndSources(String cartGuid, String itemId, ProductModel product, List<String> sourcesList) throws ATPException, BackendDownException Description copied from interface:ATPServiceCall the REST Service in Customer Activity Repository (CAR) for a given product and sources list to get current product availability lines- Specified by:
callRestAvailabilityServiceForProductAndSourcesin interfaceATPService- Overrides:
callRestAvailabilityServiceForProductAndSourcesin classDefaultCosATPService- Parameters:
cartGuid- The id for the cart.itemId- The id for the item.product- The product availability to be checked.sourcesList- The source list availability to be checked.- Returns:
- list of current availability for given product and sources
- Throws:
ATPExceptionBackendDownException
-
prepareRestCall
public org.springframework.http.HttpEntity prepareRestCall()- Returns:
- HttpEntity
-
setAtpResultHandler
- Parameters:
atpResultHandler-
-
getAtpResultHandler
- Returns:
- the atpResultHandler
-
setHttpHeaderProvider
- Parameters:
httpHeaderProvider-
-
getHttpHeaderProvider
- Returns:
- the httpHeaderProvider
-
setUrlProvider
- Parameters:
urlProvider-
-
getUrlProvider
- Returns:
- the urlProvider
-
setHttpEntityBuilder
- Parameters:
httpEntityBuilder- the httpEntityBuilder to set
-
getHttpEntityBuilder
- Returns:
- the httpEntityBuilder
-
getAtpResourcePathBuilder
- Returns:
- the atpResourcePathBuilder
-
setAtpResourcePathBuilder
- Parameters:
atpResourcePathBuilder- the atpResourcePathBuilder to set
-
getCommonUtils
- Overrides:
getCommonUtilsin classDefaultCosATPService
-
setCommonUtils
- Overrides:
setCommonUtilsin classDefaultCosATPService
-
getOaaRestService
-
setOaaRestService
-