From b71454295b279a8a35bf1b2245949ba80bc2be90 Mon Sep 17 00:00:00 2001 From: FrancescoFioraEst Date: Wed, 6 Sep 2023 09:54:17 +0100 Subject: Upgrade Java 17 in xacml-pdp Issue-ID: POLICY-4821 Change-Id: Iec12c5e3073639ccf177558143cafc66537c6985 Signed-off-by: FrancescoFioraEst --- applications/common/pom.xml | 11 ++++--- .../xacml/application/common/PolicyApiCaller.java | 4 +-- .../operationshistory/GetOperationOutcomePip.java | 3 +- .../xacml/application/common/std/StdOnapPip.java | 5 +-- .../common/src/main/resources/persistence.xml | 4 +-- .../application/common/PolicyApiCallerTest.java | 16 +++++----- .../application/common/XacmlPolicyUtilsTest.java | 4 +-- .../CountRecentOperationsPipTest.java | 8 ++--- .../GetOperationOutcomePipTest.java | 24 ++++++-------- .../common/std/StdMatchableTranslatorTest.java | 15 +++++---- .../src/test/resources/META-INF/persistence.xml | 4 +-- .../common/src/test/resources/test.properties | 8 ++--- applications/guard/pom.xml | 2 +- .../application/guard/GuardPdpApplicationTest.java | 6 ++-- .../pdp/application/guard/SonCoordinationTest.java | 5 +-- .../src/test/resources/META-INF/persistence.xml | 2 +- .../guard/src/test/resources/xacml.properties | 8 ++--- applications/match/pom.xml | 2 +- applications/monitoring/pom.xml | 3 +- applications/naming/pom.xml | 2 +- applications/native/pom.xml | 2 +- applications/optimization/pom.xml | 2 +- applications/pom.xml | 3 +- main/pom.xml | 6 ++-- .../java/org/onap/policy/pdpx/main/XacmlState.java | 37 +--------------------- .../pdpx/main/rest/XacmlPdpRestController.java | 22 ++++++------- .../pdpx/main/rest/XacmlPdpServiceFilter.java | 15 +++++---- .../pdpx/main/rest/provider/DecisionProvider.java | 10 +++--- .../rest/serialization/XacmlExceptionMapper.java | 5 +-- .../serialization/XacmlJsonExceptionMapper.java | 5 +-- .../serialization/XacmlJsonMessageBodyHandler.java | 15 +++++---- .../serialization/XacmlXmlExceptionMapper.java | 5 +-- .../serialization/XacmlXmlMessageBodyHandler.java | 15 +++++---- .../pdpx/main/startstop/XacmlPdpRestServer.java | 3 +- main/src/main/resources/META-INF/persistence.xml | 2 +- .../java/org/onap/policy/pdpx/main/CommonRest.java | 10 +++--- .../org/onap/policy/pdpx/main/XacmlStateTest.java | 23 +------------- .../main/rest/TestAbbreviateDecisionResults.java | 8 ++--- .../onap/policy/pdpx/main/rest/TestDecision.java | 10 +++--- .../pdpx/main/rest/TestXacmlPdpRestServer.java | 3 +- .../pdpx/main/rest/TestXacmlPdpServiceFilter.java | 7 ++-- .../rest/serialization/CommonSerialization.java | 3 +- .../TestXacmlJsonExceptionMapper.java | 3 +- .../serialization/TestXacmlXmlExceptionMapper.java | 3 +- main/src/test/resources/META-INF/persistence.xml | 4 +-- .../src/test/resources/apps/guard/xacml.properties | 8 ++--- packages/policy-xacmlpdp-docker/pom.xml | 4 +-- packages/policy-xacmlpdp-tarball/pom.xml | 3 +- .../main/resources/apps/guard/xacml-pg.properties | 8 ++--- .../src/main/resources/apps/guard/xacml.properties | 8 ++--- .../main/resources/mysql/bin/create-guard-table.sh | 8 ++--- .../postgres/bin/create-guard-table-pg.sh | 8 ++--- packages/pom.xml | 4 +-- pom.xml | 13 +++----- testsuites/performance/pom.xml | 3 +- testsuites/pom.xml | 3 +- testsuites/stability/pom.xml | 3 +- tutorials/pom.xml | 3 +- tutorials/tutorial-enforcement/pom.xml | 3 +- .../policy/tutorial/policyenforcement/App.java | 5 +-- tutorials/tutorial-xacml-application/pom.xml | 4 +-- version.properties | 2 +- xacml-test/pom.xml | 3 +- 63 files changed, 206 insertions(+), 244 deletions(-) diff --git a/applications/common/pom.xml b/applications/common/pom.xml index 5723deac..f2be05c2 100644 --- a/applications/common/pom.xml +++ b/applications/common/pom.xml @@ -27,7 +27,7 @@ org.onap.policy.xacml-pdp.applications applications - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT common @@ -44,12 +44,15 @@ test - javax.xml.bind - jaxb-api + jakarta.xml.bind + jakarta.xml.bind-api + 4.0.0 + provided org.glassfish.jaxb jaxb-runtime + 4.0.2 com.h2database @@ -80,7 +83,7 @@ com.att.research.xacml xacml-pdp - 3.1.0 + 4.0.0 diff --git a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCaller.java b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCaller.java index 0f0f7ea2..2ccc694a 100644 --- a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCaller.java +++ b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCaller.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2021 Nordix Foundation. + * Modifications Copyright (C) 2021,2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,8 +21,8 @@ package org.onap.policy.pdp.xacml.application.common; +import jakarta.ws.rs.core.Response; import java.net.HttpURLConnection; -import javax.ws.rs.core.Response; import org.onap.policy.common.endpoints.http.client.HttpClient; import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifier; import org.onap.policy.models.tosca.authorative.concepts.ToscaServiceTemplate; diff --git a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/operationshistory/GetOperationOutcomePip.java b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/operationshistory/GetOperationOutcomePip.java index a2440d5b..ee80641c 100644 --- a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/operationshistory/GetOperationOutcomePip.java +++ b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/operationshistory/GetOperationOutcomePip.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,9 +27,9 @@ import com.att.research.xacml.api.pip.PIPResponse; import com.att.research.xacml.std.pip.StdMutablePIPResponse; import com.att.research.xacml.std.pip.StdPIPResponse; import com.google.common.base.Strings; +import jakarta.persistence.NoResultException; import java.util.Arrays; import java.util.Collection; -import javax.persistence.NoResultException; import org.onap.policy.pdp.xacml.application.common.ToscaDictionary; import org.onap.policy.pdp.xacml.application.common.std.StdOnapPip; import org.slf4j.Logger; diff --git a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdOnapPip.java b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdOnapPip.java index d57da301..e0705f80 100644 --- a/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdOnapPip.java +++ b/applications/common/src/main/java/org/onap/policy/pdp/xacml/application/common/std/StdOnapPip.java @@ -2,6 +2,7 @@ * ============LICENSE_START======================================================= * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2020 Bell Canada. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,13 +36,13 @@ import com.att.research.xacml.std.datatypes.DataTypes; import com.att.research.xacml.std.pip.StdMutablePIPResponse; import com.att.research.xacml.std.pip.StdPIPRequest; import com.att.research.xacml.std.pip.engines.StdConfigurableEngine; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Persistence; import java.math.BigInteger; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.Properties; -import javax.persistence.EntityManager; -import javax.persistence.Persistence; import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.onap.policy.pdp.xacml.application.common.ToscaDictionary; diff --git a/applications/common/src/main/resources/persistence.xml b/applications/common/src/main/resources/persistence.xml index e256bf99..037ba7bc 100644 --- a/applications/common/src/main/resources/persistence.xml +++ b/applications/common/src/main/resources/persistence.xml @@ -26,8 +26,8 @@ org.onap.policy.guard.OperationsHistory - - + + diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCallerTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCallerTest.java index 8a856698..0231c058 100644 --- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCallerTest.java +++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/PolicyApiCallerTest.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2021 Nordix Foundation. + * Modifications Copyright (C) 2021,2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,16 +28,16 @@ import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HeaderParam; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Response; import java.io.IOException; import java.util.Properties; import java.util.UUID; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Response; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/XacmlPolicyUtilsTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/XacmlPolicyUtilsTest.java index 9ff81423..30bf232a 100644 --- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/XacmlPolicyUtilsTest.java +++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/XacmlPolicyUtilsTest.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,7 +40,6 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; import java.util.Properties; -import java.util.stream.Collectors; import oasis.names.tc.xacml._3_0.core.schema.wd_17.AnyOfType; import oasis.names.tc.xacml._3_0.core.schema.wd_17.EffectType; import oasis.names.tc.xacml._3_0.core.schema.wd_17.MatchType; @@ -113,7 +113,7 @@ public class XacmlPolicyUtilsTest { // if (!"/".equals(File.separator)) { List fileProps = properties.keySet().stream().map(Object::toString) - .filter(key -> key.endsWith(".file")).collect(Collectors.toList()); + .filter(key -> key.endsWith(".file")).toList(); for (String fileProp : fileProps) { properties.setProperty(fileProp, properties.getProperty(fileProp).replace("/", File.separator)); } diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/CountRecentOperationsPipTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/CountRecentOperationsPipTest.java index b2116f96..e564cd96 100644 --- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/CountRecentOperationsPipTest.java +++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/CountRecentOperationsPipTest.java @@ -32,6 +32,9 @@ import com.att.research.xacml.api.pip.PIPFinder; import com.att.research.xacml.api.pip.PIPRequest; import com.att.research.xacml.api.pip.PIPResponse; import com.att.research.xacml.std.pip.StdPIPResponse; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Persistence; +import jakarta.persistence.Query; import java.io.FileInputStream; import java.io.IOException; import java.sql.Date; @@ -41,9 +44,6 @@ import java.util.LinkedList; import java.util.Properties; import java.util.Queue; import java.util.UUID; -import javax.persistence.EntityManager; -import javax.persistence.Persistence; -import javax.persistence.Query; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; @@ -154,7 +154,7 @@ public class CountRecentOperationsPipTest { @Test public void testConfigure_DbException() throws Exception { - properties.put("javax.persistence.jdbc.url", "invalid"); + properties.put("jakarta.persistence.jdbc.url", "invalid"); assertThatCode(() -> pipEngine.configure("issuer", properties) ).doesNotThrowAnyException(); diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/GetOperationOutcomePipTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/GetOperationOutcomePipTest.java index 61d923c2..bd53789f 100644 --- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/GetOperationOutcomePipTest.java +++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/operationshistory/GetOperationOutcomePipTest.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +26,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import com.att.research.xacml.api.Status; @@ -33,27 +35,23 @@ import com.att.research.xacml.api.pip.PIPFinder; import com.att.research.xacml.api.pip.PIPRequest; import com.att.research.xacml.api.pip.PIPResponse; import com.att.research.xacml.std.pip.StdPIPResponse; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Persistence; import java.io.FileInputStream; import java.lang.reflect.Method; import java.time.Instant; import java.util.Date; import java.util.Properties; import java.util.UUID; -import javax.persistence.EntityManager; -import javax.persistence.Persistence; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.mockito.junit.MockitoJUnitRunner; import org.onap.policy.guard.OperationsHistory; import org.onap.policy.pdp.xacml.application.common.ToscaDictionary; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -@RunWith(MockitoJUnitRunner.class) public class GetOperationOutcomePipTest { private static final Logger LOGGER = LoggerFactory.getLogger(GetOperationOutcomePipTest.class); private static final String TEST_PROPERTIES = "src/test/resources/test.properties"; @@ -63,17 +61,13 @@ public class GetOperationOutcomePipTest { private Properties properties; private GetOperationOutcomePip pipEngine; - @Mock - private PIPRequest pipRequest; + private final PIPRequest pipRequest = mock(PIPRequest.class); - @Mock - private PIPFinder pipFinder; + private final PIPFinder pipFinder = mock(PIPFinder.class); - @Mock - private PIPResponse resp1; + private final PIPResponse resp1 = mock(PIPResponse.class); - @Mock - private Status okStatus; + private final Status okStatus = mock(Status.class); /** * Create an instance of our engine and also the persistence @@ -148,7 +142,7 @@ public class GetOperationOutcomePipTest { @Test public void testConfigure_DbException() throws Exception { - properties.put("javax.persistence.jdbc.url", "invalid"); + properties.put("jakarta.persistence.jdbc.url", "invalid"); assertThatCode(() -> pipEngine.configure("issuer", properties) ).doesNotThrowAnyException(); diff --git a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslatorTest.java b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslatorTest.java index 1d2754b8..2edaf0e5 100644 --- a/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslatorTest.java +++ b/applications/common/src/test/java/org/onap/policy/pdp/xacml/application/common/std/StdMatchableTranslatorTest.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +34,13 @@ import com.att.research.xacml.api.IdReference; import com.att.research.xacml.api.Obligation; import com.att.research.xacml.api.Request; import com.att.research.xacml.std.StdStatusCode; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HeaderParam; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.Response; import java.io.IOException; import java.text.ParseException; import java.util.ArrayList; @@ -43,13 +51,6 @@ import java.util.List; import java.util.Map; import java.util.Properties; import java.util.UUID; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.core.Response; import oasis.names.tc.xacml._3_0.core.schema.wd_17.AttributeValueType; import oasis.names.tc.xacml._3_0.core.schema.wd_17.ObligationExpressionType; import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicyType; diff --git a/applications/common/src/test/resources/META-INF/persistence.xml b/applications/common/src/test/resources/META-INF/persistence.xml index ebddf87b..87896a60 100644 --- a/applications/common/src/test/resources/META-INF/persistence.xml +++ b/applications/common/src/test/resources/META-INF/persistence.xml @@ -26,8 +26,8 @@ org.onap.policy.guard.OperationsHistory - - + + diff --git a/applications/common/src/test/resources/test.properties b/applications/common/src/test/resources/test.properties index f4a0bf8e..77939c35 100644 --- a/applications/common/src/test/resources/test.properties +++ b/applications/common/src/test/resources/test.properties @@ -41,7 +41,7 @@ get-operation-outcome.persistenceunit=PipEngineTest # JPA Properties # eclipselink.target-database=Auto -javax.persistence.jdbc.driver=org.h2.Driver -javax.persistence.jdbc.url=jdbc:h2:mem:testdb;DATABASE_TO_UPPER=FALSE -javax.persistence.jdbc.user=policy -javax.persistence.jdbc.password=P01icY +jakarta.persistence.jdbc.driver=org.h2.Driver +jakarta.persistence.jdbc.url=jdbc:h2:mem:testdb;DATABASE_TO_UPPER=FALSE +jakarta.persistence.jdbc.user=policy +jakarta.persistence.jdbc.password=P01icY diff --git a/applications/guard/pom.xml b/applications/guard/pom.xml index bd6dcbe3..d9a1463b 100644 --- a/applications/guard/pom.xml +++ b/applications/guard/pom.xml @@ -25,7 +25,7 @@ org.onap.policy.xacml-pdp.applications applications - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT xacml-guard diff --git a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java index 5cdb6abf..31e576ff 100644 --- a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java +++ b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/GuardPdpApplicationTest.java @@ -3,7 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2019-2022 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2021 Nordix Foundation. + * Modifications Copyright (C) 2021,2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,8 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatCode; import com.att.research.xacml.api.Response; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Persistence; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; @@ -39,8 +41,6 @@ import java.util.Map; import java.util.Properties; import java.util.ServiceLoader; import java.util.UUID; -import javax.persistence.EntityManager; -import javax.persistence.Persistence; import org.apache.commons.lang3.tuple.Pair; import org.junit.AfterClass; import org.junit.Before; diff --git a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/SonCoordinationTest.java b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/SonCoordinationTest.java index 873df756..4e7bb12f 100644 --- a/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/SonCoordinationTest.java +++ b/applications/guard/src/test/java/org/onap/policy/xacml/pdp/application/guard/SonCoordinationTest.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +26,8 @@ package org.onap.policy.xacml.pdp.application.guard; import static org.assertj.core.api.Assertions.assertThat; import com.att.research.xacml.api.Response; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Persistence; import java.io.File; import java.io.IOException; import java.time.Instant; @@ -34,8 +37,6 @@ import java.util.Map; import java.util.Properties; import java.util.ServiceLoader; import java.util.UUID; -import javax.persistence.EntityManager; -import javax.persistence.Persistence; import org.apache.commons.lang3.tuple.Pair; import org.junit.AfterClass; import org.junit.Before; diff --git a/applications/guard/src/test/resources/META-INF/persistence.xml b/applications/guard/src/test/resources/META-INF/persistence.xml index 0df6aeb3..2b560062 100644 --- a/applications/guard/src/test/resources/META-INF/persistence.xml +++ b/applications/guard/src/test/resources/META-INF/persistence.xml @@ -25,7 +25,7 @@ org.onap.policy.guard.OperationsHistory - + diff --git a/applications/guard/src/test/resources/xacml.properties b/applications/guard/src/test/resources/xacml.properties index 11a51651..7287f3a3 100644 --- a/applications/guard/src/test/resources/xacml.properties +++ b/applications/guard/src/test/resources/xacml.properties @@ -48,7 +48,7 @@ xacml.pip.engines=count-recent-operations,get-operation-outcome # JPA Properties # eclipselink.target-database=Auto -javax.persistence.jdbc.driver=org.h2.Driver -javax.persistence.jdbc.url=jdbc:h2:mem:testdb;DATABASE_TO_UPPER=FALSE -javax.persistence.jdbc.user=policy -javax.persistence.jdbc.password=UDAxaWNZ +jakarta.persistence.jdbc.driver=org.h2.Driver +jakarta.persistence.jdbc.url=jdbc:h2:mem:testdb;DATABASE_TO_UPPER=FALSE +jakarta.persistence.jdbc.user=policy +jakarta.persistence.jdbc.password=UDAxaWNZ diff --git a/applications/match/pom.xml b/applications/match/pom.xml index be9c59cb..eb965df0 100644 --- a/applications/match/pom.xml +++ b/applications/match/pom.xml @@ -25,7 +25,7 @@ org.onap.policy.xacml-pdp.applications applications - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT xacml-match diff --git a/applications/monitoring/pom.xml b/applications/monitoring/pom.xml index e8925700..279272a0 100644 --- a/applications/monitoring/pom.xml +++ b/applications/monitoring/pom.xml @@ -3,6 +3,7 @@ ONAP Policy Engine - XACML PDP ================================================================================ Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. + Modifications Copyright (C) 2023 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -24,7 +25,7 @@ org.onap.policy.xacml-pdp.applications applications - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT xacml-monitoring diff --git a/applications/naming/pom.xml b/applications/naming/pom.xml index 7c9c5db8..c96de55a 100644 --- a/applications/naming/pom.xml +++ b/applications/naming/pom.xml @@ -25,7 +25,7 @@ org.onap.policy.xacml-pdp.applications applications - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT xacml-naming diff --git a/applications/native/pom.xml b/applications/native/pom.xml index e1b49315..c128cd11 100644 --- a/applications/native/pom.xml +++ b/applications/native/pom.xml @@ -3,7 +3,7 @@ org.onap.policy.xacml-pdp.applications applications - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT xacml-native diff --git a/applications/optimization/pom.xml b/applications/optimization/pom.xml index 45d4eb27..6bb593f1 100644 --- a/applications/optimization/pom.xml +++ b/applications/optimization/pom.xml @@ -25,7 +25,7 @@ org.onap.policy.xacml-pdp.applications applications - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT xacml-optimization diff --git a/applications/pom.xml b/applications/pom.xml index e3feaa45..afeae740 100644 --- a/applications/pom.xml +++ b/applications/pom.xml @@ -3,6 +3,7 @@ ONAP ================================================================================ Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. + Modifications Copyright (C) 2023 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,7 +26,7 @@ org.onap.policy.xacml-pdp policy-xacml-pdp - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT org.onap.policy.xacml-pdp.applications diff --git a/main/pom.xml b/main/pom.xml index e86c4a9f..133f728b 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -26,7 +26,7 @@ org.onap.policy.xacml-pdp policy-xacml-pdp - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT xacml-main @@ -164,6 +164,7 @@ io.swagger.codegen.v3 swagger-codegen-maven-plugin + 3.0.46 code-gen @@ -190,13 +191,14 @@ HealthCheckProvider=org.onap.policy.pdpx.main.rest.provider.HealthCheckProvider, StatisticsProvider=org.onap.policy.pdpx.main.rest.provider.StatisticsProvider, Request=com.att.research.xacml.api.Request, - Response=javax.ws.rs.core.Response + Response=jakarta.ws.rs.core.Response src/gen/java java11 true true + true diff --git a/main/src/main/java/org/onap/policy/pdpx/main/XacmlState.java b/main/src/main/java/org/onap/policy/pdpx/main/XacmlState.java index 3635a21a..d67a1fad 100644 --- a/main/src/main/java/org/onap/policy/pdpx/main/XacmlState.java +++ b/main/src/main/java/org/onap/policy/pdpx/main/XacmlState.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019, 2021-2022 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,21 +21,18 @@ package org.onap.policy.pdpx.main; -import java.time.Instant; import java.util.Collections; import org.apache.commons.lang3.StringUtils; import org.onap.policy.common.utils.network.NetworkUtil; import org.onap.policy.models.pdp.concepts.PdpMessage; import org.onap.policy.models.pdp.concepts.PdpResponseDetails; import org.onap.policy.models.pdp.concepts.PdpStateChange; -import org.onap.policy.models.pdp.concepts.PdpStatistics; import org.onap.policy.models.pdp.concepts.PdpStatus; import org.onap.policy.models.pdp.concepts.PdpUpdate; import org.onap.policy.models.pdp.enums.PdpHealthStatus; import org.onap.policy.models.pdp.enums.PdpResponseStatus; import org.onap.policy.models.pdp.enums.PdpState; import org.onap.policy.pdpx.main.rest.XacmlPdpApplicationManager; -import org.onap.policy.pdpx.main.rest.XacmlPdpStatisticsManager; import org.onap.policy.pdpx.main.startstop.XacmlPdpActivator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -96,42 +94,9 @@ public class XacmlState { : PdpHealthStatus.NOT_HEALTHY); PdpStatus heartbeat = new PdpStatus(status); - heartbeat.setStatistics(getStatistics()); return heartbeat; } - /** - * Generates statistics to be used in a heart beat message. - * - * @return statistics for heart beat message - */ - protected PdpStatistics getStatistics() { - XacmlPdpStatisticsManager stats = XacmlPdpStatisticsManager.getCurrent(); - if (stats == null) { - LOGGER.warn("XacmlPdpStatisticsManager is null"); - return null; - } - stats.setTotalPolicyCount(appManager.getPolicyCount()); - - PdpStatistics pdpStats = new PdpStatistics(); - pdpStats.setPdpGroupName(this.status.getPdpGroup()); - pdpStats.setPdpSubGroupName(this.status.getPdpSubgroup()); - pdpStats.setTimeStamp(Instant.ofEpochSecond(this.status.getTimestampMs())); - - pdpStats.setPolicyExecutedCount(stats.getPermitDecisionsCount() + stats.getDenyDecisionsCount()); - pdpStats.setPolicyExecutedSuccessCount(stats.getPermitDecisionsCount()); - pdpStats.setPolicyExecutedFailCount(stats.getDenyDecisionsCount()); - - pdpStats.setPolicyDeployCount(stats.getDeploySuccessCount() + stats.getDeployFailureCount()); - pdpStats.setPolicyDeploySuccessCount(stats.getDeploySuccessCount()); - pdpStats.setPolicyDeployFailCount(stats.getDeployFailureCount()); - - pdpStats.setPolicyUndeployCount(stats.getUndeploySuccessCount() + stats.getUndeployFailureCount()); - pdpStats.setPolicyUndeploySuccessCount(stats.getUndeploySuccessCount()); - pdpStats.setPolicyUndeployFailCount(stats.getUndeployFailureCount()); - return pdpStats; - } - /** * Updates the internal state based on the given message. * diff --git a/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java b/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java index 05f40cc5..3adf0b1f 100644 --- a/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java +++ b/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpRestController.java @@ -22,18 +22,18 @@ package org.onap.policy.pdpx.main.rest; import com.att.research.xacml.api.Request; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.HeaderParam; +import jakarta.ws.rs.POST; +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.Response.ResponseBuilder; import java.util.UUID; -import javax.servlet.http.HttpServletRequest; -import javax.ws.rs.Consumes; -import javax.ws.rs.GET; -import javax.ws.rs.HeaderParam; -import javax.ws.rs.POST; -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.Response.ResponseBuilder; import org.onap.policy.models.decisions.concepts.DecisionException; import org.onap.policy.models.decisions.concepts.DecisionRequest; import org.onap.policy.pdpx.main.rest.provider.DecisionProvider; diff --git a/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpServiceFilter.java b/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpServiceFilter.java index 8e34414d..3a16d54d 100644 --- a/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpServiceFilter.java +++ b/main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpServiceFilter.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,16 +21,16 @@ package org.onap.policy.pdpx.main.rest; +import jakarta.servlet.Filter; +import jakarta.servlet.FilterChain; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; /** * Filter that verifies that the API services (i.e., decision services) are enabled diff --git a/main/src/main/java/org/onap/policy/pdpx/main/rest/provider/DecisionProvider.java b/main/src/main/java/org/onap/policy/pdpx/main/rest/provider/DecisionProvider.java index 98340b2d..7bc23b15 100644 --- a/main/src/main/java/org/onap/policy/pdpx/main/rest/provider/DecisionProvider.java +++ b/main/src/main/java/org/onap/policy/pdpx/main/rest/provider/DecisionProvider.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019-2020, 2022 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -98,7 +99,7 @@ public class DecisionProvider { if (application != null) { return application; } - throw new DecisionException(javax.ws.rs.core.Response.Status.BAD_REQUEST, + throw new DecisionException(jakarta.ws.rs.core.Response.Status.BAD_REQUEST, "No application for action " + request.getAction()); } @@ -107,7 +108,7 @@ public class DecisionProvider { if (application instanceof NativePdpApplication) { return application; } - throw new DecisionException(javax.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR, + throw new DecisionException(jakarta.ws.rs.core.Response.Status.INTERNAL_SERVER_ERROR, "Native PDP application cannot be found"); } @@ -126,10 +127,7 @@ public class DecisionProvider { XacmlPdpStatisticsManager.getCurrent().updateDenyDecisionsCount(appName); break; - case INDETERMINATE: - case INDETERMINATE_DENY: - case INDETERMINATE_DENYPERMIT: - case INDETERMINATE_PERMIT: + case INDETERMINATE, INDETERMINATE_DENY, INDETERMINATE_DENYPERMIT, INDETERMINATE_PERMIT: XacmlPdpStatisticsManager.getCurrent().updateIndeterminantDecisionsCount(appName); break; diff --git a/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlExceptionMapper.java b/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlExceptionMapper.java index a2a78a89..91a63922 100644 --- a/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlExceptionMapper.java +++ b/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlExceptionMapper.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,9 +21,9 @@ package org.onap.policy.pdpx.main.rest.serialization; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.ext.ExceptionMapper; import java.io.IOException; -import javax.ws.rs.core.Response; -import javax.ws.rs.ext.ExceptionMapper; import lombok.Getter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlJsonExceptionMapper.java b/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlJsonExceptionMapper.java index 03f3ddce..431169b8 100644 --- a/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlJsonExceptionMapper.java +++ b/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlJsonExceptionMapper.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +21,8 @@ package org.onap.policy.pdpx.main.rest.serialization; -import javax.ws.rs.Produces; -import javax.ws.rs.ext.Provider; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.ext.Provider; /** * Catches IOException when decoding/encoding a REST xacml request/response and converts them from an HTTP 500 diff --git a/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlJsonMessageBodyHandler.java b/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlJsonMessageBodyHandler.java index 58ed5f76..3ebe89d1 100644 --- a/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlJsonMessageBodyHandler.java +++ b/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlJsonMessageBodyHandler.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2020-2022 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +25,13 @@ import com.att.research.xacml.api.Request; import com.att.research.xacml.api.Response; import com.att.research.xacml.std.json.JsonRequestTranslator; import com.att.research.xacml.std.json.JsonResponseTranslator; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.MessageBodyReader; +import jakarta.ws.rs.ext.MessageBodyWriter; +import jakarta.ws.rs.ext.Provider; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -31,13 +39,6 @@ import java.io.OutputStreamWriter; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.nio.charset.StandardCharsets; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyReader; -import javax.ws.rs.ext.MessageBodyWriter; -import javax.ws.rs.ext.Provider; /** * Provider that serializes and de-serializes xacml request/response json. diff --git a/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlXmlExceptionMapper.java b/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlXmlExceptionMapper.java index 562c0e91..aaedc912 100644 --- a/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlXmlExceptionMapper.java +++ b/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlXmlExceptionMapper.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +21,8 @@ package org.onap.policy.pdpx.main.rest.serialization; -import javax.ws.rs.Produces; -import javax.ws.rs.ext.Provider; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.ext.Provider; /** * Catches IOException when decoding/encoding a REST xacml request/response and converts them from an HTTP 500 diff --git a/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlXmlMessageBodyHandler.java b/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlXmlMessageBodyHandler.java index 5ec17634..61160faa 100644 --- a/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlXmlMessageBodyHandler.java +++ b/main/src/main/java/org/onap/policy/pdpx/main/rest/serialization/XacmlXmlMessageBodyHandler.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2020-2022 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,6 +26,13 @@ import com.att.research.xacml.api.Response; import com.att.research.xacml.std.dom.DOMRequest; import com.att.research.xacml.std.dom.DOMResponse; import com.att.research.xacml.std.dom.DOMStructureException; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.MessageBodyReader; +import jakarta.ws.rs.ext.MessageBodyWriter; +import jakarta.ws.rs.ext.Provider; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -32,13 +40,6 @@ import java.io.OutputStreamWriter; import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.nio.charset.StandardCharsets; -import javax.ws.rs.Consumes; -import javax.ws.rs.Produces; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.MessageBodyReader; -import javax.ws.rs.ext.MessageBodyWriter; -import javax.ws.rs.ext.Provider; /** * Provider that serializes and de-serializes xacml request/response xml. diff --git a/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpRestServer.java b/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpRestServer.java index 683d013e..33cf8934 100644 --- a/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpRestServer.java +++ b/main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpRestServer.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,9 +21,9 @@ package org.onap.policy.pdpx.main.startstop; +import jakarta.servlet.Filter; import java.util.List; import java.util.Properties; -import javax.servlet.Filter; import org.onap.policy.common.endpoints.http.server.JsonExceptionMapper; import org.onap.policy.common.endpoints.http.server.RestServer; import org.onap.policy.common.endpoints.http.server.YamlExceptionMapper; diff --git a/main/src/main/resources/META-INF/persistence.xml b/main/src/main/resources/META-INF/persistence.xml index 5e589d69..c2d7d078 100644 --- a/main/src/main/resources/META-INF/persistence.xml +++ b/main/src/main/resources/META-INF/persistence.xml @@ -28,7 +28,7 @@ org.onap.policy.guard.OperationsHistory - + diff --git a/main/src/test/java/org/onap/policy/pdpx/main/CommonRest.java b/main/src/test/java/org/onap/policy/pdpx/main/CommonRest.java index 7bdd4c47..89312cf5 100644 --- a/main/src/test/java/org/onap/policy/pdpx/main/CommonRest.java +++ b/main/src/test/java/org/onap/policy/pdpx/main/CommonRest.java @@ -23,6 +23,11 @@ package org.onap.policy.pdpx.main; +import jakarta.ws.rs.client.Client; +import jakarta.ws.rs.client.ClientBuilder; +import jakarta.ws.rs.client.Invocation; +import jakarta.ws.rs.client.WebTarget; +import jakarta.ws.rs.core.MediaType; import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -31,11 +36,6 @@ import java.nio.file.Path; import java.security.SecureRandom; import java.util.concurrent.atomic.AtomicBoolean; import javax.net.ssl.SSLContext; -import javax.ws.rs.client.Client; -import javax.ws.rs.client.ClientBuilder; -import javax.ws.rs.client.Invocation; -import javax.ws.rs.client.WebTarget; -import javax.ws.rs.core.MediaType; import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature; import org.junit.After; import org.junit.AfterClass; diff --git a/main/src/test/java/org/onap/policy/pdpx/main/XacmlStateTest.java b/main/src/test/java/org/onap/policy/pdpx/main/XacmlStateTest.java index a1f1b8a7..8c412386 100644 --- a/main/src/test/java/org/onap/policy/pdpx/main/XacmlStateTest.java +++ b/main/src/test/java/org/onap/policy/pdpx/main/XacmlStateTest.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019, 2021-2022 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2021 Nordix Foundation. + * Modifications Copyright (C) 2021,2023 Nordix Foundation. * Modifications Copyright (C) 2023 Bell Canada. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -42,7 +42,6 @@ import org.mockito.junit.MockitoJUnitRunner; import org.onap.policy.common.endpoints.event.comm.client.TopicSinkClient; import org.onap.policy.models.pdp.concepts.PdpResponseDetails; import org.onap.policy.models.pdp.concepts.PdpStateChange; -import org.onap.policy.models.pdp.concepts.PdpStatistics; import org.onap.policy.models.pdp.concepts.PdpStatus; import org.onap.policy.models.pdp.concepts.PdpUpdate; import org.onap.policy.models.pdp.enums.PdpHealthStatus; @@ -132,26 +131,6 @@ public class XacmlStateTest { TopicSinkClient client = Mockito.mock(TopicSinkClient.class); XacmlPdpUpdatePublisher publisher = new XacmlPdpUpdatePublisher(client, state, appmgr); publisher.handlePdpUpdate(message); - - PdpStatistics stats = state.getStatistics(); - assertNotNull(stats); - assertEquals(GROUP, stats.getPdpGroupName()); - assertEquals(1, stats.getPolicyDeployCount()); - assertEquals(1, stats.getPolicyDeploySuccessCount()); - assertEquals(0, stats.getPolicyDeployFailCount()); - assertEquals(1, stats.getPolicyUndeployCount()); - assertEquals(1, stats.getPolicyUndeployFailCount()); - assertEquals(0, stats.getPolicyUndeploySuccessCount()); - - PdpStatistics test = new PdpStatistics(); - test.setTimeStamp(stats.getTimeStamp()); - test.setPdpGroupName(GROUP); - test.setPolicyDeployCount(1); - test.setPolicyDeploySuccessCount(1); - test.setPolicyUndeployCount(1); - test.setPolicyUndeployFailCount(1); - - assertEquals(stats.toString(), test.toString()); } @Test diff --git a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestAbbreviateDecisionResults.java b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestAbbreviateDecisionResults.java index 3e525e91..5dddec30 100644 --- a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestAbbreviateDecisionResults.java +++ b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestAbbreviateDecisionResults.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2020 Nordix Foundation + * Modifications Copyright (C) 2020,2023 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; import java.io.File; import java.io.IOException; import java.nio.file.Files; @@ -39,9 +42,6 @@ import java.util.HashMap; import java.util.Map; import java.util.Properties; import java.util.ServiceLoader; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.ClassRule; diff --git a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java index b369ad31..93d04ce0 100644 --- a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java +++ b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019-2022 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019,2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,6 +26,10 @@ import static org.junit.Assert.assertEquals; import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; import java.io.File; import java.io.IOException; import java.nio.file.Files; @@ -37,10 +41,6 @@ import java.security.NoSuchAlgorithmException; import java.util.Collections; import java.util.HashMap; import java.util.Map; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.ClassRule; diff --git a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpRestServer.java b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpRestServer.java index b626142a..2cac6dcc 100644 --- a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpRestServer.java +++ b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpRestServer.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019, 2021-2022 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,9 +23,9 @@ package org.onap.policy.pdpx.main.rest; import static org.junit.Assert.assertEquals; +import jakarta.ws.rs.client.Invocation; import java.util.HashMap; import java.util.Map; -import javax.ws.rs.client.Invocation; import org.junit.Test; import org.onap.policy.common.endpoints.report.HealthCheckReport; import org.onap.policy.pdpx.main.CommonRest; diff --git a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpServiceFilter.java b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpServiceFilter.java index 9f098f78..f72ae4f4 100644 --- a/main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpServiceFilter.java +++ b/main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpServiceFilter.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,9 +26,9 @@ import static org.mockito.Mockito.lenient; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; -import javax.servlet.FilterChain; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; +import jakarta.servlet.FilterChain; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; diff --git a/main/src/test/java/org/onap/policy/pdpx/main/rest/serialization/CommonSerialization.java b/main/src/test/java/org/onap/policy/pdpx/main/rest/serialization/CommonSerialization.java index 2b4a4fd0..2a0a5524 100644 --- a/main/src/test/java/org/onap/policy/pdpx/main/rest/serialization/CommonSerialization.java +++ b/main/src/test/java/org/onap/policy/pdpx/main/rest/serialization/CommonSerialization.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,9 +26,9 @@ import static org.junit.Assert.assertTrue; import com.att.research.xacml.api.Request; import com.att.research.xacml.api.Response; +import jakarta.ws.rs.core.MediaType; import java.lang.annotation.Annotation; import java.lang.reflect.Type; -import javax.ws.rs.core.MediaType; public class CommonSerialization { diff --git a/main/src/test/java/org/onap/policy/pdpx/main/rest/serialization/TestXacmlJsonExceptionMapper.java b/main/src/test/java/org/onap/policy/pdpx/main/rest/serialization/TestXacmlJsonExceptionMapper.java index 1b3cc209..31d6c60f 100644 --- a/main/src/test/java/org/onap/policy/pdpx/main/rest/serialization/TestXacmlJsonExceptionMapper.java +++ b/main/src/test/java/org/onap/policy/pdpx/main/rest/serialization/TestXacmlJsonExceptionMapper.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,8 +23,8 @@ package org.onap.policy.pdpx.main.rest.serialization; import static org.junit.Assert.assertEquals; +import jakarta.ws.rs.core.Response; import java.io.IOException; -import javax.ws.rs.core.Response; import org.junit.Before; import org.junit.Test; import org.onap.policy.common.utils.coder.CoderException; diff --git a/main/src/test/java/org/onap/policy/pdpx/main/rest/serialization/TestXacmlXmlExceptionMapper.java b/main/src/test/java/org/onap/policy/pdpx/main/rest/serialization/TestXacmlXmlExceptionMapper.java index c9b7bac5..3fd76c3b 100644 --- a/main/src/test/java/org/onap/policy/pdpx/main/rest/serialization/TestXacmlXmlExceptionMapper.java +++ b/main/src/test/java/org/onap/policy/pdpx/main/rest/serialization/TestXacmlXmlExceptionMapper.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,8 +23,8 @@ package org.onap.policy.pdpx.main.rest.serialization; import static org.junit.Assert.assertEquals; +import jakarta.ws.rs.core.Response; import java.io.IOException; -import javax.ws.rs.core.Response; import org.junit.Before; import org.junit.Test; import org.onap.policy.common.utils.coder.CoderException; diff --git a/main/src/test/resources/META-INF/persistence.xml b/main/src/test/resources/META-INF/persistence.xml index f97945c2..d7f9d921 100644 --- a/main/src/test/resources/META-INF/persistence.xml +++ b/main/src/test/resources/META-INF/persistence.xml @@ -28,8 +28,8 @@ org.onap.policy.guard.OperationsHistory - - + + diff --git a/main/src/test/resources/apps/guard/xacml.properties b/main/src/test/resources/apps/guard/xacml.properties index 0f450fef..baed91ae 100644 --- a/main/src/test/resources/apps/guard/xacml.properties +++ b/main/src/test/resources/apps/guard/xacml.properties @@ -48,7 +48,7 @@ xacml.pip.engines=count-recent-operations,get-operation-outcome # JPA Properties # eclipselink.target-database=Auto -javax.persistence.jdbc.driver=org.h2.Driver -javax.persistence.jdbc.url=jdbc:h2:mem:testdb;DATABASE_TO_UPPER=FALSE -javax.persistence.jdbc.user=policy -javax.persistence.jdbc.password=P01icY +jakarta.persistence.jdbc.driver=org.h2.Driver +jakarta.persistence.jdbc.url=jdbc:h2:mem:testdb;DATABASE_TO_UPPER=FALSE +jakarta.persistence.jdbc.user=policy +jakarta.persistence.jdbc.password=P01icY diff --git a/packages/policy-xacmlpdp-docker/pom.xml b/packages/policy-xacmlpdp-docker/pom.xml index 6a499ab6..e8922590 100644 --- a/packages/policy-xacmlpdp-docker/pom.xml +++ b/packages/policy-xacmlpdp-docker/pom.xml @@ -2,7 +2,7 @@ ============LICENSE_START======================================================= Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2020 Bell Canada. - Modifications Copyright (C) 2022 Nordix Foundation. + Modifications Copyright (C) 2022-2023 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -27,7 +27,7 @@ org.onap.policy.xacml-pdp xacml-packages - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT pom diff --git a/packages/policy-xacmlpdp-tarball/pom.xml b/packages/policy-xacmlpdp-tarball/pom.xml index 7c42fca6..0b65f8f5 100644 --- a/packages/policy-xacmlpdp-tarball/pom.xml +++ b/packages/policy-xacmlpdp-tarball/pom.xml @@ -2,6 +2,7 @@ ============LICENSE_START======================================================= Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2020 Bell Canada. + Modifications Copyright (C) 2023 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,7 +26,7 @@ org.onap.policy.xacml-pdp xacml-packages - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT policy-xacmlpdp-tarball diff --git a/packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml-pg.properties b/packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml-pg.properties index ac6c308f..af9f81f5 100644 --- a/packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml-pg.properties +++ b/packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml-pg.properties @@ -48,7 +48,7 @@ xacml.pip.engines=count-recent-operations,get-operation-outcome # JPA Properties # eclipselink.target-database=PostgreSQL -javax.persistence.jdbc.driver=org.postgresql.Driver -javax.persistence.jdbc.url=jdbc:postgresql://policy-pg-primary:5432/operationshistory -javax.persistence.jdbc.user=policy_user -javax.persistence.jdbc.password=policy_user +jakarta.persistence.jdbc.driver=org.postgresql.Driver +jakarta.persistence.jdbc.url=jdbc:postgresql://policy-pg-primary:5432/operationshistory +jakarta.persistence.jdbc.user=policy_user +jakarta.persistence.jdbc.password=policy_user diff --git a/packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml.properties b/packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml.properties index e0ac746c..ede93c70 100644 --- a/packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml.properties +++ b/packages/policy-xacmlpdp-tarball/src/main/resources/apps/guard/xacml.properties @@ -48,7 +48,7 @@ xacml.pip.engines=count-recent-operations,get-operation-outcome # JPA Properties # eclipselink.target-database=MySQL -javax.persistence.jdbc.driver=org.mariadb.jdbc.Driver -javax.persistence.jdbc.url=jdbc:mariadb://mariadb:3306/operationshistory -javax.persistence.jdbc.user=policy_user -javax.persistence.jdbc.password=policy_user +jakarta.persistence.jdbc.driver=org.mariadb.jdbc.Driver +jakarta.persistence.jdbc.url=jdbc:mariadb://mariadb:3306/operationshistory +jakarta.persistence.jdbc.user=policy_user +jakarta.persistence.jdbc.password=policy_user diff --git a/packages/policy-xacmlpdp-tarball/src/main/resources/mysql/bin/create-guard-table.sh b/packages/policy-xacmlpdp-tarball/src/main/resources/mysql/bin/create-guard-table.sh index 33e67977..f9787d8b 100644 --- a/packages/policy-xacmlpdp-tarball/src/main/resources/mysql/bin/create-guard-table.sh +++ b/packages/policy-xacmlpdp-tarball/src/main/resources/mysql/bin/create-guard-table.sh @@ -3,7 +3,7 @@ # ============LICENSE_START======================================================= # Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved. # Modifications Copyright (C) 2020 Bell Canada. All rights reserved. -# Modifications Copyright (C) 2022 Nordix Foundation. All rights reserved. +# Modifications Copyright (C) 2022-2023 Nordix Foundation. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -36,9 +36,9 @@ if [ ! -f /tmp/temp.xacml.properties ]; then fi # Extract Maria DB Credential properties from xacml.properties file -DB_HOSTNAME=$(awk -F[/:] '$1 == "javax.persistence.jdbc.url=jdbc" { print $3 $5 }' /tmp/temp.xacml.properties) -DB_USERNAME=$(awk -F= '$1 == "javax.persistence.jdbc.user" { print $2 }' /tmp/temp.xacml.properties) -DB_PASSWORD=$(awk -F= '$1 == "javax.persistence.jdbc.password" { st = index($0,"="); print substr($0,st+1) }' /tmp/temp.properties) +DB_HOSTNAME=$(awk -F[/:] '$1 == "jakarta.persistence.jdbc.url=jdbc" { print $3 $5 }' /tmp/temp.xacml.properties) +DB_USERNAME=$(awk -F= '$1 == "jakarta.persistence.jdbc.user" { print $2 }' /tmp/temp.xacml.properties) +DB_PASSWORD=$(awk -F= '$1 == "jakarta.persistence.jdbc.password" { st = index($0,"="); print substr($0,st+1) }' /tmp/temp.properties) # Remove temp file rm /tmp/temp.xacml.properties diff --git a/packages/policy-xacmlpdp-tarball/src/main/resources/postgres/bin/create-guard-table-pg.sh b/packages/policy-xacmlpdp-tarball/src/main/resources/postgres/bin/create-guard-table-pg.sh index b8fba4ed..b5067c5b 100644 --- a/packages/policy-xacmlpdp-tarball/src/main/resources/postgres/bin/create-guard-table-pg.sh +++ b/packages/policy-xacmlpdp-tarball/src/main/resources/postgres/bin/create-guard-table-pg.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh # # ============LICENSE_START======================================================= -# Copyright (C) 2022 Nordix Foundation. All rights reserved. +# Copyright (C) 2022-2023 Nordix Foundation. All rights reserved. # Modifications Copyright (C) 2022 AT&T Intellectual Property. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -35,9 +35,9 @@ if [ ! -f /tmp/temp.xacml-pg.properties ]; then fi # Extract Maria DB Credential properties from xacml.properties file -DB_HOSTNAME=$(awk -F[/:] '$1 == "javax.persistence.jdbc.url=jdbc" { print $3 $5 }' /tmp/temp.xacml-pg.properties) -DB_USERNAME=$(awk -F= '$1 == "javax.persistence.jdbc.user" { print $2 }' /tmp/temp.xacml-pg.properties) -DB_PASSWORD=$(awk -F= '$1 == "javax.persistence.jdbc.password" { st = index($0,"="); print substr($0,st+1) }' /tmp/temp.properties) +DB_HOSTNAME=$(awk -F[/:] '$1 == "jakarta.persistence.jdbc.url=jdbc" { print $3 $5 }' /tmp/temp.xacml-pg.properties) +DB_USERNAME=$(awk -F= '$1 == "jakarta.persistence.jdbc.user" { print $2 }' /tmp/temp.xacml-pg.properties) +DB_PASSWORD=$(awk -F= '$1 == "jakarta.persistence.jdbc.password" { st = index($0,"="); print substr($0,st+1) }' /tmp/temp.properties) # Remove temp file rm /tmp/temp.xacml-pg.properties diff --git a/packages/pom.xml b/packages/pom.xml index d050f148..281ab813 100644 --- a/packages/pom.xml +++ b/packages/pom.xml @@ -4,7 +4,7 @@ ================================================================================ Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2020 Bell Canada. - Modifications Copyright (C) 2022 Nordix Foundation. + Modifications Copyright (C) 2022-2023 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +26,7 @@ org.onap.policy.xacml-pdp policy-xacml-pdp - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT xacml-packages diff --git a/pom.xml b/pom.xml index bc0358e2..9dd61990 100644 --- a/pom.xml +++ b/pom.xml @@ -27,13 +27,13 @@ org.onap.policy.parent integration - 4.0.0-SNAPSHOT + 4.0.1-SNAPSHOT org.onap.policy.xacml-pdp policy-xacml-pdp - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT pom @@ -41,8 +41,8 @@ This code implements the XACML PDP engine - 2.0.0-SNAPSHOT - 3.0.0-SNAPSHOT + 2.0.1-SNAPSHOT + 3.0.1-SNAPSHOT ${project.basedir}/target/code-coverage/jacoco-ut.exec @@ -113,11 +113,6 @@ org.onap.policy.models policy-models-tosca ${policy.models.version} - - - org.hibernate - hibernate-entitymanager - test diff --git a/testsuites/performance/pom.xml b/testsuites/performance/pom.xml index 9c3f5fde..637c23c6 100644 --- a/testsuites/performance/pom.xml +++ b/testsuites/performance/pom.xml @@ -4,6 +4,7 @@ ================================================================================ Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2020 Bell Canada. + Modifications Copyright (C) 2023 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -23,7 +24,7 @@ org.onap.policy.xacml-pdp xacml-testsuites - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT xacml-performance diff --git a/testsuites/pom.xml b/testsuites/pom.xml index 97f4b248..b2a0a329 100644 --- a/testsuites/pom.xml +++ b/testsuites/pom.xml @@ -4,6 +4,7 @@ ================================================================================ Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2020 Bell Canada. + Modifications Copyright (C) 2023 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -23,7 +24,7 @@ org.onap.policy.xacml-pdp policy-xacml-pdp - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT xacml-testsuites diff --git a/testsuites/stability/pom.xml b/testsuites/stability/pom.xml index 00a08710..05d092f7 100644 --- a/testsuites/stability/pom.xml +++ b/testsuites/stability/pom.xml @@ -4,6 +4,7 @@ ================================================================================ Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2020 Bell Canada. + Modifications Copyright (C) 2023 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -23,7 +24,7 @@ org.onap.policy.xacml-pdp xacml-testsuites - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT xacml-stability diff --git a/tutorials/pom.xml b/tutorials/pom.xml index 391e9c83..95b38dd6 100644 --- a/tutorials/pom.xml +++ b/tutorials/pom.xml @@ -4,6 +4,7 @@ ================================================================================ Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2020 Bell Canada. + Modifications Copyright (C) 2023 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,7 +26,7 @@ org.onap.policy.xacml-pdp policy-xacml-pdp - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT xacml-tutorials diff --git a/tutorials/tutorial-enforcement/pom.xml b/tutorials/tutorial-enforcement/pom.xml index 07795514..1b904309 100644 --- a/tutorials/tutorial-enforcement/pom.xml +++ b/tutorials/tutorial-enforcement/pom.xml @@ -4,6 +4,7 @@ ================================================================================ Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. Modifications Copyright (C) 2020 Bell Canada. + Modifications Copyright (C) 2023 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +27,7 @@ org.onap.policy.xacml-pdp xacml-tutorials - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT org.onap.policy.tutorial diff --git a/tutorials/tutorial-enforcement/src/main/java/org/onap/policy/tutorial/policyenforcement/App.java b/tutorials/tutorial-enforcement/src/main/java/org/onap/policy/tutorial/policyenforcement/App.java index 6b291c6a..78d06841 100644 --- a/tutorials/tutorial-enforcement/src/main/java/org/onap/policy/tutorial/policyenforcement/App.java +++ b/tutorials/tutorial-enforcement/src/main/java/org/onap/policy/tutorial/policyenforcement/App.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,14 +19,14 @@ package org.onap.policy.tutorial.policyenforcement; +import jakarta.ws.rs.client.Entity; +import jakarta.ws.rs.core.MediaType; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Scanner; -import javax.ws.rs.client.Entity; -import javax.ws.rs.core.MediaType; import org.onap.policy.common.endpoints.event.comm.Topic.CommInfrastructure; import org.onap.policy.common.endpoints.event.comm.TopicEndpointManager; import org.onap.policy.common.endpoints.event.comm.TopicListener; diff --git a/tutorials/tutorial-xacml-application/pom.xml b/tutorials/tutorial-xacml-application/pom.xml index 002f5f5c..2530b6d9 100644 --- a/tutorials/tutorial-xacml-application/pom.xml +++ b/tutorials/tutorial-xacml-application/pom.xml @@ -3,7 +3,7 @@ ONAP Policy Engine - XACML Application Tutorial ================================================================================ Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. - Modifications Copyright (C) 2022 Nordix Foundation. + Modifications Copyright (C) 2022-2023 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -25,7 +25,7 @@ org.onap.policy.xacml-pdp xacml-tutorials - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT jar diff --git a/version.properties b/version.properties index 4ba0a9a8..3288dcdc 100644 --- a/version.properties +++ b/version.properties @@ -4,7 +4,7 @@ minor=3 minor=0 -patch=0 +patch=1 base_version=${major}.${minor}.${patch} diff --git a/xacml-test/pom.xml b/xacml-test/pom.xml index 24940040..e9b27a18 100644 --- a/xacml-test/pom.xml +++ b/xacml-test/pom.xml @@ -3,6 +3,7 @@ ONAP ================================================================================ Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + Modifications Copyright (C) 2023 Nordix Foundation. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -26,7 +27,7 @@ org.onap.policy.xacml-pdp policy-xacml-pdp - 3.0.0-SNAPSHOT + 3.0.1-SNAPSHOT .. -- cgit 1.2.3-korg