Class DefaultSourcingService
- java.lang.Object
-
- com.sap.sapoaacarintegration.services.rest.impl.DefaultAbstractRestService
-
- com.sap.sapoaacarintegration.services.sourcing.impl.DefaultSourcingService
-
- All Implemented Interfaces:
OaaRestService,SourcingService
public class DefaultSourcingService extends DefaultAbstractRestService implements SourcingService
Default Sourcing Service
-
-
Constructor Summary
Constructors Constructor Description DefaultSourcingService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SourcingResponsecallRestService(AbstractOrderModel abstractOrderModel, boolean execAllStrategies, boolean reserve)Call the REST service in Customer Activity Repository (CAR) and return the service call response without persisting in hybris to the method invoker.voidcallRestServiceAndPersistResult(AbstractOrderModel model)Call the REST Service in Customer Activity Repository (CAR) and persist the result (Schedule Lines) in the given cart.protected AuthenticationServicegetAuthenticationService()protected SourcingRequestMappergetCartMapper()protected HttpEntityBuildergetHttpEntityBuilder()protected HttpHeaderProvidergetHttpHeaderProvider()protected SourcingResultHandlergetSourcingResultHandler()protected URLProvidergetUrlProvider()voidsetAuthenticationService(AuthenticationService authenticationService)voidsetCartMapper(SourcingRequestMapper cartMapper)voidsetHttpEntityBuilder(HttpEntityBuilder httpEntityBuilder)voidsetHttpHeaderProvider(HttpHeaderProvider httpHeaderProvider)voidsetSourcingResultHandler(SourcingResultHandler sourcingResultHandler)voidsetUrlProvider(URLProvider urlProvider)-
Methods inherited from class com.sap.sapoaacarintegration.services.rest.impl.DefaultAbstractRestService
beforeRestCall, checkHttpStatusCode, getRestServiceConfiguration, getRestTemplate, getSessionService, initialize, setBackendDown, setRestServiceConfiguration, setRestTemplate, 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, setRestServiceConfiguration
-
-
-
-
Method Detail
-
callRestServiceAndPersistResult
public void callRestServiceAndPersistResult(AbstractOrderModel model) throws SourcingException, BackendDownException
Description copied from interface:SourcingServiceCall the REST Service in Customer Activity Repository (CAR) and persist the result (Schedule Lines) in the given cart.- Specified by:
callRestServiceAndPersistResultin interfaceSourcingService- Parameters:
model- Hybris cart or order model- Throws:
SourcingExceptionBackendDownException
-
callRestService
public SourcingResponse callRestService(AbstractOrderModel abstractOrderModel, boolean execAllStrategies, boolean reserve) throws SourcingException, BackendDownException
Description copied from interface:SourcingServiceCall the REST service in Customer Activity Repository (CAR) and return the service call response without persisting in hybris to the method invoker.- Specified by:
callRestServicein interfaceSourcingService- Parameters:
abstractOrderModel- Hybris order or cartexecAllStrategies- Flag which indicates if a all sourcing strategies should be executed.reserve- Create or update a temporary reservation in case the sourcing was executed successfully- Returns:
SourcingResponseThe response from the sourcing call- Throws:
SourcingExceptionBackendDownException
-
setSourcingResultHandler
public void setSourcingResultHandler(SourcingResultHandler sourcingResultHandler)
- Parameters:
sourcingResultHandler- the sourcingResultHandler to set
-
getSourcingResultHandler
protected SourcingResultHandler getSourcingResultHandler()
- Returns:
- the sourcingResultHandler
-
setCartMapper
public void setCartMapper(SourcingRequestMapper cartMapper)
- Parameters:
cartMapper- the cartMapper to set
-
getCartMapper
protected SourcingRequestMapper getCartMapper()
- Returns:
- the cartMapper
-
setHttpHeaderProvider
public void setHttpHeaderProvider(HttpHeaderProvider httpHeaderProvider)
- Parameters:
httpHeaderProvider- the httpHeaderProvider to set
-
getHttpHeaderProvider
protected HttpHeaderProvider getHttpHeaderProvider()
- Returns:
- the httpHeaderProvider
-
setUrlProvider
public void setUrlProvider(URLProvider urlProvider)
- Parameters:
urlProvider- the urlProvider to set
-
getUrlProvider
protected URLProvider getUrlProvider()
- Returns:
- the urlProvider
-
setAuthenticationService
public void setAuthenticationService(AuthenticationService authenticationService)
- Parameters:
authenticationService- the authenticationService to set
-
getAuthenticationService
protected AuthenticationService getAuthenticationService()
- Returns:
- the authenticationService
-
setHttpEntityBuilder
public void setHttpEntityBuilder(HttpEntityBuilder httpEntityBuilder)
- Parameters:
httpEntityBuilder- the httpEntityBuilder to set
-
getHttpEntityBuilder
protected HttpEntityBuilder getHttpEntityBuilder()
- Returns:
- the httpEntityBuilder
-
-