Class DefaultCentralOrderApiClient

java.lang.Object
com.sap.sapcentralorderservices.clients.impl.DefaultCentralOrderApiClient
All Implemented Interfaces:
CentralOrderApiClient

public class DefaultCentralOrderApiClient extends Object implements CentralOrderApiClient
  • Constructor Details

    • DefaultCentralOrderApiClient

      public DefaultCentralOrderApiClient()
  • Method Details

    • 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
    • getDestinationService

      public de.hybris.platform.apiregistryservices.services.DestinationService getDestinationService()
      Returns:
      the destinationService
    • setDestinationService

      public void setDestinationService(de.hybris.platform.apiregistryservices.services.DestinationService destinationService)
      Parameters:
      destinationService - the destinationService to set
    • postEntity

      public void postEntity(org.springframework.web.util.UriComponents uriComponents, Object entity) throws SapCentralOrderException
      Specified by:
      postEntity in interface CentralOrderApiClient
      Throws:
      SapCentralOrderException
    • postEntity

      public <T> T postEntity(org.springframework.web.util.UriComponents uriComponents, Object entity, Class<T> response) throws SapCentralOrderException
      Description copied from interface: CentralOrderApiClient
      Posts an entity to the specified URI and returns the response. This method is used to send an HTTP POST request with an entity to the given URI and expects a response of the specified type. It can be used for various purposes such as creating or updating resources on a remote server.
      Specified by:
      postEntity in interface CentralOrderApiClient
      Type Parameters:
      T - The generic type of the expected response.
      Parameters:
      uriComponents - The URI components representing the target endpoint.
      entity - The entity object to be sent in the request body.
      response - The expected response type, usually a class representing the structure of the response data.
      Returns:
      The response of the specified type.
      Throws:
      SapCentralOrderException
    • handleHttpClientError

      protected void handleHttpClientError(org.springframework.web.client.HttpClientErrorException e) throws SapCentralOrderException
      Throws:
      SapCentralOrderException
    • handleHttpServerError

      protected void handleHttpServerError(org.springframework.web.client.HttpServerErrorException e) throws SapCentralOrderException
      Throws:
      SapCentralOrderException
    • getLocalizedMessage

      protected String getLocalizedMessage(String errorMessageLocale)
    • extractPayload

      @Deprecated(since="2211.FP4", forRemoval=true) protected void extractPayload(Object entity)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      entity - object to be logged
    • getEntity

      public <T> org.springframework.http.ResponseEntity<T> getEntity(org.springframework.web.util.UriComponents uriComponents, Class<T> clazz) throws SapCentralOrderException
      Specified by:
      getEntity in interface CentralOrderApiClient
      Type Parameters:
      T -
      Parameters:
      uriComponents -
      clazz -
      Returns:
      org.springframework.http.ResponseEntity<T>
      Throws:
      SapCentralOrderException
    • getRawEntity

      public <T> org.springframework.http.ResponseEntity<T> getRawEntity(org.springframework.web.util.UriComponents uriComponents, Class<T> clazz) throws SapCentralOrderException
      Throws:
      SapCentralOrderException