use of org.apache.syncope.common.rest.api.DateParamConverterProvider in project syncope by apache.
the class SyncopeClientFactoryBean method defaultRestClientFactoryBean.
protected JAXRSClientFactoryBean defaultRestClientFactoryBean() {
JAXRSClientFactoryBean defaultRestClientFactoryBean = new JAXRSClientFactoryBean();
defaultRestClientFactoryBean.setHeaders(new HashMap<>());
if (StringUtils.isBlank(address)) {
throw new IllegalArgumentException("Property 'address' is missing");
}
defaultRestClientFactoryBean.setAddress(address);
if (StringUtils.isNotBlank(domain)) {
defaultRestClientFactoryBean.getHeaders().put(RESTHeaders.DOMAIN, Collections.singletonList(domain));
}
defaultRestClientFactoryBean.setThreadSafe(true);
defaultRestClientFactoryBean.setInheritHeaders(true);
List<Feature> features = new ArrayList<>();
features.add(new LoggingFeature());
defaultRestClientFactoryBean.setFeatures(features);
List<Object> providers = new ArrayList<>(4);
providers.add(new DateParamConverterProvider());
providers.add(getJaxbProvider());
providers.add(getJsonProvider());
providers.add(getExceptionMapper());
defaultRestClientFactoryBean.setProviders(providers);
return defaultRestClientFactoryBean;
}
Aggregations