/**
- * ============LICENSE_START=======================================================
+ * ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
* Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
public OperationResult getAndDeleteResource(String url, String transId) {
// First, GET the model
OperationResult getResponse = getResource(url, transId, MediaType.APPLICATION_XML_TYPE);
- if ((getResponse == null) || (getResponse.getResultCode() != Response.Status.OK.getStatusCode())) {
+ if (getResponse == null || getResponse.getResultCode() != Response.Status.OK.getStatusCode()) {
return getResponse;
}
public boolean useBasicAuth() {
- return (config.getAaiAuthenticationUser() != null) && (config.getAaiAuthenticationPassword() != null);
+ return config.getAaiAuthenticationUser() != null && config.getAaiAuthenticationPassword() != null;
}
private RestClient setupClient() {
restClient.validateServerHostname(false)
.validateServerCertChain(false)
.clientCertFile(config.getAaiKeyStorePath())
- .clientCertPassword(config.getAaiKeyStorePassword());
+ .clientCertPassword(config.getAaiKeyStorePassword())
+ .connectTimeoutMs(120000)
+ .readTimeoutMs(120000);
// @formatter:on
if (useBasicAuth()) {