Class DefaultCentralOrderApiClient
java.lang.Object
com.sap.sapcentralorderservices.clients.impl.DefaultCentralOrderApiClient
- All Implemented Interfaces:
CentralOrderApiClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidextractPayload(Object entity) Deprecated, for removal: This API element is subject to removal in a future version.since 2211.FP4.de.hybris.platform.apiregistryservices.services.DestinationService<T> org.springframework.http.ResponseEntity<T>de.hybris.platform.outboundservices.client.IntegrationRestTemplateFactoryprotected StringgetLocalizedMessage(String errorMessageLocale) <T> org.springframework.http.ResponseEntity<T>getRawEntity(org.springframework.web.util.UriComponents uriComponents, Class<T> clazz) protected voidhandleHttpClientError(org.springframework.web.client.HttpClientErrorException e) protected voidhandleHttpServerError(org.springframework.web.client.HttpServerErrorException e) voidpostEntity(org.springframework.web.util.UriComponents uriComponents, Object entity) <T> TpostEntity(org.springframework.web.util.UriComponents uriComponents, Object entity, Class<T> response) Posts an entity to the specified URI and returns the response.voidsetDestinationService(de.hybris.platform.apiregistryservices.services.DestinationService destinationService) voidsetIntegrationRestTemplateFactory(de.hybris.platform.outboundservices.client.IntegrationRestTemplateFactory integrationRestTemplateFactory)
-
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:
postEntityin interfaceCentralOrderApiClient- Throws:
SapCentralOrderException
-
postEntity
public <T> T postEntity(org.springframework.web.util.UriComponents uriComponents, Object entity, Class<T> response) throws SapCentralOrderException Description copied from interface:CentralOrderApiClientPosts 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:
postEntityin interfaceCentralOrderApiClient- 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
-
extractPayload
Deprecated, for removal: This API element is subject to removal in a future version.since 2211.FP4. useCentralOrderServiceUtils.logObjectAsString(Object, boolean)- 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:
getEntityin interfaceCentralOrderApiClient- 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
-