java.lang.Object
org.cruk.clarity.api.spring.ClarityClientConfiguration
- Direct Known Subclasses:
ClarityClientSearchConfiguration
@Configuration
@EnableAspectJAutoProxy(proxyTargetClass=false)
@ComponentScan(basePackages={"org.cruk.clarity.api.automation.impl","org.cruk.clarity.api.debugging","org.cruk.clarity.api.filestore","org.cruk.clarity.api.http","org.cruk.clarity.api.impl","org.cruk.clarity.api.jaxb"},
excludeFilters=)
public class ClarityClientConfiguration
extends Object
Main Spring configuration for the Clarity Client.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructor with just the standard packages.protectedClarityClientConfiguration(Class<?>... additionalPackageClasses) Constructor allowing additional package classes to be given for the JAXB context. -
Method Summary
Modifier and TypeMethodDescriptionHTTP client request factory.Clarity client response handler.REST template for HTTP file uploads.Clarity HTTP client.Access to the list of classes managed by the Clarity client JAXB context.JAXB marshaller.JAXB unmarshaller.REST template for the main Clarity client.protected RestTemplateHelper method to create REST templates based on the JAXB context and HTTP client request factory.voidSet the timeout on the SFTP file uploader to the same as the HTTP connection timeout.
-
Constructor Details
-
ClarityClientConfiguration
public ClarityClientConfiguration()Constructor with just the standard packages. -
ClarityClientConfiguration
Constructor allowing additional package classes to be given for the JAXB context. These classes have their package added to the context, not just the class itself.- Parameters:
additionalPackageClasses- The classes representing the packages to add to the JAXB context.
-
-
Method Details
-
setTimeoutOnUploader
Set the timeout on the SFTP file uploader to the same as the HTTP connection timeout. -
clarityHttpClient
Clarity HTTP client.- Returns:
- The HTTP client for the Clarity client.
-
clarityClientHttpRequestFactory
HTTP client request factory.- Returns:
- A request factory for the Clarity client.
-
clarityJaxbMarshaller
JAXB marshaller.- Returns:
- A Marshaller view on the JAXB context.
-
clarityJaxbUnmarshaller
JAXB unmarshaller.- Returns:
- An Unmarshaller view on the JAXB context.
-
clarityJaxbClasses
Access to the list of classes managed by the Clarity client JAXB context.- Returns:
- A list of classes.
-
clarityExceptionErrorHandler
Clarity client response handler.- Returns:
- A response handler for Clarity calls.
-
createRestTemplate
Helper method to create REST templates based on the JAXB context and HTTP client request factory.- Returns:
- An initialised RestTemplate.
-
clarityRestTemplate
REST template for the main Clarity client.- Returns:
- A REST template for talking to Clarity.
-
clarityFileUploadTemplate
REST template for HTTP file uploads.- Returns:
- A REST template for uploading files to Clarity.
-