Class DefaultAbstractRestService
- java.lang.Object
-
- com.sap.sapoaacarintegration.services.rest.impl.DefaultAbstractRestService
-
- All Implemented Interfaces:
OaaRestService
- Direct Known Subclasses:
AuthenticationService,DefaultATPService,DefaultReservationService,DefaultSourcingService
public abstract class DefaultAbstractRestService extends java.lang.Object implements OaaRestService
Base Class for OAA REST Service classes.
-
-
Constructor Summary
Constructors Constructor Description DefaultAbstractRestService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidbeforeRestCall()Will be called before the REST call is madeprotected voidcheckHttpStatusCode(org.springframework.web.client.HttpClientErrorException e)Checks HTTP Status Codes for back end downRestServiceConfigurationgetRestServiceConfiguration()Get the REST service configurationorg.springframework.web.client.RestTemplategetRestTemplate()Get the REST templatede.hybris.platform.servicelayer.session.SessionServicegetSessionService()Get the Session serviceprotected voidinitialize()voidsetBackendDown(boolean backendDown)Set the Attribute for BackendDown in the SessionvoidsetRestServiceConfiguration(RestServiceConfiguration restServiceConfiguration)Set the REST service configurationvoidsetRestTemplate(org.springframework.web.client.RestTemplate restTemplate)Set the REST templatevoidsetSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService)Set the Session service
-
-
-
Method Detail
-
beforeRestCall
protected void beforeRestCall()
Will be called before the REST call is made
-
initialize
protected void initialize()
-
checkHttpStatusCode
protected void checkHttpStatusCode(org.springframework.web.client.HttpClientErrorException e)
Checks HTTP Status Codes for back end down- Parameters:
e-- Throws:
BackendDownException- when status code for back end down is given
-
setRestServiceConfiguration
public void setRestServiceConfiguration(RestServiceConfiguration restServiceConfiguration)
Set the REST service configuration- Specified by:
setRestServiceConfigurationin interfaceOaaRestService- Parameters:
restServiceConfiguration- the restServiceConfiguration to set
-
setBackendDown
public void setBackendDown(boolean backendDown)
Set the Attribute for BackendDown in the Session- Specified by:
setBackendDownin interfaceOaaRestService- Parameters:
backendDown- the value to set in the session
-
setRestTemplate
public void setRestTemplate(org.springframework.web.client.RestTemplate restTemplate)
Set the REST template- Parameters:
restTemplate- the restTemplate to set
-
setSessionService
public void setSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService)
Set the Session service- Parameters:
sessionService-
-
getRestTemplate
public org.springframework.web.client.RestTemplate getRestTemplate()
Get the REST template- Returns:
- restTemplate
-
getRestServiceConfiguration
public RestServiceConfiguration getRestServiceConfiguration()
Get the REST service configuration- Returns:
- restServiceConfiguration
-
getSessionService
public de.hybris.platform.servicelayer.session.SessionService getSessionService()
Get the Session service- Returns:
- the sessionService
-
-