diff options
author | efiacor <fiachra.corcoran@est.tech> | 2023-03-10 16:58:01 +0000 |
---|---|---|
committer | efiacor <fiachra.corcoran@est.tech> | 2023-04-05 12:26:45 +0100 |
commit | a2d44c58079fb01dacfd0177e625c97c25259cc1 (patch) | |
tree | 794b26730d0564a90e74fc2c3f61246ba025fa2b /dmaap-bc/src/main/java/org | |
parent | fc7bb1865dad8435eba86ba477a184a20fe6daf3 (diff) |
[DMAAP-BC] Upgrade packages for London rel2.0.12
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: I65e2a2e7e344c6575168ed020cd7adab2d6606ee
Issue-ID: DMAAP-1844
Diffstat (limited to 'dmaap-bc/src/main/java/org')
25 files changed, 177 insertions, 185 deletions
diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/client/DrProvConnection.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/client/DrProvConnection.java index 0e4ae09..a0bab76 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/client/DrProvConnection.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/client/DrProvConnection.java @@ -128,6 +128,7 @@ public class DrProvConnection extends BaseLoggingClass { boolean rc = false; logger.info( "connect to data router at: {}", provUrl); try { + logger.error("\n\n\nURL:" + provUrl + "\n\n\n"); URL pUrl = new URL(provUrl); if (pUrl.getProtocol().equals( "https" )) { rc = makeSecureConnection(pUrl); diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/Authorization.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/Authorization.java index e8b05c6..8b67f68 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/Authorization.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/Authorization.java @@ -19,12 +19,12 @@ */ package org.onap.dmaap.dbcapi.resources; +import jakarta.ws.rs.NameBinding; +import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import java.lang.annotation.ElementType; -import javax.ws.rs.NameBinding; // @Authorization annotation @NameBinding diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/AuthorizationFilter.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/AuthorizationFilter.java index 32e8845..42ee632 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/AuthorizationFilter.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/AuthorizationFilter.java @@ -20,9 +20,9 @@ package org.onap.dmaap.dbcapi.resources; -import javax.ws.rs.container.ContainerRequestContext; -import javax.ws.rs.container.ContainerRequestFilter; +import jakarta.ws.rs.container.ContainerRequestContext; +import jakarta.ws.rs.container.ContainerRequestFilter; import org.onap.dmaap.dbcapi.authentication.AuthenticationErrorException; import org.onap.dmaap.dbcapi.logging.BaseLoggingClass; import org.onap.dmaap.dbcapi.service.ApiService; @@ -30,7 +30,7 @@ import org.onap.dmaap.dbcapi.util.DmaapConfig; @Authorization -public class AuthorizationFilter extends BaseLoggingClass implements ContainerRequestFilter { +public class AuthorizationFilter extends BaseLoggingClass implements ContainerRequestFilter { private static final String AAF_CADI_FLAG = "enableCADI"; private final ResponseBuilder responseBuilder = new ResponseBuilder(); diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/BridgeResource.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/BridgeResource.java index 299c48f..6b38fa4 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/BridgeResource.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/BridgeResource.java @@ -24,14 +24,14 @@ package org.onap.dmaap.dbcapi.resources; import java.util.List; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.onap.dmaap.dbcapi.logging.BaseLoggingClass; import org.onap.dmaap.dbcapi.model.ApiError; @@ -44,7 +44,7 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import static javax.ws.rs.core.Response.Status.BAD_REQUEST; +import static jakarta.ws.rs.core.Response.Status.BAD_REQUEST; @Path("/bridge") @Api( value= "bridge", description = "Endpoint for retreiving MR Bridge metrics" ) diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DR_NodeResource.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DR_NodeResource.java index f001136..dc700d4 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DR_NodeResource.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DR_NodeResource.java @@ -27,25 +27,25 @@ import io.swagger.annotations.ApiResponses; import java.util.List; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.GenericEntity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.GenericEntity; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import org.onap.dmaap.dbcapi.logging.BaseLoggingClass; import org.onap.dmaap.dbcapi.model.ApiError; import org.onap.dmaap.dbcapi.model.DR_Node; import org.onap.dmaap.dbcapi.service.DR_NodeService; -import static javax.ws.rs.core.Response.Status.BAD_REQUEST; -import static javax.ws.rs.core.Response.Status.NO_CONTENT; +import static jakarta.ws.rs.core.Response.Status.BAD_REQUEST; +import static jakarta.ws.rs.core.Response.Status.NO_CONTENT; @Path("/dr_nodes") @Api( value= "dr_nodes", description = "Endpoint for a Data Router Node server" ) diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DR_PubResource.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DR_PubResource.java index f512124..ca349cf 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DR_PubResource.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DR_PubResource.java @@ -29,18 +29,18 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.GenericEntity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.GenericEntity; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import org.onap.dmaap.dbcapi.logging.BaseLoggingClass; import org.onap.dmaap.dbcapi.model.ApiError; diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DR_SubResource.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DR_SubResource.java index 2fa6ccd..9d10372 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DR_SubResource.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DR_SubResource.java @@ -26,18 +26,18 @@ import com.google.common.collect.Iterables; import java.util.ArrayList; import java.util.List; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.GenericEntity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.GenericEntity; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import org.onap.dmaap.dbcapi.logging.BaseLoggingClass; import org.onap.dmaap.dbcapi.model.ApiError; @@ -51,7 +51,7 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import static javax.ws.rs.core.Response.Status.CREATED; +import static jakarta.ws.rs.core.Response.Status.CREATED; @Path("/dr_subs") diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DcaeLocationResource.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DcaeLocationResource.java index 89c9b49..2e1faa1 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DcaeLocationResource.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DcaeLocationResource.java @@ -21,34 +21,31 @@ package org.onap.dmaap.dbcapi.resources; +import static jakarta.ws.rs.core.Response.Status.NOT_FOUND; +import static jakarta.ws.rs.core.Response.Status.NO_CONTENT; + import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; - +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.GenericEntity; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import java.util.List; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.GenericEntity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; - import org.onap.dmaap.dbcapi.logging.BaseLoggingClass; import org.onap.dmaap.dbcapi.model.ApiError; import org.onap.dmaap.dbcapi.model.DcaeLocation; import org.onap.dmaap.dbcapi.service.DcaeLocationService; -import static javax.ws.rs.core.Response.Status.NOT_FOUND; -import static javax.ws.rs.core.Response.Status.NO_CONTENT; - @Path("/dcaeLocations") @Api( value= "dcaeLocations", description = "an OpenStack tenant purposed for OpenDCAE (i.e. where OpenDCAE components might be deployed)" ) diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DmaapResource.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DmaapResource.java index 955cab7..4bbd387 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DmaapResource.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/DmaapResource.java @@ -33,16 +33,16 @@ import org.onap.dmaap.dbcapi.model.ApiError; import org.onap.dmaap.dbcapi.model.Dmaap; import org.onap.dmaap.dbcapi.service.DmaapService; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; @Path("/dmaap") diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/FeedResource.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/FeedResource.java index 28bdb00..bc98d03 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/FeedResource.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/FeedResource.java @@ -27,19 +27,19 @@ import io.swagger.annotations.ApiResponses; import java.util.List; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.GenericEntity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.GenericEntity; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import org.onap.dmaap.dbcapi.logging.BaseLoggingClass; import org.onap.dmaap.dbcapi.model.ApiError; import org.onap.dmaap.dbcapi.model.DR_Pub; diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/InfoResource.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/InfoResource.java index bcb7ed2..4fc8977 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/InfoResource.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/InfoResource.java @@ -30,14 +30,14 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.Path; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.UriInfo; import org.onap.dmaap.dbcapi.logging.BaseLoggingClass; import org.onap.dmaap.dbcapi.model.ApiError; diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/MR_ClientResource.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/MR_ClientResource.java index 80ee0a6..ed7b74b 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/MR_ClientResource.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/MR_ClientResource.java @@ -33,21 +33,21 @@ import org.onap.dmaap.dbcapi.service.MR_ClientService; import org.onap.dmaap.dbcapi.service.MR_ClusterService; import org.onap.dmaap.dbcapi.service.TopicService; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.GenericEntity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.GenericEntity; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import java.util.List; -import static javax.ws.rs.core.Response.Status.NO_CONTENT; +import static jakarta.ws.rs.core.Response.Status.NO_CONTENT; @Path("/mr_clients") diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/MR_ClusterResource.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/MR_ClusterResource.java index 0a361ff..072cfe3 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/MR_ClusterResource.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/MR_ClusterResource.java @@ -27,18 +27,18 @@ import io.swagger.annotations.ApiResponses; import java.util.List; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.GenericEntity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.GenericEntity; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import org.onap.dmaap.dbcapi.logging.BaseLoggingClass; import org.onap.dmaap.dbcapi.model.ApiError; diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/RequestTimeLogFilter.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/RequestTimeLogFilter.java index b2b98b6..afd0cb7 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/RequestTimeLogFilter.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/RequestTimeLogFilter.java @@ -21,10 +21,10 @@ package org.onap.dmaap.dbcapi.resources; import com.att.eelf.configuration.EELFLogger;
import java.time.Clock;
-import javax.ws.rs.container.ContainerRequestContext;
-import javax.ws.rs.container.ContainerRequestFilter;
-import javax.ws.rs.container.ContainerResponseContext;
-import javax.ws.rs.container.ContainerResponseFilter;
+import jakarta.ws.rs.container.ContainerRequestContext;
+import jakarta.ws.rs.container.ContainerRequestFilter;
+import jakarta.ws.rs.container.ContainerResponseContext;
+import jakarta.ws.rs.container.ContainerResponseFilter;
import org.onap.dmaap.dbcapi.logging.BaseLoggingClass;
public class RequestTimeLogFilter extends BaseLoggingClass implements ContainerRequestFilter, ContainerResponseFilter {
diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/RequiredChecker.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/RequiredChecker.java index 52646aa..646c460 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/RequiredChecker.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/RequiredChecker.java @@ -20,7 +20,8 @@ package org.onap.dmaap.dbcapi.resources; -import static javax.ws.rs.core.Response.Status.BAD_REQUEST; + +import static jakarta.ws.rs.core.Response.Status.BAD_REQUEST; import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/ResponseBuilder.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/ResponseBuilder.java index 044e7c4..ff3abb6 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/ResponseBuilder.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/ResponseBuilder.java @@ -24,11 +24,11 @@ package org.onap.dmaap.dbcapi.resources; import static com.att.eelf.configuration.Configuration.MDC_RESPONSE_CODE; import static com.att.eelf.configuration.Configuration.MDC_RESPONSE_DESC; import static com.att.eelf.configuration.Configuration.MDC_STATUS_CODE; -import static javax.ws.rs.core.Response.Status.NOT_FOUND; -import static javax.ws.rs.core.Response.Status.SERVICE_UNAVAILABLE; -import static javax.ws.rs.core.Response.Status.UNAUTHORIZED; +import static jakarta.ws.rs.core.Response.Status.NOT_FOUND; +import static jakarta.ws.rs.core.Response.Status.SERVICE_UNAVAILABLE; +import static jakarta.ws.rs.core.Response.Status.UNAUTHORIZED; -import javax.ws.rs.core.Response; +import jakarta.ws.rs.core.Response; import org.onap.dmaap.dbcapi.logging.BaseLoggingClass; import org.onap.dmaap.dbcapi.model.ApiError; import org.slf4j.MDC; diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/TopicResource.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/TopicResource.java index 01926b7..8724271 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/TopicResource.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/resources/TopicResource.java @@ -20,37 +20,34 @@ package org.onap.dmaap.dbcapi.resources; +import static jakarta.ws.rs.core.Response.Status.CREATED; + import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponses; - +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.GenericEntity; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import java.util.List; - -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.GenericEntity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; - import org.onap.dmaap.dbcapi.logging.BaseLoggingClass; import org.onap.dmaap.dbcapi.model.ApiError; -import org.onap.dmaap.dbcapi.model.ReplicationType; import org.onap.dmaap.dbcapi.model.FqtnType; +import org.onap.dmaap.dbcapi.model.ReplicationType; import org.onap.dmaap.dbcapi.model.Topic; import org.onap.dmaap.dbcapi.service.TopicService; import org.onap.dmaap.dbcapi.util.DmaapConfig; -import static javax.ws.rs.core.Response.Status.CREATED; - @Path("/topics") @Api( value= "topics", description = "Endpoint for retreiving MR Topics" ) @Consumes(MediaType.APPLICATION_JSON) diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/server/JettyServer.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/server/JettyServer.java index 2f2ac00..a33e8ec 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/server/JettyServer.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/server/JettyServer.java @@ -22,9 +22,9 @@ package org.onap.dmaap.dbcapi.server; -import com.google.common.collect.Sets; +import jakarta.servlet.DispatcherType; +import java.util.EnumSet; import java.util.Properties; -import javax.servlet.DispatcherType; import org.eclipse.jetty.http.HttpVersion; import org.eclipse.jetty.server.HttpConfiguration; import org.eclipse.jetty.server.HttpConnectionFactory; @@ -77,7 +77,7 @@ public class JettyServer extends BaseLoggingClass { // HTTPS Server HttpConfiguration httpsConfig = new HttpConfiguration(httpConfig); httpsConfig.addCustomizer(new SecureRequestCustomizer()); - SslContextFactory sslContextFactory = new SslContextFactory.Server(); + SslContextFactory.Server sslContextFactory = new SslContextFactory.Server(); sslContextFactory.setWantClientAuth(true); if (!certificateManager.isReady()) { serverLogger.error("CertificateManager is not ready. NOT starting https!"); @@ -112,17 +112,18 @@ public class JettyServer extends BaseLoggingClass { .addServlet(org.glassfish.jersey.servlet.ServletContainer.class, "/webapi/*"); jerseyServlet.setInitOrder(1); jerseyServlet.setInitParameter("jersey.config.server.provider.packages", "org.onap.dmaap.dbcapi.resources"); - jerseyServlet.setInitParameter("javax.ws.rs.Application", "org.onap.dmaap.dbcapi.server.ApplicationConfig"); + jerseyServlet.setInitParameter("jakarta.ws.rs.Application", "org.onap.dmaap.dbcapi.server.ApplicationConfig"); // also serve up some static pages... ServletHolder staticServlet = context.addServlet(DefaultServlet.class, "/*"); staticServlet.setInitParameter("resourceBase", "www"); staticServlet.setInitParameter("pathInfoOnly", "true"); - registerAuthFilters(context); + if (Boolean.parseBoolean(params.getProperty("enableCADI", "false"))) { + registerAuthFilters(context); + } try { - serverLogger.info("Starting jetty server"); String unitTest = params.getProperty("UnitTest", "No"); serverLogger.info("UnitTest=" + unitTest); @@ -136,14 +137,13 @@ public class JettyServer extends BaseLoggingClass { } finally { server.destroy(); } - } private void registerAuthFilters(ServletContextHandler context) { - context.addFilter("org.onap.dmaap.dbcapi.resources.AAFAuthenticationFilter", "/webapi/*", - Sets.newEnumSet(Sets.newHashSet(DispatcherType.FORWARD, DispatcherType.REQUEST), DispatcherType.class)); - context.addFilter("org.onap.dmaap.dbcapi.resources.AAFAuthorizationFilter", "/webapi/*", - Sets.newEnumSet(Sets.newHashSet(DispatcherType.FORWARD, DispatcherType.REQUEST), DispatcherType.class)); + context.addFilter("org.onap.dmaap.dbcapi.resources.AAFAuthenticationFilter", "/webapi/*", EnumSet.of( + DispatcherType.FORWARD, DispatcherType.REQUEST)); + context.addFilter("org.onap.dmaap.dbcapi.resources.AAFAuthorizationFilter", "/webapi/*", EnumSet.of( + DispatcherType.FORWARD, DispatcherType.REQUEST)); } private void setUpKeystore(SslContextFactory sslContextFactory) { diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/DR_NodeService.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/DR_NodeService.java index b29beb9..ca41803 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/DR_NodeService.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/DR_NodeService.java @@ -25,7 +25,7 @@ package org.onap.dmaap.dbcapi.service; import java.util.ArrayList; import java.util.List; import java.util.Map; -import javax.ws.rs.core.Response.Status; +import jakarta.ws.rs.core.Response.Status; import org.onap.dmaap.dbcapi.client.DrProvConnection; import org.onap.dmaap.dbcapi.database.DatabaseClass; import org.onap.dmaap.dbcapi.logging.BaseLoggingClass; diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/DR_PubService.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/DR_PubService.java index 352330a..ce70bff 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/DR_PubService.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/DR_PubService.java @@ -23,7 +23,7 @@ package org.onap.dmaap.dbcapi.service; import java.util.ArrayList; import java.util.List; import java.util.Map; -import javax.ws.rs.core.Response.Status; +import jakarta.ws.rs.core.Response.Status; import org.onap.dmaap.dbcapi.client.DrProvConnection; import org.onap.dmaap.dbcapi.database.DatabaseClass; import org.onap.dmaap.dbcapi.logging.BaseLoggingClass; diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/DR_SubService.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/DR_SubService.java index 0a583a0..054b4d4 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/DR_SubService.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/DR_SubService.java @@ -22,12 +22,10 @@ package org.onap.dmaap.dbcapi.service; +import jakarta.ws.rs.core.Response.Status; import java.util.ArrayList; import java.util.List; import java.util.Map; - -import javax.ws.rs.core.Response.Status; - import org.onap.dmaap.dbcapi.client.DrProvConnection; import org.onap.dmaap.dbcapi.database.DatabaseClass; import org.onap.dmaap.dbcapi.logging.BaseLoggingClass; diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/FeedService.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/FeedService.java index 19b0267..03a65f7 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/FeedService.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/FeedService.java @@ -26,7 +26,7 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; -import javax.ws.rs.core.Response.Status; +import jakarta.ws.rs.core.Response.Status; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/MR_ClientService.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/MR_ClientService.java index bcf5408..013457f 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/MR_ClientService.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/MR_ClientService.java @@ -22,6 +22,10 @@ package org.onap.dmaap.dbcapi.service; +import jakarta.ws.rs.core.Response.Status; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; import org.onap.dmaap.dbcapi.aaf.AafService.ServiceType; import org.onap.dmaap.dbcapi.aaf.AafServiceFactory; import org.onap.dmaap.dbcapi.client.MrProvConnection; @@ -35,11 +39,6 @@ import org.onap.dmaap.dbcapi.model.MR_Cluster; import org.onap.dmaap.dbcapi.model.Topic; import org.onap.dmaap.dbcapi.util.DmaapConfig; -import javax.ws.rs.core.Response.Status; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - public class MR_ClientService extends BaseLoggingClass { private static final String MR_CLIENT_ID = "mrClientId"; diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/MR_ClusterService.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/MR_ClusterService.java index db6389e..ca510be 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/MR_ClusterService.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/MR_ClusterService.java @@ -28,7 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; -import javax.ws.rs.core.Response.Status; +import jakarta.ws.rs.core.Response.Status; import org.onap.dmaap.dbcapi.client.MrProvConnection; import org.onap.dmaap.dbcapi.database.DatabaseClass; diff --git a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/TopicService.java b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/TopicService.java index 009b745..2e449ff 100644 --- a/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/TopicService.java +++ b/dmaap-bc/src/main/java/org/onap/dmaap/dbcapi/service/TopicService.java @@ -22,6 +22,13 @@ package org.onap.dmaap.dbcapi.service; +import jakarta.ws.rs.core.Response.Status; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; import org.onap.dmaap.dbcapi.aaf.AafService.ServiceType; import org.onap.dmaap.dbcapi.aaf.AafServiceFactory; import org.onap.dmaap.dbcapi.database.DatabaseClass; @@ -39,14 +46,6 @@ import org.onap.dmaap.dbcapi.util.DmaapConfig; import org.onap.dmaap.dbcapi.util.Fqdn; import org.onap.dmaap.dbcapi.util.Graph; -import javax.ws.rs.core.Response.Status; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; - public class TopicService extends BaseLoggingClass { |