From 59b90519eda3b95b0cfc49b6349a591c7d0c78e2 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Mon, 7 Feb 2022 17:56:44 +0000 Subject: Remove JAXB and XML, use GSON for JSON This review converst apex-pdp to use GSON for JSON handling. In order to preserve backward compatibility with the JAXB format of JSON, custom handling of maps was required. Therefore, the policy-common StandardCoder could not be used. There are a lot of small changes, removing annotations from concepts and tweaking of test data. However, this cleans up the code base so it is worth doing. Issue-ID: POLICY-1820 Change-Id: I213fa64f6d7f3f1df8d10f111d9fbedbe80f9fe0 Signed-off-by: liamfallon --- .../integration/common/model/SampleDomainModelSaver.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'testsuites/integration/integration-common/src/main/java/org/onap') diff --git a/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaver.java b/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaver.java index 362ccf923..324ae6cdf 100644 --- a/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaver.java +++ b/testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaver.java @@ -1,7 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2016-2018 Ericsson. All rights reserved. - * Modifications Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019,2022 Nordix Foundation. * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -57,35 +57,29 @@ public final class SampleDomainModelSaver { final ApexModelSaver javaModelSaver = new ApexModelSaver<>(AxPolicyModel.class, javaPolicyModel, args[0]); javaModelSaver.apexModelWriteJson(); - javaModelSaver.apexModelWriteXml(); // Save Javascript model final AxPolicyModel javascriptPolicyModel = new SampleDomainModelFactory().getSamplePolicyModel("JAVASCRIPT"); final ApexModelSaver javascriptModelSaver = new ApexModelSaver<>(AxPolicyModel.class, javascriptPolicyModel, args[0]); javascriptModelSaver.apexModelWriteJson(); - javascriptModelSaver.apexModelWriteXml(); // Save JRuby model final AxPolicyModel jRubyPolicyModel = new SampleDomainModelFactory().getSamplePolicyModel("JRUBY"); final ApexModelSaver jRubyModelSaver = new ApexModelSaver<>(AxPolicyModel.class, jRubyPolicyModel, args[0]); jRubyModelSaver.apexModelWriteJson(); - jRubyModelSaver.apexModelWriteXml(); // Save Jython model final AxPolicyModel jythonPolicyModel = new SampleDomainModelFactory().getSamplePolicyModel("JYTHON"); final ApexModelSaver jythonModelSaver = new ApexModelSaver<>(AxPolicyModel.class, jythonPolicyModel, args[0]); jythonModelSaver.apexModelWriteJson(); - jythonModelSaver.apexModelWriteXml(); // Save MVEL model final AxPolicyModel mvelPolicyModel = new SampleDomainModelFactory().getSamplePolicyModel("MVEL"); final ApexModelSaver mvelModelSaver = new ApexModelSaver<>(AxPolicyModel.class, mvelPolicyModel, args[0]); mvelModelSaver.apexModelWriteJson(); - mvelModelSaver.apexModelWriteXml(); } - } -- cgit 1.2.3-korg