Class DefaultCosSourcingService
java.lang.Object
com.sap.sapoaacosintegration.services.rest.impl.DefaultAbstractCosRestService
com.sap.sapoaacosintegration.services.sourcing.impl.DefaultCosSourcingService
- All Implemented Interfaces:
OaaRestService,SourcingService,CosRestService,CosSourcingService
public class DefaultCosSourcingService
extends DefaultAbstractCosRestService
implements CosSourcingService
Default Cos Sourcing Service
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncallCosRestService(AbstractOrderModel abstractOrderModel) Calls the COS rest service for fetching sourcing resultscallRestService(AbstractOrderModel abstractOrderModel, boolean execAllStrategies, boolean reserve) Calls the callCosRestService method to fulfill the sourcing servicevoidCalls the COS rest service for fetching sourcing resultsprotected SourcingResponsecallSourcingRestService(CosSourcingRequest cosSourcingRequest) protected voidconfirmReservation(AbstractOrderModel abstractOrderModel) protected SourcingResponseconstructSourcingResponse(org.springframework.http.ResponseEntity<CosSourcingResponse> cosSorcingResponse) protected org.springframework.http.HttpEntitycreateHttpEntityForSourcing(CosSourcingRequest cosSourcingRequest) protected voiddecideAndPerformReservation(AbstractOrderModel abstractOrderModel) protected SourcingResponsedoSourcingAndPersistResult(AbstractOrderModel abstractOrderModel) protected SourcingResponseexchangeRestTemplateAndExtractSourcingResponse(org.springframework.http.HttpEntity entity) de.hybris.platform.outboundservices.client.IntegrationRestTemplateFactoryde.hybris.platform.servicelayer.model.ModelServiceprotected SourcingResponsegetSourcingResponse(CosSourcingRequest cosSourcingRequest) protected voidresetReservationId(AbstractOrderModel abstractOrderModel) voidsetCommonUtils(CommonUtils commonUtils) voidsetCosServiceUtils(CosServiceUtils cosServiceUtils) voidsetCosSourcingRequestMapper(CosSourcingRequestMapper cosSourcingRequestMapper) voidsetCosSourcingResponseMapper(CosSourcingResponseMapper cosSourcingResponseMapper) voidsetCosSourcingResultHandler(CosSourcingResultHandler cosSourcingResultHandler) voidsetIntegrationRestTemplateFactory(de.hybris.platform.outboundservices.client.IntegrationRestTemplateFactory integrationRestTemplateFactory) voidsetModelService(de.hybris.platform.servicelayer.model.ModelService modelService) voidsetReservationService(ReservationService reservationService) voidsetRestServiceConfiguration(RestServiceConfiguration restServiceConfiguration) Set the REST service configurationMethods inherited from class com.sap.sapoaacosintegration.services.rest.impl.DefaultAbstractCosRestService
checkHttpStatusCode, getSessionService, setBackendDown, setSessionServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sap.retail.oaa.commerce.services.rest.OaaRestService
setBackendDown
-
Constructor Details
-
DefaultCosSourcingService
public DefaultCosSourcingService()
-
-
Method Details
-
callRestServiceAndPersistResult
Calls the COS rest service for fetching sourcing results- Specified by:
callRestServiceAndPersistResultin interfaceSourcingService- Parameters:
abstractOrderModel-
-
callRestService
public SourcingResponse callRestService(AbstractOrderModel abstractOrderModel, boolean execAllStrategies, boolean reserve) Calls the callCosRestService method to fulfill the sourcing service- Specified by:
callRestServicein interfaceSourcingService- Parameters:
abstractOrderModel-execAllStrategies-reserve-- Returns:
SourcingResponse
-
callCosRestService
Calls the COS rest service for fetching sourcing results- Specified by:
callCosRestServicein interfaceCosSourcingService- Parameters:
abstractOrderModel-- Returns:
SourcingResponse
-
decideAndPerformReservation
-
doSourcingAndPersistResult
-
confirmReservation
-
getSourcingResponse
-
callSourcingRestService
-
exchangeRestTemplateAndExtractSourcingResponse
protected SourcingResponse exchangeRestTemplateAndExtractSourcingResponse(org.springframework.http.HttpEntity entity) -
constructSourcingResponse
protected SourcingResponse constructSourcingResponse(org.springframework.http.ResponseEntity<CosSourcingResponse> cosSorcingResponse) -
createHttpEntityForSourcing
protected org.springframework.http.HttpEntity createHttpEntityForSourcing(CosSourcingRequest cosSourcingRequest) - Parameters:
cosSourcingRequest-- Returns:
- HttpEntity
-
resetReservationId
- Parameters:
abstractOrderModel-
-
getIntegrationRestTemplateFactory
public de.hybris.platform.outboundservices.client.IntegrationRestTemplateFactory getIntegrationRestTemplateFactory()- Returns:
- the integrationRestTemplateFactory
-
setIntegrationRestTemplateFactory
public void setIntegrationRestTemplateFactory(de.hybris.platform.outboundservices.client.IntegrationRestTemplateFactory integrationRestTemplateFactory) - Parameters:
integrationRestTemplateFactory- the integrationRestTemplateFactory to set
-
getCosSourcingRequestMapper
- Returns:
- the cosSourcingRequestMapper
-
setCosSourcingRequestMapper
- Parameters:
cosSourcingRequestMapper- the cosSourcingRequestMapper to set
-
getCosSourcingResponseMapper
- Returns:
- the cosSourcingResponseMapper
-
setCosSourcingResponseMapper
- Parameters:
cosSourcingResponseMapper- the cosSourcingResponseMapper to set
-
getCosSourcingResultHandler
- Returns:
- the cosSourcingResultHandler
-
setCosSourcingResultHandler
- Parameters:
cosSourcingResultHandler- the cosSourcingResultHandler to set
-
getReservationService
- Returns:
- the reservationService
-
setReservationService
- Parameters:
reservationService- the reservationService to set
-
getCosServiceUtils
- Returns:
- the cosServiceUtils
-
setCosServiceUtils
- Parameters:
cosServiceUtils- the cosServiceUtils to set
-
setRestServiceConfiguration
Description copied from interface:OaaRestServiceSet the REST service configuration- Specified by:
setRestServiceConfigurationin interfaceOaaRestService- Parameters:
restServiceConfiguration- the restServiceConfiguration to set
-
getModelService
public de.hybris.platform.servicelayer.model.ModelService getModelService()- Returns:
- the modelService
-
setModelService
public void setModelService(de.hybris.platform.servicelayer.model.ModelService modelService) - Parameters:
modelService- the modelService to set
-
getCommonUtils
-
setCommonUtils
-