use of org.orcid.util.DevJerseyClientConfig in project ORCID-Source by ORCID.
the class OrcidJerseyClientHandler method create.
public static Client create(boolean isDevelopmentMode, Map<String, Object> properties) {
ClientConfig config = null;
if (isDevelopmentMode) {
// DANGER!!! Trust all certs
LOGGER.info("TRUSTING ALL SSL CERTS IN DEV MODE!!!");
config = new DevJerseyClientConfig();
} else {
config = new DefaultClientConfig();
}
Set<String> keyset = properties.keySet();
for (String key : keyset) {
config.getProperties().put(key, properties.get(key));
}
config.getClasses().add(JacksonJaxbJsonProvider.class);
return Client.create(config);
}
Aggregations