diff options
author | 2022-02-07 17:56:44 +0000 | |
---|---|---|
committer | 2022-02-08 18:39:03 +0000 | |
commit | 59b90519eda3b95b0cfc49b6349a591c7d0c78e2 (patch) | |
tree | 810e07f7d5cf270582264c40245372f597c713a2 /testsuites/integration/integration-common/src/main/java | |
parent | def44b294fa00bb5470e977eef9a05e5087035f0 (diff) |
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 <liam.fallon@est.tech>
Diffstat (limited to 'testsuites/integration/integration-common/src/main/java')
-rw-r--r-- | testsuites/integration/integration-common/src/main/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaver.java | 8 |
1 files changed, 1 insertions, 7 deletions
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<AxPolicyModel> javaModelSaver = new ApexModelSaver<>(AxPolicyModel.class, javaPolicyModel, args[0]); javaModelSaver.apexModelWriteJson(); - javaModelSaver.apexModelWriteXml(); // Save Javascript model final AxPolicyModel javascriptPolicyModel = new SampleDomainModelFactory().getSamplePolicyModel("JAVASCRIPT"); final ApexModelSaver<AxPolicyModel> javascriptModelSaver = new ApexModelSaver<>(AxPolicyModel.class, javascriptPolicyModel, args[0]); javascriptModelSaver.apexModelWriteJson(); - javascriptModelSaver.apexModelWriteXml(); // Save JRuby model final AxPolicyModel jRubyPolicyModel = new SampleDomainModelFactory().getSamplePolicyModel("JRUBY"); final ApexModelSaver<AxPolicyModel> jRubyModelSaver = new ApexModelSaver<>(AxPolicyModel.class, jRubyPolicyModel, args[0]); jRubyModelSaver.apexModelWriteJson(); - jRubyModelSaver.apexModelWriteXml(); // Save Jython model final AxPolicyModel jythonPolicyModel = new SampleDomainModelFactory().getSamplePolicyModel("JYTHON"); final ApexModelSaver<AxPolicyModel> jythonModelSaver = new ApexModelSaver<>(AxPolicyModel.class, jythonPolicyModel, args[0]); jythonModelSaver.apexModelWriteJson(); - jythonModelSaver.apexModelWriteXml(); // Save MVEL model final AxPolicyModel mvelPolicyModel = new SampleDomainModelFactory().getSamplePolicyModel("MVEL"); final ApexModelSaver<AxPolicyModel> mvelModelSaver = new ApexModelSaver<>(AxPolicyModel.class, mvelPolicyModel, args[0]); mvelModelSaver.apexModelWriteJson(); - mvelModelSaver.apexModelWriteXml(); } - } |