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 Constructor Description DefaultCosSourcingService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SourcingResponsecallCosRestService(AbstractOrderModel abstractOrderModel)Calls the COS rest service for fetching sourcing resultsSourcingResponsecallRestService(AbstractOrderModel abstractOrderModel, boolean execAllStrategies, boolean reserve)Calls the callCosRestService method to fulfill the sourcing servicevoidcallRestServiceAndPersistResult(AbstractOrderModel model)Calls 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)CosConfigurationServicegetConfigurationService()CosServiceUtilsgetCosServiceUtils()CosSourcingRequestMappergetCosSourcingRequestMapper()CosSourcingResponseMappergetCosSourcingResponseMapper()CosSourcingResultHandlergetCosSourcingResultHandler()de.hybris.platform.outboundservices.client.IntegrationRestTemplateFactorygetIntegrationRestTemplateFactory()de.hybris.platform.servicelayer.model.ModelServicegetModelService()ReservationServicegetReservationService()protected SourcingResponsegetSourcingResponse(CosSourcingRequest cosSourcingRequest)protected voidresetReservationId(AbstractOrderModel abstractOrderModel)voidsetConfigurationService(CosConfigurationService configurationService)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 configuration-
Methods inherited from class com.sap.sapoaacosintegration.services.rest.impl.DefaultAbstractCosRestService
checkHttpStatusCode, getSessionService, setBackendDown, setSessionService
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sap.retail.oaa.commerce.services.rest.OaaRestService
setBackendDown
-
-
-
-
Method Detail
-
callRestServiceAndPersistResult
public void callRestServiceAndPersistResult(AbstractOrderModel model)
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
public SourcingResponse callCosRestService(AbstractOrderModel abstractOrderModel)
Calls the COS rest service for fetching sourcing results- Specified by:
callCosRestServicein interfaceCosSourcingService- Parameters:
abstractOrderModel-- Returns:
SourcingResponse
-
decideAndPerformReservation
protected void decideAndPerformReservation(AbstractOrderModel abstractOrderModel)
-
doSourcingAndPersistResult
protected SourcingResponse doSourcingAndPersistResult(AbstractOrderModel abstractOrderModel)
-
confirmReservation
protected void confirmReservation(AbstractOrderModel abstractOrderModel)
-
getSourcingResponse
protected SourcingResponse getSourcingResponse(CosSourcingRequest cosSourcingRequest)
-
callSourcingRestService
protected SourcingResponse callSourcingRestService(CosSourcingRequest cosSourcingRequest)
-
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
protected void resetReservationId(AbstractOrderModel abstractOrderModel)
- 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
public CosSourcingRequestMapper getCosSourcingRequestMapper()
- Returns:
- the cosSourcingRequestMapper
-
setCosSourcingRequestMapper
public void setCosSourcingRequestMapper(CosSourcingRequestMapper cosSourcingRequestMapper)
- Parameters:
cosSourcingRequestMapper- the cosSourcingRequestMapper to set
-
getCosSourcingResponseMapper
public CosSourcingResponseMapper getCosSourcingResponseMapper()
- Returns:
- the cosSourcingResponseMapper
-
setCosSourcingResponseMapper
public void setCosSourcingResponseMapper(CosSourcingResponseMapper cosSourcingResponseMapper)
- Parameters:
cosSourcingResponseMapper- the cosSourcingResponseMapper to set
-
getCosSourcingResultHandler
public CosSourcingResultHandler getCosSourcingResultHandler()
- Returns:
- the cosSourcingResultHandler
-
setCosSourcingResultHandler
public void setCosSourcingResultHandler(CosSourcingResultHandler cosSourcingResultHandler)
- Parameters:
cosSourcingResultHandler- the cosSourcingResultHandler to set
-
getReservationService
public ReservationService getReservationService()
- Returns:
- the reservationService
-
setReservationService
public void setReservationService(ReservationService reservationService)
- Parameters:
reservationService- the reservationService to set
-
getConfigurationService
public CosConfigurationService getConfigurationService()
- Returns:
- the configurationService
-
setConfigurationService
public void setConfigurationService(CosConfigurationService configurationService)
- Parameters:
configurationService- the configurationService to set
-
getCosServiceUtils
public CosServiceUtils getCosServiceUtils()
- Returns:
- the cosServiceUtils
-
setCosServiceUtils
public void setCosServiceUtils(CosServiceUtils cosServiceUtils)
- Parameters:
cosServiceUtils- the cosServiceUtils to set
-
setRestServiceConfiguration
public void setRestServiceConfiguration(RestServiceConfiguration restServiceConfiguration)
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
-
-