From 4cfa2e2d98f6877d54da304ef17f096284430908 Mon Sep 17 00:00:00 2001 From: liamfallon Date: Thu, 13 Sep 2018 15:25:32 +0100 Subject: Sonar/Checkstyle in service/plugins Sonar and Checkstyle changes in plugins and services, and knock on changes Issue-ID: POLICY-1034 Change-Id: Iff7df74e54fce2c661dcc2fae75ae93d4cacfe5b Signed-off-by: liamfallon --- examples/examples-myfirstpolicy/pom.xml | 2 +- .../myfirstpolicy/model/MFPDomainModelFactory.java | 86 ---------------------- .../myfirstpolicy/model/MFPDomainModelSaver.java | 62 ---------------- .../myfirstpolicy/model/MfpDomainModelFactory.java | 86 ++++++++++++++++++++++ .../myfirstpolicy/model/MfpDomainModelSaver.java | 62 ++++++++++++++++ .../1/MyFirstPolicyConfigFile2StdoutJsonEvent.json | 2 +- .../MyFirstPolicyConfigStdin2StdoutJsonEvent.json | 2 +- .../1/MyFirstPolicyConfigWs2WsServerJsonEvent.json | 6 +- .../2/MyFirstPolicyConfigFile2StdoutJsonEvent.json | 2 +- .../MyFirstPolicyConfigStdin2StdoutJsonEvent.json | 2 +- .../2/MyFirstPolicyConfigWs2WsServerJsonEvent.json | 6 +- .../apex/examples/myfirstpolicy/TestMfpLogic.java | 8 +- .../examples/myfirstpolicy/TestMfpModelCli.java | 6 +- .../myfirstpolicy/TestMfpModelCreator.java | 6 +- .../examples/myfirstpolicy/TestMfpUseCase.java | 16 ++-- 15 files changed, 180 insertions(+), 174 deletions(-) delete mode 100644 examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelFactory.java delete mode 100644 examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java create mode 100644 examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelFactory.java create mode 100644 examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelSaver.java (limited to 'examples/examples-myfirstpolicy') diff --git a/examples/examples-myfirstpolicy/pom.xml b/examples/examples-myfirstpolicy/pom.xml index cc56d0b1f..7aa4f5bdf 100644 --- a/examples/examples-myfirstpolicy/pom.xml +++ b/examples/examples-myfirstpolicy/pom.xml @@ -97,7 +97,7 @@ - org.onap.policy.apex.examples.myfirstpolicy.model.MFPDomainModelSaver + org.onap.policy.apex.examples.myfirstpolicy.model.MfpDomainModelSaver ${project.build.directory}/classes/examples/models/MyFirstPolicy diff --git a/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelFactory.java b/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelFactory.java deleted file mode 100644 index 5e5bb913d..000000000 --- a/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelFactory.java +++ /dev/null @@ -1,86 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2016-2018 Ericsson. 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.apex.examples.myfirstpolicy.model; - -import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException; -import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader; -import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; -import org.onap.policy.common.utils.resources.ResourceUtils; - -/** - * A factory for creating MFPDomainModel objects. - * - * @author John Keeney (john.keeney@ericsson.com) - */ -public class MFPDomainModelFactory { - - private static final String MFP1PATH = "examples/models/MyFirstPolicy/1/MyFirstPolicyModel_0.0.1.json"; - private static final String MFP1_ALT_PATH = "examples/models/MyFirstPolicy/1/MyFirstPolicyModel_0.0.1.alt.json"; - private static final String MFP2PATH = "examples/models/MyFirstPolicy/2/MyFirstPolicyModel_0.0.1.json"; - - /** - * Gets the MyFirstPolicy#1 policy model. - * - * @return the MyFirstPolicy#1 policy model - */ - public AxPolicyModel getMFP1PolicyModel() { - java.util.TimeZone.getTimeZone("gmt"); - try { - final ApexModelReader reader = new ApexModelReader<>(AxPolicyModel.class); - return reader.read(ResourceUtils.getResourceAsString(MFPDomainModelFactory.MFP1PATH)); - } catch (final Exception e) { - throw new ApexRuntimeException("Failed to build MyFirstPolicy from path: " + MFPDomainModelFactory.MFP1PATH, - e); - } - } - - /** - * Gets the MyFirstPolicy#1 policy model, with alternate JavaScript task logic. - * - * @return the MyFirstPolicy#1 policy model - */ - public AxPolicyModel getMFP1AltPolicyModel() { - java.util.TimeZone.getTimeZone("gmt"); - try { - final ApexModelReader reader = new ApexModelReader<>(AxPolicyModel.class); - return reader.read(ResourceUtils.getResourceAsString(MFPDomainModelFactory.MFP1_ALT_PATH)); - } catch (final Exception e) { - throw new ApexRuntimeException( - "Failed to build MyFirstPolicy_ALT from path: " + MFPDomainModelFactory.MFP1_ALT_PATH, e); - } - } - - /** - * Gets the MyFirstPolicy#1 policy model. - * - * @return the MyFirstPolicy#1 policy model - */ - public AxPolicyModel getMFP2PolicyModel() { - try { - final ApexModelReader reader = new ApexModelReader<>(AxPolicyModel.class); - return reader.read(ResourceUtils.getResourceAsString(MFPDomainModelFactory.MFP2PATH)); - } catch (final Exception e) { - throw new ApexRuntimeException("Failed to build MyFirstPolicy from path: " + MFPDomainModelFactory.MFP2PATH, - e); - } - } - -} diff --git a/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java b/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java deleted file mode 100644 index fb47f6cf9..000000000 --- a/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MFPDomainModelSaver.java +++ /dev/null @@ -1,62 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2016-2018 Ericsson. 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.policy.apex.examples.myfirstpolicy.model; - -import org.onap.policy.apex.model.basicmodel.concepts.ApexException; -import org.onap.policy.apex.model.basicmodel.handling.ApexModelSaver; -import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; - -/** - * The Class MFPDomainModelSaver. - * - * @author John Keeney (john.keeney@ericsson.com) - */ -public final class MFPDomainModelSaver { - - /** Private constructor to prevent instantiation. */ - private MFPDomainModelSaver() {} - - /** - * Write the MyFirstPolicy model to args[0]. - * - * @param args uses arg[0] for directory information - * @throws ApexException the apex exception - */ - public static void main(final String[] args) throws ApexException { - if (args.length != 1) { - System.err.println("usage: " + MFPDomainModelSaver.class.getCanonicalName() + " modelDirectory"); - return; - } - - // Save Java model - AxPolicyModel mfpPolicyModel = new MFPDomainModelFactory().getMFP1PolicyModel(); - ApexModelSaver mfpModelSaver = - new ApexModelSaver<>(AxPolicyModel.class, mfpPolicyModel, args[0] + "/1/"); - mfpModelSaver.apexModelWriteJson(); - mfpModelSaver.apexModelWriteXml(); - - mfpPolicyModel = new MFPDomainModelFactory().getMFP2PolicyModel(); - mfpModelSaver = new ApexModelSaver<>(AxPolicyModel.class, mfpPolicyModel, args[0] + "/2/"); - mfpModelSaver.apexModelWriteJson(); - mfpModelSaver.apexModelWriteXml(); - - } -} diff --git a/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelFactory.java b/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelFactory.java new file mode 100644 index 000000000..f81a22ee9 --- /dev/null +++ b/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelFactory.java @@ -0,0 +1,86 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.examples.myfirstpolicy.model; + +import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException; +import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader; +import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; +import org.onap.policy.common.utils.resources.ResourceUtils; + +/** + * A factory for creating MFPDomainModel objects. + * + * @author John Keeney (john.keeney@ericsson.com) + */ +public class MfpDomainModelFactory { + + private static final String MFP1PATH = "examples/models/MyFirstPolicy/1/MyFirstPolicyModel_0.0.1.json"; + private static final String MFP1_ALT_PATH = "examples/models/MyFirstPolicy/1/MyFirstPolicyModel_0.0.1.alt.json"; + private static final String MFP2PATH = "examples/models/MyFirstPolicy/2/MyFirstPolicyModel_0.0.1.json"; + + /** + * Gets the MyFirstPolicy#1 policy model. + * + * @return the MyFirstPolicy#1 policy model + */ + public AxPolicyModel getMfp1PolicyModel() { + java.util.TimeZone.getTimeZone("gmt"); + try { + final ApexModelReader reader = new ApexModelReader<>(AxPolicyModel.class); + return reader.read(ResourceUtils.getResourceAsString(MfpDomainModelFactory.MFP1PATH)); + } catch (final Exception e) { + throw new ApexRuntimeException("Failed to build MyFirstPolicy from path: " + MfpDomainModelFactory.MFP1PATH, + e); + } + } + + /** + * Gets the MyFirstPolicy#1 policy model, with alternate JavaScript task logic. + * + * @return the MyFirstPolicy#1 policy model + */ + public AxPolicyModel getMfp1AltPolicyModel() { + java.util.TimeZone.getTimeZone("gmt"); + try { + final ApexModelReader reader = new ApexModelReader<>(AxPolicyModel.class); + return reader.read(ResourceUtils.getResourceAsString(MfpDomainModelFactory.MFP1_ALT_PATH)); + } catch (final Exception e) { + throw new ApexRuntimeException( + "Failed to build MyFirstPolicy_ALT from path: " + MfpDomainModelFactory.MFP1_ALT_PATH, e); + } + } + + /** + * Gets the MyFirstPolicy#1 policy model. + * + * @return the MyFirstPolicy#1 policy model + */ + public AxPolicyModel getMfp2PolicyModel() { + try { + final ApexModelReader reader = new ApexModelReader<>(AxPolicyModel.class); + return reader.read(ResourceUtils.getResourceAsString(MfpDomainModelFactory.MFP2PATH)); + } catch (final Exception e) { + throw new ApexRuntimeException("Failed to build MyFirstPolicy from path: " + MfpDomainModelFactory.MFP2PATH, + e); + } + } + +} diff --git a/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelSaver.java b/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelSaver.java new file mode 100644 index 000000000..5122390a8 --- /dev/null +++ b/examples/examples-myfirstpolicy/src/main/java/org/onap/policy/apex/examples/myfirstpolicy/model/MfpDomainModelSaver.java @@ -0,0 +1,62 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2016-2018 Ericsson. 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.policy.apex.examples.myfirstpolicy.model; + +import org.onap.policy.apex.model.basicmodel.concepts.ApexException; +import org.onap.policy.apex.model.basicmodel.handling.ApexModelSaver; +import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; + +/** + * The Class MFPDomainModelSaver. + * + * @author John Keeney (john.keeney@ericsson.com) + */ +public final class MfpDomainModelSaver { + + /** Private constructor to prevent instantiation. */ + private MfpDomainModelSaver() {} + + /** + * Write the MyFirstPolicy model to args[0]. + * + * @param args uses arg[0] for directory information + * @throws ApexException the apex exception + */ + public static void main(final String[] args) throws ApexException { + if (args.length != 1) { + System.err.println("usage: " + MfpDomainModelSaver.class.getCanonicalName() + " modelDirectory"); + return; + } + + // Save Java model + AxPolicyModel mfpPolicyModel = new MfpDomainModelFactory().getMfp1PolicyModel(); + ApexModelSaver mfpModelSaver = + new ApexModelSaver<>(AxPolicyModel.class, mfpPolicyModel, args[0] + "/1/"); + mfpModelSaver.apexModelWriteJson(); + mfpModelSaver.apexModelWriteXml(); + + mfpPolicyModel = new MfpDomainModelFactory().getMfp2PolicyModel(); + mfpModelSaver = new ApexModelSaver<>(AxPolicyModel.class, mfpPolicyModel, args[0] + "/2/"); + mfpModelSaver.apexModelWriteJson(); + mfpModelSaver.apexModelWriteXml(); + + } +} diff --git a/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/1/MyFirstPolicyConfigFile2StdoutJsonEvent.json b/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/1/MyFirstPolicyConfigFile2StdoutJsonEvent.json index fc81cd6a6..d8d53f8c9 100644 --- a/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/1/MyFirstPolicyConfigFile2StdoutJsonEvent.json +++ b/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/1/MyFirstPolicyConfigFile2StdoutJsonEvent.json @@ -9,7 +9,7 @@ "engineParameters": { "executorParameters": { "MVEL": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MVELExecutorParameters" + "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters" }, "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" diff --git a/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/1/MyFirstPolicyConfigStdin2StdoutJsonEvent.json b/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/1/MyFirstPolicyConfigStdin2StdoutJsonEvent.json index 27bd0a6a9..338e1df99 100644 --- a/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/1/MyFirstPolicyConfigStdin2StdoutJsonEvent.json +++ b/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/1/MyFirstPolicyConfigStdin2StdoutJsonEvent.json @@ -9,7 +9,7 @@ "engineParameters": { "executorParameters": { "MVEL": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MVELExecutorParameters" + "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters" }, "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" diff --git a/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/1/MyFirstPolicyConfigWs2WsServerJsonEvent.json b/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/1/MyFirstPolicyConfigWs2WsServerJsonEvent.json index c4cf72171..9d438a4ec 100644 --- a/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/1/MyFirstPolicyConfigWs2WsServerJsonEvent.json +++ b/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/1/MyFirstPolicyConfigWs2WsServerJsonEvent.json @@ -9,7 +9,7 @@ "engineParameters": { "executorParameters": { "MVEL": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MVELExecutorParameters" + "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters" }, "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" @@ -21,7 +21,7 @@ "aProducer": { "carrierTechnologyParameters": { "carrierTechnology": "WEBSOCKET", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.websocket.WEBSOCKETCarrierTechnologyParameters", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.websocket.WebSocketCarrierTechnologyParameters", "parameters": { "wsClient": false, "port": 4000 @@ -36,7 +36,7 @@ "aConsumer": { "carrierTechnologyParameters": { "carrierTechnology": "WEBSOCKET", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.websocket.WEBSOCKETCarrierTechnologyParameters", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.websocket.WebSocketCarrierTechnologyParameters", "parameters": { "wsClient": false, "port": 3000 diff --git a/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/2/MyFirstPolicyConfigFile2StdoutJsonEvent.json b/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/2/MyFirstPolicyConfigFile2StdoutJsonEvent.json index be8ae938a..d4dba4446 100644 --- a/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/2/MyFirstPolicyConfigFile2StdoutJsonEvent.json +++ b/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/2/MyFirstPolicyConfigFile2StdoutJsonEvent.json @@ -9,7 +9,7 @@ "engineParameters": { "executorParameters": { "MVEL": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MVELExecutorParameters" + "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters" }, "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" diff --git a/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/2/MyFirstPolicyConfigStdin2StdoutJsonEvent.json b/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/2/MyFirstPolicyConfigStdin2StdoutJsonEvent.json index 56e79b2f3..0853a9850 100644 --- a/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/2/MyFirstPolicyConfigStdin2StdoutJsonEvent.json +++ b/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/2/MyFirstPolicyConfigStdin2StdoutJsonEvent.json @@ -9,7 +9,7 @@ "engineParameters": { "executorParameters": { "MVEL": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MVELExecutorParameters" + "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters" }, "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" diff --git a/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/2/MyFirstPolicyConfigWs2WsServerJsonEvent.json b/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/2/MyFirstPolicyConfigWs2WsServerJsonEvent.json index 65612b6db..cd621e694 100644 --- a/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/2/MyFirstPolicyConfigWs2WsServerJsonEvent.json +++ b/examples/examples-myfirstpolicy/src/main/resources/examples/config/MyFirstPolicy/2/MyFirstPolicyConfigWs2WsServerJsonEvent.json @@ -9,7 +9,7 @@ "engineParameters": { "executorParameters": { "MVEL": { - "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MVELExecutorParameters" + "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters" }, "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters" @@ -21,7 +21,7 @@ "aProducer": { "carrierTechnologyParameters": { "carrierTechnology": "WEBSOCKET", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.websocket.WEBSOCKETCarrierTechnologyParameters", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.websocket.WebSocketCarrierTechnologyParameters", "parameters": { "wsClient": false, "port": 4000 @@ -36,7 +36,7 @@ "aConsumer": { "carrierTechnologyParameters": { "carrierTechnology": "WEBSOCKET", - "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.websocket.WEBSOCKETCarrierTechnologyParameters", + "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.websocket.WebSocketCarrierTechnologyParameters", "parameters": { "wsClient": false, "port": 3000 diff --git a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpLogic.java b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpLogic.java index 651bd9280..e425088ff 100644 --- a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpLogic.java +++ b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpLogic.java @@ -30,7 +30,7 @@ import java.util.Map.Entry; import org.junit.BeforeClass; import org.junit.Test; -import org.onap.policy.apex.examples.myfirstpolicy.model.MFPDomainModelFactory; +import org.onap.policy.apex.examples.myfirstpolicy.model.MfpDomainModelFactory; import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey; import org.onap.policy.apex.model.policymodel.concepts.AxPolicy; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; @@ -59,7 +59,7 @@ public class TestMfpLogic { */ @Test public void testMfp1TaskLogic() { - final AxPolicyModel apexPolicyModel = new MFPDomainModelFactory().getMFP1PolicyModel(); + final AxPolicyModel apexPolicyModel = new MfpDomainModelFactory().getMfp1PolicyModel(); assertNotNull(apexPolicyModel); final Map logics = new LinkedHashMap<>(); @@ -85,7 +85,7 @@ public class TestMfpLogic { */ @Test public void testMfp1AltTaskLogic() { - final AxPolicyModel apexPolicyModel = new MFPDomainModelFactory().getMFP1AltPolicyModel(); + final AxPolicyModel apexPolicyModel = new MfpDomainModelFactory().getMfp1AltPolicyModel(); assertNotNull(apexPolicyModel); final Map logics = new LinkedHashMap<>(); @@ -110,7 +110,7 @@ public class TestMfpLogic { */ @Test public void testMfp2TaskLogic() { - final AxPolicyModel apexPolicyModel = new MFPDomainModelFactory().getMFP2PolicyModel(); + final AxPolicyModel apexPolicyModel = new MfpDomainModelFactory().getMfp2PolicyModel(); assertNotNull(apexPolicyModel); final Map logics = new LinkedHashMap<>(); diff --git a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModelCli.java b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModelCli.java index 0d6b4737c..a63df03bc 100644 --- a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModelCli.java +++ b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModelCli.java @@ -27,7 +27,7 @@ import java.io.IOException; import org.junit.BeforeClass; import org.junit.Test; -import org.onap.policy.apex.auth.clieditor.ApexCLIEditorMain; +import org.onap.policy.apex.auth.clieditor.ApexCommandLineEditorMain; import org.onap.policy.apex.model.basicmodel.handling.ApexModelException; import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; @@ -71,8 +71,8 @@ public class TestMfpModelCli { { "-c", "src/main/resources/examples/models/MyFirstPolicy/2/MyFirstPolicyModel_0.0.1.apex", "-l", tempLogFile2.getAbsolutePath(), "-o", tempModelFile2.getAbsolutePath() }; - new ApexCLIEditorMain(testApexModel1CliArgs); - new ApexCLIEditorMain(testApexModel2CliArgs); + new ApexCommandLineEditorMain(testApexModel1CliArgs); + new ApexCommandLineEditorMain(testApexModel2CliArgs); final ApexModelReader reader = new ApexModelReader<>(AxPolicyModel.class); AxPolicyModel generatedmodel = reader.read(TextFileUtils.getTextFileAsString(tempModelFile1.getAbsolutePath())); diff --git a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModelCreator.java b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModelCreator.java index ebbdac7c2..d77405d9e 100644 --- a/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModelCreator.java +++ b/examples/examples-myfirstpolicy/src/test/java/org/onap/policy/apex/examples/myfirstpolicy/TestMfpModelCreator.java @@ -20,7 +20,7 @@ package org.onap.policy.apex.examples.myfirstpolicy; -import org.onap.policy.apex.examples.myfirstpolicy.model.MFPDomainModelFactory; +import org.onap.policy.apex.examples.myfirstpolicy.model.MfpDomainModelFactory; import org.onap.policy.apex.model.basicmodel.test.TestApexModelCreator; import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; @@ -83,7 +83,7 @@ public abstract class TestMfpModelCreator implements TestApexModelCreator