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-aadm/src/main/resources | |
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-aadm/src/main/resources')
8 files changed, 46 insertions, 46 deletions
diff --git a/examples/examples-aadm/src/main/resources/examples/config/AADM/Stdin2StdoutJsonEvent.json b/examples/examples-aadm/src/main/resources/examples/config/AADM/Stdin2StdoutJsonEvent.json index c43f41353..427dea352 100644 --- a/examples/examples-aadm/src/main/resources/examples/config/AADM/Stdin2StdoutJsonEvent.json +++ b/examples/examples-aadm/src/main/resources/examples/config/AADM/Stdin2StdoutJsonEvent.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" } } } diff --git a/examples/examples-aadm/src/main/resources/examples/config/AADM/Stdin2StdoutXmlEvent.json b/examples/examples-aadm/src/main/resources/examples/config/AADM/Stdin2StdoutXmlEvent.json index 294da2483..3658b09a2 100644 --- a/examples/examples-aadm/src/main/resources/examples/config/AADM/Stdin2StdoutXmlEvent.json +++ b/examples/examples-aadm/src/main/resources/examples/config/AADM/Stdin2StdoutXmlEvent.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" } } } @@ -24,7 +24,7 @@ }, "eventProtocolParameters": { "eventProtocol": "XML", - "parameterClassName": "org.onap.policy.apex.plugins.event.protocol.xml.XMLEventProtocolParameters" + "parameterClassName": "org.onap.policy.apex.plugins.event.protocol.xml.XmlEventProtocolParameters" } } }, @@ -38,7 +38,7 @@ }, "eventProtocolParameters": { "eventProtocol": "XML", - "parameterClassName": "org.onap.policy.apex.plugins.event.protocol.xml.XMLEventProtocolParameters" + "parameterClassName": "org.onap.policy.apex.plugins.event.protocol.xml.XmlEventProtocolParameters" } } } diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSProvenActTask_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSProvenActTask_TaskLogic.mvel index 078841792..225a0da4d 100644 --- a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSProvenActTask_TaskLogic.mvel +++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSProvenActTask_TaskLogic.mvel @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ import org.onap.policy.apex.examples.aadm.concepts.ENodeBStatus; -import org.onap.policy.apex.examples.aadm.concepts.IMSIStatus; +import org.onap.policy.apex.examples.aadm.concepts.ImsiStatus; logger.debug(subject.id + ":" + subject.taskName + " execution logic"); logger.debug(inFields); @@ -44,10 +44,10 @@ else{ outFields["NW_IP"] = inFields["SGW_IP_ADDRESS"]; } -IMSIStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)inFields["IMSI"]); +ImsiStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)inFields["IMSI"]); logger.debug(imsiStatus); -ENodeBStatus eNodeBStatus = getContextAlbum("ENodeBStatusAlbum").get(imsiStatus.getENodeBID()); +ENodeBStatus eNodeBStatus = getContextAlbum("ENodeBStatusAlbum").get(imsiStatus.getENodeBId()); eNodeBStatus.setBeingProbed(false); leaveProbingOn = false; @@ -62,14 +62,14 @@ if (!leaveProbingOn) { outFields["TCP_ON"] = false; } -eNodeBStatus.decrementDOSCount(); -logger.debug(eNodeBStatus.getENodeB() + ": dosCount is " + eNodeBStatus.getDOSCount()); +eNodeBStatus.decrementDosCount(); +logger.debug(eNodeBStatus.getENodeB() + ": dosCount is " + eNodeBStatus.getDosCount()); imsiStatus.setAnomalous(false); -logger.debug("imsi: " + imsiStatus.getIMSI() + " anamalous " + imsiStatus.getAnomalous()); +logger.debug("imsi: " + imsiStatus.getImsi() + " anamalous " + imsiStatus.getAnomalous()); -getContextAlbum("IMSIStatusAlbum") .put(imsiStatus.getIMSI(), imsiStatus); +getContextAlbum("IMSIStatusAlbum") .put(imsiStatus.getImsi(), imsiStatus); getContextAlbum("ENodeBStatusAlbum").put(eNodeBStatus.getENodeB(), eNodeBStatus); outFields["THRESHOLD"] = 0; diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSSuggestionActTask_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSSuggestionActTask_TaskLogic.mvel index d04f9425e..63ac8d0ba 100644 --- a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSSuggestionActTask_TaskLogic.mvel +++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMDoSSuggestionActTask_TaskLogic.mvel @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ import org.onap.policy.apex.examples.aadm.concepts.ENodeBStatus; -import org.onap.policy.apex.examples.aadm.concepts.IMSIStatus; +import org.onap.policy.apex.examples.aadm.concepts.ImsiStatus; logger.debug(subject.id + ":" + subject.taskName + " execution logic"); logger.debug(inFields); @@ -42,16 +42,16 @@ else { outFields["NW_IP"] = inFields["SGW_IP_ADDRESS"]; } -IMSIStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)inFields["IMSI"]); +ImsiStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)inFields["IMSI"]); logger.debug(imsiStatus); -ENodeBStatus eNodeBStatus = getContextAlbum("ENodeBStatusAlbum").get(imsiStatus.getENodeBID()); +ENodeBStatus eNodeBStatus = getContextAlbum("ENodeBStatusAlbum").get(imsiStatus.getENodeBId()); logger.debug(eNodeBStatus); -if (imsiStatus.getENodeBID() != null && !imsiStatus.getENodeBID().equals(inFields["ENODEB_ID"]) || inFields["AVG_SUBSCRIBER_SERVICE_REQUEST"] == null) { +if (imsiStatus.getENodeBId() != null && !imsiStatus.getENodeBId().equals(inFields["ENODEB_ID"]) || inFields["AVG_SUBSCRIBER_SERVICE_REQUEST"] == null) { // if user moved enodeB remove him from previous one - if (imsiStatus.getENodeBID() != null) { - eNodeBStatus.decrementDOSCount(); + if (imsiStatus.getENodeBId() != null) { + eNodeBStatus.decrementDosCount(); } // if user became non anomalous return action @@ -79,20 +79,20 @@ if (imsiStatus.getENodeBID() != null && !imsiStatus.getENodeBID().equals(inField imsiStatus.setAnomalous(true); imsiStatus.setAnomolousTime(System.currentTimeMillis()); -imsiStatus.setENodeBID(inFields["ENODEB_ID"]); -getContextAlbum("IMSIStatusAlbum").put(imsiStatus.getIMSI(), imsiStatus); -logger.debug(imsiStatus.getENodeBID() + ": enodeb added to imsi ip added " + outFields["IMSI_IP"]); +imsiStatus.setENodeBId(inFields["ENODEB_ID"]); +getContextAlbum("IMSIStatusAlbum").put(imsiStatus.getImsi(), imsiStatus); +logger.debug(imsiStatus.getENodeBId() + ": enodeb added to imsi ip added " + outFields["IMSI_IP"]); -ENodeBStatus eNodeBStatus = getContextAlbum("ENodeBStatusAlbum").get(imsiStatus.getENodeBID()); +ENodeBStatus eNodeBStatus = getContextAlbum("ENodeBStatusAlbum").get(imsiStatus.getENodeBId()); if (eNodeBStatus == null) { - eNodeBStatus = new ENodeBStatus(imsiStatus.getENodeBID()); + eNodeBStatus = new ENodeBStatus(imsiStatus.getENodeBId()); getContextAlbum("ENodeBStatusAlbum").put(eNodeBStatus.getENodeB(), eNodeBStatus); - logger.debug("new eNodeB added " + getContextAlbum("ENodeBStatusAlbum").get(imsiStatus.getENodeBID())); + logger.debug("new eNodeB added " + getContextAlbum("ENodeBStatusAlbum").get(imsiStatus.getENodeBId())); } -eNodeBStatus.incrementDOSCount(); +eNodeBStatus.incrementDosCount(); getContextAlbum("ENodeBStatusAlbum").put(eNodeBStatus.getENodeB(), eNodeBStatus); -logger.debug(eNodeBStatus.getENodeB() + ": dosCount incremented to " + eNodeBStatus.getDOSCount()); +logger.debug(eNodeBStatus.getENodeB() + ": dosCount incremented to " + eNodeBStatus.getDosCount()); outFields["PROBE_ON"] = true; outFields["TCP_ON"] = true; diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMMatchTask_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMMatchTask_TaskLogic.mvel index bb38034af..24ad9bb0a 100644 --- a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMMatchTask_TaskLogic.mvel +++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMMatchTask_TaskLogic.mvel @@ -18,8 +18,8 @@ * ============LICENSE_END========================================================= */ import org.onap.policy.apex.examples.aadm.concepts.ENodeBStatus; -import org.onap.policy.apex.examples.aadm.concepts.IPAddressStatus; -import org.onap.policy.apex.examples.aadm.concepts.IMSIStatus; +import org.onap.policy.apex.examples.aadm.concepts.IpAddressStatus; +import org.onap.policy.apex.examples.aadm.concepts.ImsiStatus; logger.debug(subject.id + ":" + subject.taskName + " execution logic"); logger.debug(inFields); @@ -46,22 +46,22 @@ if (eNodeBID == null ) { return false; } -IPAddressStatus ipAddressStatus = getContextAlbum("IPAddressStatusAlbum").get(ipAddress); +IpAddressStatus ipAddressStatus = getContextAlbum("IPAddressStatusAlbum").get(ipAddress); if (ipAddressStatus == null) { - ipAddressStatus = new IPAddressStatus(ipAddress); - ipAddressStatus.setIMSI(imsi); - getContextAlbum("IPAddressStatusAlbum").put(ipAddressStatus.getIPAddress(), ipAddressStatus); + ipAddressStatus = new IpAddressStatus(ipAddress); + ipAddressStatus.setImsi(imsi); + getContextAlbum("IPAddressStatusAlbum").put(ipAddressStatus.getIpAddress(), ipAddressStatus); logger.debug("added new IP address " + getContextAlbum("IPAddressStatusAlbum").get(ipAddress)); } else { logger.debug("found IP address " + ipAddressStatus); } -IMSIStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)imsi); +ImsiStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)imsi); if (imsiStatus == null) { - imsiStatus = new IMSIStatus(imsi); - imsiStatus.setENodeBID(eNodeBID); - getContextAlbum("IMSIStatusAlbum").put(imsiStatus.getIMSI(), imsiStatus); + imsiStatus = new ImsiStatus(imsi); + imsiStatus.setENodeBId(eNodeBID); + getContextAlbum("IMSIStatusAlbum").put(imsiStatus.getImsi(), imsiStatus); logger.debug("added new IMSI " + imsi + " to IMSI status map") } diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMPolicy_Act_TaskSelectionLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMPolicy_Act_TaskSelectionLogic.mvel index 2d0d45bdf..9c71db50a 100644 --- a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMPolicy_Act_TaskSelectionLogic.mvel +++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/AADMPolicy_Act_TaskSelectionLogic.mvel @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -import org.onap.policy.apex.examples.aadm.concepts.IMSIStatus; +import org.onap.policy.apex.examples.aadm.concepts.ImsiStatus; import org.onap.policy.apex.examples.aadm.concepts.ENodeBStatus; logger.debug(subject.id + ":" + subject.stateName + " execution logic"); @@ -25,7 +25,7 @@ logger.debug(inFields); logger.debug("inFields[SERVICE_REQUEST_COUNT]=" + inFields["SERVICE_REQUEST_COUNT"]); -IMSIStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)inFields["IMSI"]); +ImsiStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)inFields["IMSI"]); if (imsiStatus.getBlockingCount() > 1) { subject.getTaskKey("AADMNoActTask").copyTo(selectedTask); @@ -33,7 +33,7 @@ if (imsiStatus.getBlockingCount() > 1) { return false; } -logger.debug("imsi: " + imsiStatus.getIMSI() + " anamalous " + imsiStatus.getAnomalous()); +logger.debug("imsi: " + imsiStatus.getImsi() + " anamalous " + imsiStatus.getAnomalous()); // check if this is second iteration if (inFields["TCP_UE_SIDE_AVG_THROUGHPUT"] != null && inFields["TCP_UE_SIDE_AVG_THROUGHPUT"] > 100 && imsiStatus.getAnomalous()) { @@ -49,7 +49,7 @@ ENodeBStatus eNodeBStatus = getContextAlbum("ENodeBStatusAlbum").get((String)inF if (inFields["SERVICE_REQUEST_COUNT"] != null && inFields["AVG_SUBSCRIBER_SERVICE_REQUEST"] != null && inFields["SERVICE_REQUEST_COUNT"] > inFields["AVG_SUBSCRIBER_SERVICE_REQUEST"] && - eNodeBStatus != null && eNodeBStatus.getDOSCount() > 100 && + eNodeBStatus != null && eNodeBStatus.getDosCount() > 100 && inFields["NUM_SUBSCRIBERS"] != null && inFields["NUM_SUBSCRIBERS"] > 100) { logger.debug("inside NUM_SUBSCRIBERS"); subject.getTaskKey("AADMDoSProvenActTask").copyTo(selectedTask); diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/PeriodicActTask_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/PeriodicActTask_TaskLogic.mvel index 115ac5477..6a2c598b0 100644 --- a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/PeriodicActTask_TaskLogic.mvel +++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/PeriodicActTask_TaskLogic.mvel @@ -17,15 +17,15 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -import org.onap.policy.apex.examples.aadm.concepts.IMSIStatus; +import org.onap.policy.apex.examples.aadm.concepts.ImsiStatus; logger.debug(subject.id + ":" + subject.taskName + " execution logic"); logger.debug(inFields); -for (IMSIStatus imsiStatus : getContextAlbum("IMSIStatusAlbum").values()) { +for (ImsiStatus imsiStatus : getContextAlbum("IMSIStatusAlbum").values()) { if ((System.currentTimeMillis() - imsiStatus.getBlacklistedTime()) > 180000) { imsiStatus.setBlacklistedTime(0); - getContextAlbum("IMSIStatusAlbum").put(imsiStatus.getIMSI(), imsiStatus); + getContextAlbum("IMSIStatusAlbum").put(imsiStatus.getImsi(), imsiStatus); } } diff --git a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/SAPCActTask_TaskLogic.mvel b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/SAPCActTask_TaskLogic.mvel index 7ceaa2abe..b0c6c3158 100644 --- a/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/SAPCActTask_TaskLogic.mvel +++ b/examples/examples-aadm/src/main/resources/org/onap/policy/apex/examples/aadm/model/mvel/SAPCActTask_TaskLogic.mvel @@ -17,7 +17,7 @@ * SPDX-License-Identifier: Apache-2.0 * ============LICENSE_END========================================================= */ -import org.onap.policy.apex.examples.aadm.concepts.IMSIStatus; +import org.onap.policy.apex.examples.aadm.concepts.ImsiStatus; logger.debug(subject.id + ":" + subject.taskName + " execution logic"); logger.debug(inFields); @@ -38,7 +38,7 @@ if (outFields["IMSI"] == 0 && inFields["IMSI_IP"] != null && inFields["IMSI_IP"] return true; } -IMSIStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)inFields["IMSI"]); +ImsiStatus imsiStatus = getContextAlbum("IMSIStatusAlbum").get((String)inFields["IMSI"]); logger.debug(imsiStatus); if (imsiStatus.getBlockingCount() > 1) { @@ -62,8 +62,8 @@ if (imsiStatus.getBlockingCount() > 0 && imsiStatus.getBlacklistedTime() != 0) { imsiStatus.incrementBlockingCount(); imsiStatus.setBlacklistedTime(System.currentTimeMillis()); -logger.debug("Bocking count for IMSI: " + imsiStatus.getIMSI() + " is: " + imsiStatus.getBlockingCount()); -getContextAlbum("IMSIStatusAlbum").put(imsiStatus.getIMSI(), imsiStatus); +logger.debug("Bocking count for IMSI: " + imsiStatus.getImsi() + " is: " + imsiStatus.getBlockingCount()); +getContextAlbum("IMSIStatusAlbum").put(imsiStatus.getImsi(), imsiStatus); outFields["PROFILE"] = "ServiceA"; outFields["BLACKLIST_ON"] = true; |