aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main/java
diff options
context:
space:
mode:
authorSreeja Gattagouni <SG00744975@techmahindra.com>2024-06-10 13:14:36 +0530
committerSANKET KS <sx00562924@techmahindra.com>2024-07-08 06:04:42 +0000
commit989d7f3d6ae740e30480bfc7d49acfbaf014d393 (patch)
tree0604e03d4e6910f39d66f7240eb6b448e4d05b4c /bpmn/so-bpmn-tasks/src/main/java
parent7100db88beb76d9f23accaad9d0ccd91f7633304 (diff)
Upgrade SO to Java_17
-Removal of aff and logging-filter-base dependencies. -CI build java17 branch-jdk17 version:https://gerrit.onap.org/r/c/ci-management/+/138252 Issue-ID: SO-4125 Change-ID: I58f07f888a814b999f92f8d89909b0666d0b9699 Signed-off-by: Sreeja Gattagouni <SG00744975@techmahindra.com>
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main/java')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnfm/tasks/CnfmHttpServiceProviderImpl.java10
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterCreateVnfTaskConfiguration.java4
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java6
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/NetworkAdapterClient.java11
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/NetworkAdapterClientImpl.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/VnfAdapterClientImpl.java6
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterClientImpl.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java2
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java2
9 files changed, 30 insertions, 27 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnfm/tasks/CnfmHttpServiceProviderImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnfm/tasks/CnfmHttpServiceProviderImpl.java
index 0edeb4089c..7ede5abec9 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnfm/tasks/CnfmHttpServiceProviderImpl.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/cnfm/tasks/CnfmHttpServiceProviderImpl.java
@@ -60,7 +60,7 @@ public class CnfmHttpServiceProviderImpl implements CnfmHttpServiceProvider {
final ResponseEntity<AsInstance> response =
httpServiceProvider.postHttpRequest(createAsRequest, url, AsInstance.class);
- final HttpStatus httpStatus = response.getStatusCode();
+ final HttpStatus httpStatus = (HttpStatus) response.getStatusCode();
if (httpStatus.is2xxSuccessful()) {
if (!response.hasBody()) {
LOGGER.error("Received response without body: {}", response);
@@ -91,7 +91,7 @@ public class CnfmHttpServiceProviderImpl implements CnfmHttpServiceProvider {
final String url = cnfmUrlProvider.getInstantiateAsRequestUrl(asInstanceId);
final ResponseEntity<AsInstance> response =
httpServiceProvider.postHttpRequest(instantiateAsRequest, url, AsInstance.class);
- final HttpStatus httpStatus = response.getStatusCode();
+ final HttpStatus httpStatus = (HttpStatus) response.getStatusCode();
if (httpStatus.is2xxSuccessful()) {
URI statusUri = response.getHeaders().getLocation();
if (statusUri == null) {
@@ -116,7 +116,7 @@ public class CnfmHttpServiceProviderImpl implements CnfmHttpServiceProvider {
try {
final ResponseEntity<AsLcmOpOcc> response = httpServiceProvider.getHttpResponse(url, AsLcmOpOcc.class);
- final HttpStatus httpStatus = response.getStatusCode();
+ final HttpStatus httpStatus = (HttpStatus) response.getStatusCode();
if (!(httpStatus.equals(HttpStatus.ACCEPTED)) && !(httpStatus.equals(HttpStatus.OK))) {
LOGGER.error("Unable to invoke HTTP GET using URL: {}, Response Code: {}", url, httpStatus.value());
@@ -143,7 +143,7 @@ public class CnfmHttpServiceProviderImpl implements CnfmHttpServiceProvider {
LOGGER.debug("Will send request to CNFM by uisng the url: {}", url);
ResponseEntity<Void> response = httpServiceProvider.deleteHttpRequest(url, Void.class);
- final HttpStatus httpStatus = response.getStatusCode();
+ final HttpStatus httpStatus = (HttpStatus) response.getStatusCode();
if (!(httpStatus.is2xxSuccessful())) {
LOGGER.error("Unable to invoke HTTP DELETE using URL: {}, Response Code: {}", url, httpStatus.value());
return Optional.empty();
@@ -164,7 +164,7 @@ public class CnfmHttpServiceProviderImpl implements CnfmHttpServiceProvider {
LOGGER.debug("Will send request to CNFM to terminate by uisng the url: {}", url);
ResponseEntity<Void> response = httpServiceProvider.postHttpRequest(terminateAsRequest, url, Void.class);
- final HttpStatus httpStatus = response.getStatusCode();
+ final HttpStatus httpStatus = (HttpStatus) response.getStatusCode();
if (httpStatus.is2xxSuccessful()) {
URI statusUri = response.getHeaders().getLocation();
if (statusUri == null) {
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterCreateVnfTaskConfiguration.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterCreateVnfTaskConfiguration.java
index fc3d6ab96c..890950fbdb 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterCreateVnfTaskConfiguration.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterCreateVnfTaskConfiguration.java
@@ -101,8 +101,8 @@ public class VnfmAdapterCreateVnfTaskConfiguration {
logger.info("Setting truststore: {}", trustStore.getURL());
final SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(sslContext);
final HttpClient httpClient = HttpClients.custom().setSSLSocketFactory(socketFactory).build();
- final HttpComponentsClientHttpRequestFactory factory =
- new HttpComponentsClientHttpRequestFactory(httpClient);
+ final HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory(
+ (org.apache.hc.client5.http.classic.HttpClient) httpClient);
restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(factory));
} catch (KeyManagementException | NoSuchAlgorithmException | KeyStoreException | CertificateException
| IOException | UnrecoverableKeyException exception) {
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java
index 94213bb93f..264ebb5a70 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnfm/tasks/VnfmAdapterServiceProviderImpl.java
@@ -66,7 +66,7 @@ public class VnfmAdapterServiceProviderImpl implements VnfmAdapterServiceProvide
final ResponseEntity<CreateVnfResponse> response =
httpServiceProvider.postHttpRequest(request, url, CreateVnfResponse.class);
- final HttpStatus httpStatus = response.getStatusCode();
+ final HttpStatus httpStatus = (HttpStatus) response.getStatusCode();
if (!(httpStatus.equals(HttpStatus.ACCEPTED)) && !(httpStatus.equals(HttpStatus.OK))) {
LOGGER.error("Unable to invoke HTTP POST using URL: {}, Response Code: {}", url, httpStatus.value());
return Optional.absent();
@@ -104,7 +104,7 @@ public class VnfmAdapterServiceProviderImpl implements VnfmAdapterServiceProvide
LOGGER.debug("Response received: ", response);
- final HttpStatus httpStatus = response.getStatusCode();
+ final HttpStatus httpStatus = (HttpStatus) response.getStatusCode();
if (!(httpStatus.equals(HttpStatus.ACCEPTED)) && !(httpStatus.equals(HttpStatus.OK))) {
LOGGER.error("Unable to invoke HTTP DELETE using URL: {}, Response Code: {}", url, httpStatus.value());
@@ -136,7 +136,7 @@ public class VnfmAdapterServiceProviderImpl implements VnfmAdapterServiceProvide
final ResponseEntity<QueryJobResponse> response =
httpServiceProvider.getHttpResponse(url, QueryJobResponse.class);
- final HttpStatus httpStatus = response.getStatusCode();
+ final HttpStatus httpStatus = (HttpStatus) response.getStatusCode();
if (!(httpStatus.equals(HttpStatus.ACCEPTED)) && !(httpStatus.equals(HttpStatus.OK))) {
LOGGER.error("Unable to invoke HTTP GET using URL: {}, Response Code: ", url, httpStatus.value());
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/NetworkAdapterClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/NetworkAdapterClient.java
index 62d0c230fb..4c051f9648 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/NetworkAdapterClient.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/NetworkAdapterClient.java
@@ -20,7 +20,7 @@
package org.onap.so.client.adapter.network;
-import javax.ws.rs.core.Response;
+import jakarta.ws.rs.core.Response;
import org.onap.so.adapters.nwrest.CreateNetworkRequest;
import org.onap.so.adapters.nwrest.CreateNetworkResponse;
import org.onap.so.adapters.nwrest.DeleteNetworkRequest;
@@ -46,11 +46,14 @@ public interface NetworkAdapterClient {
UpdateNetworkResponse updateNetwork(String aaiNetworkId, UpdateNetworkRequest req)
throws NetworkAdapterClientException;
- Response createNetworkAsync(CreateNetworkRequest req) throws NetworkAdapterClientException;
+ jakarta.ws.rs.core.Response createNetworkAsync(CreateNetworkRequest req) throws NetworkAdapterClientException;
- Response deleteNetworkAsync(String aaiNetworkId, DeleteNetworkRequest req) throws NetworkAdapterClientException;
+ jakarta.ws.rs.core.Response deleteNetworkAsync(String aaiNetworkId, DeleteNetworkRequest req)
+ throws NetworkAdapterClientException;
- Response rollbackNetworkAsync(String aaiNetworkId, RollbackNetworkRequest req) throws NetworkAdapterClientException;
+ jakarta.ws.rs.core.Response rollbackNetworkAsync(String aaiNetworkId, RollbackNetworkRequest req)
+ throws NetworkAdapterClientException;
Response updateNetworkAsync(String aaiNetworkId, UpdateNetworkRequest req) throws NetworkAdapterClientException;
+
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/NetworkAdapterClientImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/NetworkAdapterClientImpl.java
index 8668306f13..38304c4e0f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/NetworkAdapterClientImpl.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/NetworkAdapterClientImpl.java
@@ -20,10 +20,10 @@
package org.onap.so.client.adapter.network;
-import javax.ws.rs.InternalServerErrorException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriBuilder;
+import jakarta.ws.rs.InternalServerErrorException;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.Response;
+import jakarta.ws.rs.core.UriBuilder;
import org.onap.so.adapters.nwrest.CreateNetworkRequest;
import org.onap.so.adapters.nwrest.CreateNetworkResponse;
import org.onap.so.adapters.nwrest.DeleteNetworkRequest;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/VnfAdapterClientImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/VnfAdapterClientImpl.java
index cb04e97d20..8a318f23ec 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/VnfAdapterClientImpl.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/VnfAdapterClientImpl.java
@@ -20,9 +20,9 @@
package org.onap.so.client.adapter.vnf;
-import javax.ws.rs.InternalServerErrorException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.UriBuilder;
+import jakarta.ws.rs.InternalServerErrorException;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.UriBuilder;
import org.onap.so.adapters.vnfrest.CreateVfModuleRequest;
import org.onap.so.adapters.vnfrest.CreateVfModuleResponse;
import org.onap.so.adapters.vnfrest.DeleteVfModuleRequest;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterClientImpl.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterClientImpl.java
index 073b752348..0b27012dc2 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterClientImpl.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/VnfVolumeAdapterClientImpl.java
@@ -20,9 +20,9 @@
package org.onap.so.client.adapter.vnf;
-import javax.ws.rs.InternalServerErrorException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.UriBuilder;
+import jakarta.ws.rs.InternalServerErrorException;
+import jakarta.ws.rs.core.MediaType;
+import jakarta.ws.rs.core.UriBuilder;
import org.onap.so.adapters.vnfrest.CreateVolumeGroupRequest;
import org.onap.so.adapters.vnfrest.CreateVolumeGroupResponse;
import org.onap.so.adapters.vnfrest.DeleteVolumeGroupRequest;
@@ -94,7 +94,7 @@ public class VnfVolumeAdapterClientImpl implements VnfVolumeAdapterClient {
protected String buildQueryPath(String aaiVolumeGroupId, String cloudSiteId, String tenantId,
String volumeGroupStackId, Boolean skipAAI, String requestId, String serviceInstanceId) {
- javax.ws.rs.core.UriBuilder builder = this.getUri("/" + aaiVolumeGroupId);
+ UriBuilder builder = this.getUri("/" + aaiVolumeGroupId);
builder.queryParam("cloudSiteId", cloudSiteId).queryParam("tenantId", tenantId)
.queryParam("volumeGroupStackId", volumeGroupStackId).queryParam("skipAAI", skipAAI)
.queryParam("msoRequest.requestId", requestId)
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java
index 293bcf9f0e..45238c2434 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterObjectMapper.java
@@ -26,7 +26,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import org.apache.commons.lang3.StringUtils;
import org.onap.sdnc.northbound.client.model.GenericResourceApiParam;
import org.onap.sdnc.northbound.client.model.GenericResourceApiParamParam;
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java
index b3efa71969..766a87e95c 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/NetworkAdapterResources.java
@@ -23,7 +23,7 @@ package org.onap.so.client.orchestration;
import java.io.UnsupportedEncodingException;
import java.util.Map;
import java.util.Optional;
-import javax.ws.rs.core.Response;
+import jakarta.ws.rs.core.Response;
import org.onap.so.adapters.nwrest.CreateNetworkRequest;
import org.onap.so.adapters.nwrest.CreateNetworkResponse;
import org.onap.so.adapters.nwrest.DeleteNetworkRequest;