diff options
author | liamfallon <liam.fallon@ericsson.com> | 2018-09-13 15:25:32 +0100 |
---|---|---|
committer | liamfallon <liam.fallon@ericsson.com> | 2018-09-13 15:26:47 +0100 |
commit | 4cfa2e2d98f6877d54da304ef17f096284430908 (patch) | |
tree | c9452d2bf6bb96fae9c1e8e2d8ce8f8d01e69d22 /examples/examples-myfirstpolicy/src/main | |
parent | 0e23f7634e1e1fb31454c516974613335fcea1a4 (diff) |
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 <liam.fallon@ericsson.com>
Diffstat (limited to 'examples/examples-myfirstpolicy/src/main')
8 files changed, 25 insertions, 25 deletions
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 index 5e5bb913d..f81a22ee9 100644 --- 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 @@ -30,7 +30,7 @@ import org.onap.policy.common.utils.resources.ResourceUtils; * * @author John Keeney (john.keeney@ericsson.com) */ -public class MFPDomainModelFactory { +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"; @@ -41,13 +41,13 @@ public class MFPDomainModelFactory { * * @return the MyFirstPolicy#1 policy model */ - public AxPolicyModel getMFP1PolicyModel() { + public AxPolicyModel getMfp1PolicyModel() { java.util.TimeZone.getTimeZone("gmt"); try { final ApexModelReader<AxPolicyModel> reader = new ApexModelReader<>(AxPolicyModel.class); - return reader.read(ResourceUtils.getResourceAsString(MFPDomainModelFactory.MFP1PATH)); + return reader.read(ResourceUtils.getResourceAsString(MfpDomainModelFactory.MFP1PATH)); } catch (final Exception e) { - throw new ApexRuntimeException("Failed to build MyFirstPolicy from path: " + MFPDomainModelFactory.MFP1PATH, + throw new ApexRuntimeException("Failed to build MyFirstPolicy from path: " + MfpDomainModelFactory.MFP1PATH, e); } } @@ -57,14 +57,14 @@ public class MFPDomainModelFactory { * * @return the MyFirstPolicy#1 policy model */ - public AxPolicyModel getMFP1AltPolicyModel() { + public AxPolicyModel getMfp1AltPolicyModel() { java.util.TimeZone.getTimeZone("gmt"); try { final ApexModelReader<AxPolicyModel> reader = new ApexModelReader<>(AxPolicyModel.class); - return reader.read(ResourceUtils.getResourceAsString(MFPDomainModelFactory.MFP1_ALT_PATH)); + 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); + "Failed to build MyFirstPolicy_ALT from path: " + MfpDomainModelFactory.MFP1_ALT_PATH, e); } } @@ -73,12 +73,12 @@ public class MFPDomainModelFactory { * * @return the MyFirstPolicy#1 policy model */ - public AxPolicyModel getMFP2PolicyModel() { + public AxPolicyModel getMfp2PolicyModel() { try { final ApexModelReader<AxPolicyModel> reader = new ApexModelReader<>(AxPolicyModel.class); - return reader.read(ResourceUtils.getResourceAsString(MFPDomainModelFactory.MFP2PATH)); + return reader.read(ResourceUtils.getResourceAsString(MfpDomainModelFactory.MFP2PATH)); } catch (final Exception e) { - throw new ApexRuntimeException("Failed to build MyFirstPolicy from path: " + MFPDomainModelFactory.MFP2PATH, + 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 index fb47f6cf9..5122390a8 100644 --- 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 @@ -29,10 +29,10 @@ import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel; * * @author John Keeney (john.keeney@ericsson.com) */ -public final class MFPDomainModelSaver { +public final class MfpDomainModelSaver { /** Private constructor to prevent instantiation. */ - private MFPDomainModelSaver() {} + private MfpDomainModelSaver() {} /** * Write the MyFirstPolicy model to args[0]. @@ -42,18 +42,18 @@ public final class MFPDomainModelSaver { */ public static void main(final String[] args) throws ApexException { if (args.length != 1) { - System.err.println("usage: " + MFPDomainModelSaver.class.getCanonicalName() + " modelDirectory"); + System.err.println("usage: " + MfpDomainModelSaver.class.getCanonicalName() + " modelDirectory"); return; } // Save Java model - AxPolicyModel mfpPolicyModel = new MFPDomainModelFactory().getMFP1PolicyModel(); + AxPolicyModel mfpPolicyModel = new MfpDomainModelFactory().getMfp1PolicyModel(); ApexModelSaver<AxPolicyModel> mfpModelSaver = new ApexModelSaver<>(AxPolicyModel.class, mfpPolicyModel, args[0] + "/1/"); mfpModelSaver.apexModelWriteJson(); mfpModelSaver.apexModelWriteXml(); - mfpPolicyModel = new MFPDomainModelFactory().getMFP2PolicyModel(); + 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 |