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 Details

    • DefaultCosSourcingService

      public DefaultCosSourcingService()
  • Method Details

    • callRestServiceAndPersistResult

      public void callRestServiceAndPersistResult(AbstractOrderModel model)
      Calls the COS rest service for fetching sourcing results
      Specified by:
      callRestServiceAndPersistResult in interface SourcingService
      Parameters:
      abstractOrderModel -
    • callRestService

      public SourcingResponse callRestService(AbstractOrderModel abstractOrderModel, boolean execAllStrategies, boolean reserve)
      Calls the callCosRestService method to fulfill the sourcing service
      Specified by:
      callRestService in interface SourcingService
      Parameters:
      abstractOrderModel -
      execAllStrategies -
      reserve -
      Returns:
      SourcingResponse
    • callCosRestService

      public SourcingResponse callCosRestService(AbstractOrderModel abstractOrderModel)
      Calls the COS rest service for fetching sourcing results
      Specified by:
      callCosRestService in interface CosSourcingService
      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
    • 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: OaaRestService
      Set the REST service configuration
      Specified by:
      setRestServiceConfiguration in interface OaaRestService
      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

      public CommonUtils getCommonUtils()
    • setCommonUtils

      public void setCommonUtils(CommonUtils commonUtils)