Class DefaultATPService
- java.lang.Object
-
- com.sap.sapoaacarintegration.services.rest.impl.DefaultAbstractRestService
-
- com.sap.sapoaacarintegration.services.atp.impl.DefaultATPService
-
- All Implemented Interfaces:
ATPService,OaaRestService
public class DefaultATPService extends DefaultAbstractRestService implements ATPService
Default ATP service
-
-
Constructor Summary
Constructors Constructor Description DefaultATPService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<ATPAvailability>callRestAvailabilityServiceForProduct(java.lang.String cartGuid, java.lang.String itemId, ProductModel product)Call the REST Service in Customer Activity Repository (CAR) for a given product to get current product availabilityjava.util.List<ATPAvailability>callRestAvailabilityServiceForProductAndSource(ProductModel product, java.lang.String source)Call the REST Service in Customer Activity Repository (CAR) for a given product to get current product availability in the given sourcejava.util.List<ATPAvailability>callRestAvailabilityServiceForProductAndSource(java.lang.String cartGuid, java.lang.String itemId, ProductModel product, java.lang.String source)Call the REST Service in Customer Activity Repository (CAR) for a given product to get current product availability in the given sourcejava.util.List<ATPProductAvailability>callRestAvailabilityServiceForProductAndSources(java.lang.String cartGuid, java.lang.String itemId, ProductModel product, java.util.List<java.lang.String> sourcesList)Call the REST Service in Customer Activity Repository (CAR) for a given product and sources list to get current product availability linesjava.util.List<ATPProductAvailability>callRestAvailabilityServiceForProducts(java.lang.String cartGuid, java.util.List<java.lang.String> itemIdList, java.lang.String productUnit, java.util.List<ProductModel> productList)Call the REST Service in Customer Activity Repository (CAR) for a given product list to get current product availability linesATPResourcePathBuildergetAtpResourcePathBuilder()protected ATPResultHandlergetAtpResultHandler()protected HttpEntityBuildergetHttpEntityBuilder()protected HttpHeaderProvidergetHttpHeaderProvider()protected URLProvidergetUrlProvider()org.springframework.http.HttpEntityprepareRestCall()voidsetAtpResourcePathBuilder(ATPResourcePathBuilder atpResourcePathBuilder)voidsetAtpResultHandler(ATPResultHandler atpResultHandler)voidsetHttpEntityBuilder(HttpEntityBuilder httpEntityBuilder)voidsetHttpHeaderProvider(HttpHeaderProvider httpHeaderProvider)voidsetUrlProvider(URLProvider urlProvider)-
Methods inherited from class com.sap.sapoaacarintegration.services.rest.impl.DefaultAbstractRestService
beforeRestCall, checkHttpStatusCode, getRestServiceConfiguration, getRestTemplate, getSessionService, initialize, setBackendDown, setRestServiceConfiguration, setRestTemplate, setSessionService
-
-
-
-
Method Detail
-
callRestAvailabilityServiceForProduct
public java.util.List<ATPAvailability> callRestAvailabilityServiceForProduct(java.lang.String cartGuid, java.lang.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- 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 java.util.List<ATPAvailability> callRestAvailabilityServiceForProductAndSource(java.lang.String cartGuid, java.lang.String itemId, ProductModel product, java.lang.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- 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 java.util.List<ATPAvailability> callRestAvailabilityServiceForProductAndSource(ProductModel product, java.lang.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- 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 java.util.List<ATPProductAvailability> callRestAvailabilityServiceForProducts(java.lang.String cartGuid, java.util.List<java.lang.String> itemIdList, java.lang.String productUnit, java.util.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- 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 java.util.List<ATPProductAvailability> callRestAvailabilityServiceForProductAndSources(java.lang.String cartGuid, java.lang.String itemId, ProductModel product, java.util.List<java.lang.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- 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
public void setAtpResultHandler(ATPResultHandler atpResultHandler)
- Parameters:
atpResultHandler-
-
getAtpResultHandler
protected ATPResultHandler getAtpResultHandler()
- Returns:
- the atpResultHandler
-
setHttpHeaderProvider
public void setHttpHeaderProvider(HttpHeaderProvider httpHeaderProvider)
- Parameters:
httpHeaderProvider-
-
getHttpHeaderProvider
protected HttpHeaderProvider getHttpHeaderProvider()
- Returns:
- the httpHeaderProvider
-
setUrlProvider
public void setUrlProvider(URLProvider urlProvider)
- Parameters:
urlProvider-
-
getUrlProvider
protected URLProvider getUrlProvider()
- Returns:
- the urlProvider
-
setHttpEntityBuilder
public void setHttpEntityBuilder(HttpEntityBuilder httpEntityBuilder)
- Parameters:
httpEntityBuilder- the httpEntityBuilder to set
-
getHttpEntityBuilder
protected HttpEntityBuilder getHttpEntityBuilder()
- Returns:
- the httpEntityBuilder
-
getAtpResourcePathBuilder
public ATPResourcePathBuilder getAtpResourcePathBuilder()
- Returns:
- the atpResourcePathBuilder
-
setAtpResourcePathBuilder
public void setAtpResourcePathBuilder(ATPResourcePathBuilder atpResourcePathBuilder)
- Parameters:
atpResourcePathBuilder- the atpResourcePathBuilder to set
-
-