Class RestTemplateWrapper
java.lang.Object
de.hybris.platform.kymaintegrationservices.utils.RestTemplateWrapper
Wrapper for RestTemplate to handle ssl connections
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DestinationService<AbstractDestinationModel>protected intprotected org.springframework.web.client.RestTemplateDeprecated, for removal: This API element is subject to removal in a future version.since 1905 This method returns the first RestTemplate from the restTemplateFactorycache, if no RestTemplate found then a new RestTemplate Object will be returned.org.springframework.web.client.RestTemplategetRestTemplate(AbstractCredentialModel abstractCredentialModel) protected SSLContextFactoryServiceprotected intorg.springframework.web.client.RestTemplateDeprecated, for removal: This API element is subject to removal in a future version.since 1905 This method returns the first RestTemplate from the restTemplateFactorycache, if no RestTemplate found then a new RestTemplate Object will be returned.voidinvalidateAndUpdateCache(ConsumedCertificateCredentialModel certificateCredential) voidinvalidateTheCache(String credentialId) voidsetDestinationService(DestinationService<AbstractDestinationModel> destinationService) voidsetMessageConverters(List<org.springframework.http.converter.HttpMessageConverter<Object>> messageConverters) voidsetRestTemplate(org.springframework.web.client.RestTemplate restTemplate) Deprecated, for removal: This API element is subject to removal in a future version.since 1905 This method practically does nothing as it is not following the caching concept while storing the RestTemplate for the given credentials.voidsetSslContextFactoryService(SSLContextFactoryService sslContextFactoryService) voidsetTimeout(int timeout) protected voidupdateCredential(AbstractCredentialModel credential) voidupdateCredentials(AbstractDestinationModel destination) Deprecated, for removal: This API element is subject to removal in a future version.since 1905 Use the protected version of this method("updateCredential") instead.protected voidprotected voidvalidateCredential(AbstractCredentialModel credential) protected voidvalidateCredential(AbstractDestinationModel destination) Deprecated, for removal: This API element is subject to removal in a future version.since 1905 This method has been replaced by validateCredential(AbstractCredentialModel) for convention.
-
Constructor Details
-
RestTemplateWrapper
public RestTemplateWrapper()
-
-
Method Details
-
getUpdatedRestTemplate
@Deprecated(since="1905", forRemoval=true) public org.springframework.web.client.RestTemplate getUpdatedRestTemplate()Deprecated, for removal: This API element is subject to removal in a future version.since 1905 This method returns the first RestTemplate from the restTemplateFactorycache, if no RestTemplate found then a new RestTemplate Object will be returned. -
getRestTemplate
public org.springframework.web.client.RestTemplate getRestTemplate(AbstractCredentialModel abstractCredentialModel) throws CredentialException - Throws:
CredentialException
-
updateCredentials
@Deprecated(since="1905", forRemoval=true) public void updateCredentials(AbstractDestinationModel destination) throws CredentialException Deprecated, for removal: This API element is subject to removal in a future version.since 1905 Use the protected version of this method("updateCredential") instead.- Throws:
CredentialException
-
updateCredential
- Throws:
CredentialException
-
invalidateAndUpdateCache
-
invalidateTheCache
-
updateRequestFactory
protected void updateRequestFactory(ConsumedCertificateCredentialModel credential) throws CredentialException - Throws:
CredentialException
-
getRestTemplate
@Deprecated(since="1905", forRemoval=true) protected org.springframework.web.client.RestTemplate getRestTemplate()Deprecated, for removal: This API element is subject to removal in a future version.since 1905 This method returns the first RestTemplate from the restTemplateFactorycache, if no RestTemplate found then a new RestTemplate Object will be returned.- Throws:
CredentialException
-
getKeepAlive
protected int getKeepAlive() -
setRestTemplate
@Deprecated(since="1905", forRemoval=true) public void setRestTemplate(org.springframework.web.client.RestTemplate restTemplate) Deprecated, for removal: This API element is subject to removal in a future version.since 1905 This method practically does nothing as it is not following the caching concept while storing the RestTemplate for the given credentials. It is there only for the backward compatibility. -
getDestinationService
-
setDestinationService
-
validateCredential
@Deprecated(since="1905", forRemoval=true) protected void validateCredential(AbstractDestinationModel destination) throws CredentialException Deprecated, for removal: This API element is subject to removal in a future version.since 1905 This method has been replaced by validateCredential(AbstractCredentialModel) for convention.- Throws:
CredentialException
-
validateCredential
- Throws:
CredentialException
-
getTimeout
protected int getTimeout() -
setTimeout
public void setTimeout(int timeout) -
setMessageConverters
-
getMessageConverters
-
getSslContextFactoryService
-
setSslContextFactoryService
-