Class RestTemplateWrapper
- java.lang.Object
-
- de.hybris.platform.kymaintegrationservices.utils.RestTemplateWrapper
-
public class RestTemplateWrapper extends java.lang.Object
Wrapper for RestTemplate to handle ssl connections
-
-
Constructor Summary
Constructors Constructor Description RestTemplateWrapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected DestinationService<AbstractDestinationModel>
getDestinationService()
protected int
getKeepAlive()
protected java.util.List<org.springframework.http.converter.HttpMessageConverter<java.lang.Object>>
getMessageConverters()
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.org.springframework.web.client.RestTemplate
getRestTemplate(AbstractCredentialModel abstractCredentialModel)
protected SSLContextFactoryService
getSslContextFactoryService()
protected int
getTimeout()
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.void
invalidateAndUpdateCache(ConsumedCertificateCredentialModel certificateCredential)
void
invalidateTheCache(java.lang.String credentialId)
void
setDestinationService(DestinationService<AbstractDestinationModel> destinationService)
void
setMessageConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<java.lang.Object>> messageConverters)
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.void
setSslContextFactoryService(SSLContextFactoryService sslContextFactoryService)
void
setTimeout(int timeout)
protected void
updateCredential(AbstractCredentialModel credential)
void
updateCredentials(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 void
updateRequestFactory(ConsumedCertificateCredentialModel credential)
protected void
validateCredential(AbstractCredentialModel credential)
protected void
validateCredential(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.
-
-
-
Method Detail
-
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
protected void updateCredential(AbstractCredentialModel credential) throws CredentialException
- Throws:
CredentialException
-
invalidateAndUpdateCache
public void invalidateAndUpdateCache(ConsumedCertificateCredentialModel certificateCredential)
-
invalidateTheCache
public void invalidateTheCache(java.lang.String credentialId)
-
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
protected DestinationService<AbstractDestinationModel> getDestinationService()
-
setDestinationService
public void setDestinationService(DestinationService<AbstractDestinationModel> destinationService)
-
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
protected void validateCredential(AbstractCredentialModel credential) throws CredentialException
- Throws:
CredentialException
-
getTimeout
protected int getTimeout()
-
setTimeout
public void setTimeout(int timeout)
-
setMessageConverters
public void setMessageConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<java.lang.Object>> messageConverters)
-
getMessageConverters
protected java.util.List<org.springframework.http.converter.HttpMessageConverter<java.lang.Object>> getMessageConverters()
-
getSslContextFactoryService
protected SSLContextFactoryService getSslContextFactoryService()
-
setSslContextFactoryService
public void setSslContextFactoryService(SSLContextFactoryService sslContextFactoryService)
-
-