Class DefaultRestService

java.lang.Object
com.sap.sapoaacarintegration.services.rest.impl.DefaultRestService
All Implemented Interfaces:
OaaRestService
Direct Known Subclasses:
AuthenticationService, DefaultReservationService

public class DefaultRestService extends Object implements OaaRestService
Base Class for OAA REST Service classes.
  • Constructor Details

    • DefaultRestService

      public DefaultRestService()
  • Method Details

    • beforeRestCall

      public void beforeRestCall()
      Will be called before the REST call is made
    • initialize

      public void initialize()
      Initialize rest service configuration
    • checkHttpStatusCode

      public void checkHttpStatusCode(org.springframework.web.client.HttpClientErrorException httpClientErrorException)
      Checks HTTP Status Codes for back end down
      Parameters:
      httpClientErrorException - to understand the type of exception occurred
      Throws:
      BackendDownException - when status code for back end down is given
    • setRestServiceConfiguration

      public void setRestServiceConfiguration(RestServiceConfiguration restServiceConfiguration)
      Set the REST service configuration
      Specified by:
      setRestServiceConfiguration in interface OaaRestService
      Parameters:
      restServiceConfiguration - the restServiceConfiguration to set
    • setBackendDown

      public void setBackendDown(boolean backendDown)
      Set the Attribute for BackendDown in the Session
      Specified by:
      setBackendDown in interface OaaRestService
      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
    • getOutboundHttpClientFactory

      public de.hybris.platform.outboundservices.client.OutboundHttpClientFactory getOutboundHttpClientFactory()
      Returns:
      the outboundHttpClientFactory
    • setOutboundHttpClientFactory

      public void setOutboundHttpClientFactory(de.hybris.platform.outboundservices.client.OutboundHttpClientFactory outboundHttpClientFactory)
      Parameters:
      outboundHttpClientFactory - the outboundHttpClientFactory to set