diff options
author | 2021-05-21 21:20:02 +0530 | |
---|---|---|
committer | 2021-05-31 11:45:04 +0530 | |
commit | ee67930973552a69830c30e6b3b1915091af8ebb (patch) | |
tree | a90b90d12815c47f2201ea583161d3816189b34c /components/slice-analysis-ms/src/main | |
parent | 3424dd5d1a261fda473ef46666a316c7f32e3de3 (diff) |
Code cleanup
Issue-ID: DCAEGEN2-2504
Signed-off-by: denilson.l65 <denilson.l65@wipro.com>
Change-Id: Ife119bb0e084a5ef0e3199a70523876c4e258f67
Diffstat (limited to 'components/slice-analysis-ms/src/main')
34 files changed, 89 insertions, 61 deletions
diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/configdb/CpsService.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/configdb/CpsService.java index f72c99c2..f0c27e19 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/configdb/CpsService.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/configdb/CpsService.java @@ -20,8 +20,6 @@ *******************************************************************************/ package org.onap.slice.analysis.ms.configdb; -import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; @@ -30,8 +28,6 @@ import org.onap.slice.analysis.ms.restclients.CpsRestClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; /** diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/ConfigFetchFromCbs.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/ConfigFetchFromCbs.java index ea148f25..01fa91d0 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/ConfigFetchFromCbs.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/ConfigFetchFromCbs.java @@ -124,4 +124,4 @@ public class ConfigFetchFromCbs implements Runnable { } } -}
\ No newline at end of file +} diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/HealthCheck.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/HealthCheck.java index 854bdf4f..a1f1fed8 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/HealthCheck.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/controller/HealthCheck.java @@ -37,4 +37,4 @@ public class HealthCheck { public ResponseEntity<HttpStatus> healthCheck() { return new ResponseEntity<>(HttpStatus.OK); } -}
\ No newline at end of file +} diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationCallback.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationCallback.java index ce1ebd6f..8841236c 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationCallback.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationCallback.java @@ -21,6 +21,10 @@ package org.onap.slice.analysis.ms.dmaap; +/** + * Interface for NotificationCallback + * + */ public interface NotificationCallback { public abstract void activateCallBack(String msg); diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationProducer.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationProducer.java index 03e1c238..ce362019 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationProducer.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/NotificationProducer.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,6 @@ public class NotificationProducer { private CambriaBatchingPublisher cambriaBatchingPublisher; - /** * Parameterized constructor. */ @@ -45,9 +44,7 @@ public class NotificationProducer { * sends notification to dmaap. */ public int sendNotification(String msg) throws IOException { - return cambriaBatchingPublisher.send("", msg); - } } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/PmNotificationCallback.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/PmNotificationCallback.java index 963165d2..c8deccd1 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/PmNotificationCallback.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/dmaap/PmNotificationCallback.java @@ -34,6 +34,9 @@ public class PmNotificationCallback implements NotificationCallback { private static Logger log = LoggerFactory.getLogger(PmNotificationCallback.class); + /** + * Triggers on handleNofitication method + */ @Override public void activateCallBack(String msg) { handleNotification(msg); diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CUModel.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CUModel.java index 6473ab23..91201f05 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CUModel.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CUModel.java @@ -61,6 +61,9 @@ public class CUModel { return "CUModel [gNBCUName=" + gNBCUName + ", nearRTRICId=" + nearRTRICId + ", cellCUList=" + cellCUList + "]"; } + /** + * Returns a hashcode value for the object + */ @Override public int hashCode() { final int prime = 31; @@ -71,6 +74,9 @@ public class CUModel { return result; } + /** + * Checks whether the object matches with the CUModel + */ @Override public boolean equals(Object obj) { if (this == obj) diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CellCUList.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CellCUList.java index cd566778..5225fd36 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CellCUList.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/CellCUList.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,9 @@ public class CellCUList { private Integer cellLocalId; private ConfigData configData; + /** + * Returns a hashcode value for the object + */ @Override public int hashCode() { final int prime = 31; @@ -38,6 +41,9 @@ public class CellCUList { return result; } + /** + * Checks whether the object matches with the CellCUList + */ @Override public boolean equals(Object obj) { if (this == obj) diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigData.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigData.java index f8711154..ea811824 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigData.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigData.java @@ -54,6 +54,9 @@ public class ConfigData { this.lastUpdatedTS = lastUpdatedTS; } + /** + * Returns a hashcode value for the object + */ @Override public int hashCode() { final int prime = 31; @@ -64,6 +67,9 @@ public class ConfigData { return result; } + /** + * Checks whether the object matches with ConfigData + */ @Override public boolean equals(Object obj) { if (this == obj) diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigPolicy.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigPolicy.java index 6f2b4ec6..e18c8c0f 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigPolicy.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/ConfigPolicy.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,7 +28,6 @@ import java.util.Map; * Model class for configuration policy * */ - public class ConfigPolicy { private static ConfigPolicy instance = null; @@ -69,4 +68,5 @@ public class ConfigPolicy { public String toString() { return "ConfigPolicy [config=" + config + "]"; } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MLOutputModel.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MLOutputModel.java index 7533d215..aee819be 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MLOutputModel.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MLOutputModel.java @@ -47,6 +47,9 @@ public class MLOutputModel { return "MLOutputModel [snssai=" + snssai + ", data=" + data + "]"; } + /** + * Returns a hashcode value for the object + */ @Override public int hashCode() { final int prime = 31; @@ -56,6 +59,9 @@ public class MLOutputModel { return result; } + /** + * Checks whether the object matches with the MLOutputModel + */ @Override public boolean equals(Object obj) { if (this == obj) @@ -78,5 +84,4 @@ public class MLOutputModel { return true; } - } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java index b94d75da..cbe97a9b 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/MeasurementObject.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,9 @@ public class MeasurementObject { private String measurementObjectId; private Map<String, Integer> pmData; + /** + * Returns the index of the MeasurementObject + */ public static int findIndex(String measurementObjectId, List<MeasurementObject> list) { int index = -1; int len = list.size(); @@ -74,6 +77,9 @@ public class MeasurementObject { } + /** + * Returns a hachcode value for the object + */ @Override public int hashCode() { final int prime = 31; @@ -83,6 +89,9 @@ public class MeasurementObject { return result; } + /** + * Checks whether the object matches with the MeasurementObject + */ @Override public boolean equals(Object obj) { if (this == obj) diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/SubCounter.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/SubCounter.java index 2990d365..cd540194 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/SubCounter.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/SubCounter.java @@ -43,6 +43,9 @@ public final class SubCounter { return measuredObject; } + /** + * Returns a hashcode value for the object + */ @Override public int hashCode() { final int prime = 31; @@ -52,6 +55,9 @@ public final class SubCounter { return result; } + /** + * Checks whether the object matches with the SubCounter + */ @Override public boolean equals(Object obj) { if (this == obj) diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/CellsModel.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/CellsModel.java index e024bf7c..5c8f2dc9 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/CellsModel.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/CellsModel.java @@ -26,13 +26,11 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; /** * Model class for the CellsModel Object */ - @JsonIgnoreProperties(ignoreUnknown = true) public class CellsModel { private String cellLocalId; - public String getCellLocalId() { return cellLocalId; } @@ -46,6 +44,4 @@ public class CellsModel { return "CellsModel [cellLocalId=" + cellLocalId + "]"; } - - } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/NetworkFunctionModel.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/NetworkFunctionModel.java index 46291d51..6821871f 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/NetworkFunctionModel.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/configdb/NetworkFunctionModel.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,7 +20,6 @@ *******************************************************************************/ package org.onap.slice.analysis.ms.models.configdb; - import com.fasterxml.jackson.annotation.JsonIgnoreProperties; /** @@ -31,7 +30,6 @@ public class NetworkFunctionModel { private String gNBDUId; - public String getgNBDUId() { return gNBDUId; } @@ -45,8 +43,4 @@ public class NetworkFunctionModel { return "NetworkFunctionModel [gNBDUId=" + gNBDUId + "]"; } - - - - } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/Event.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/Event.java index 4e41e261..4b0fcaa7 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/Event.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/Event.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,4 +44,5 @@ public class Event { public void setPerf3gppFields(Perf3gppFields perf3gppFields) { this.perf3gppFields = perf3gppFields; } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/MeasValuesList.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/MeasValuesList.java index 38b7c23c..36e7b103 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/MeasValuesList.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/pmnotification/MeasValuesList.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -55,4 +55,5 @@ public class MeasValuesList { public void setMeasResults(List<MeasResult> measResults) { this.measResults = measResults; } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/AdditionalProperties.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/AdditionalProperties.java index 0d4e4bd8..24c1dd2f 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/AdditionalProperties.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/AdditionalProperties.java @@ -71,5 +71,4 @@ public class AdditionalProperties<T> { this.scriptName = scriptName; } - } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/Payload.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/Payload.java index 57aab994..d96850cb 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/Payload.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/models/policy/Payload.java @@ -32,62 +32,50 @@ public class Payload { private String networkType; private AdditionalProperties<?> additionalProperties; - public String getName() { return name; } - public void setName(String name) { this.name = name; } - public String getServiceInstanceID() { return serviceInstanceID; } - public void setServiceInstanceID(String serviceInstanceId) { this.serviceInstanceID = serviceInstanceId; } - public String getGlobalSubscriberId() { return globalSubscriberId; } - public void setGlobalSubscriberId(String globalSubscriberId) { this.globalSubscriberId = globalSubscriberId; } - public String getSubscriptionServiceType() { return subscriptionServiceType; } - public void setSubscriptionServiceType(String subscriptionServiceType) { this.subscriptionServiceType = subscriptionServiceType; } - public String getNetworkType() { return networkType; } - public void setNetworkType(String networkType) { this.networkType = networkType; } - public AdditionalProperties<?> getAdditionalProperties() { return additionalProperties; } - public void setAdditionalProperties(AdditionalProperties<?> additionalProperties) { this.additionalProperties = additionalProperties; } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/AaiRestClient.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/AaiRestClient.java index 62e39ad5..1f7d084f 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/AaiRestClient.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/AaiRestClient.java @@ -39,6 +39,9 @@ public class AaiRestClient extends RestClient { super(); } + /** + * Sends post request to Aai + */ public <T> ResponseEntity<T> sendPostRequest(String requestUrl, String requestBody, ParameterizedTypeReference<T> responseType) { HttpHeaders headers = new HttpHeaders(); @@ -47,6 +50,9 @@ public class AaiRestClient extends RestClient { return super.sendPostRequest(headers, requestUrl, requestBody, responseType); } + /** + * Sends get request to Aai + */ public <T> ResponseEntity<T> sendGetRequest(String requestUrl, ParameterizedTypeReference<T> responseType) { HttpHeaders headers = new HttpHeaders(); headers.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON)); @@ -55,5 +61,6 @@ public class AaiRestClient extends RestClient { headers.set("X-TransactionId", "get_aai_subscr"); return super.sendGetRequest(headers, requestUrl, responseType); } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/ConfigDbRestClient.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/ConfigDbRestClient.java index dbc42912..ebc211c2 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/ConfigDbRestClient.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/ConfigDbRestClient.java @@ -61,4 +61,5 @@ public class ConfigDbRestClient extends RestClient { headers.setContentType(MediaType.APPLICATION_JSON); return super.sendGetRequest(headers, requestUrl, responseType); } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/CpsRestClient.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/CpsRestClient.java index 1d6e2388..0d8e72a8 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/CpsRestClient.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/CpsRestClient.java @@ -61,5 +61,5 @@ public class CpsRestClient extends RestClient { headers.setContentType(MediaType.APPLICATION_JSON); return super.sendGetRequest(headers, requestUrl, responseType); } -} +} diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/RestClient.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/RestClient.java index 3be3fc65..239cedf4 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/RestClient.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/restclients/RestClient.java @@ -68,7 +68,6 @@ public class RestClient { /** * Post Request Template. */ - public <T> ResponseEntity<T> sendPostRequest(HttpHeaders headers, String requestUrl, String requestBody, ParameterizedTypeReference<T> responseType) { HttpEntity<Object> requestEntity = new HttpEntity<>(requestBody, headers); @@ -83,7 +82,6 @@ public class RestClient { /** * Get Request Template. */ - public <T> ResponseEntity<T> sendGetRequest(HttpHeaders headers, String requestUrl, ParameterizedTypeReference<T> responseType) { HttpEntity<Void> requestEntity = new HttpEntity<>(headers); diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java index 52670d53..74c48d97 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/AverageCalculator.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,7 +53,6 @@ public class AverageCalculator { log.debug("find average for samples {}", samples); int numOfSamples = samples.size(); List<MeasurementObject> result = new ArrayList<>(); - if(!samples.isEmpty()) { for(List<MeasurementObject> sample : samples) { for(MeasurementObject cellMeasObj : sample) { int index = MeasurementObject.findIndex(cellMeasObj.getMeasurementObjectId(), result); @@ -65,7 +64,6 @@ public class AverageCalculator { } } } - } return findAvg(result, numOfSamples); } @@ -95,5 +93,5 @@ public class AverageCalculator { } return result; } -} +} diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/ConsumerThread.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/ConsumerThread.java index b676273f..e8028200 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/ConsumerThread.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/ConsumerThread.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -91,9 +91,9 @@ public class ConsumerThread extends Thread { } } - /** - * Checks whether enough samples are available for the network functions - */ + /** + * Checks whether enough samples are available for the network functions + */ public boolean checkForEnoughSamples(List<String> nfs, String snssai) { for(String nf : nfs) { if(! pmDataQueue.checkSamplesInQueue(new SubCounter(nf, snssai), samples)) { diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/MLMessageProcessor.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/MLMessageProcessor.java index b67d3507..8bc7b0d5 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/MLMessageProcessor.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/MLMessageProcessor.java @@ -90,5 +90,5 @@ public class MLMessageProcessor { } policyService.sendOnsetMessageToPolicy(snssai, addProps, serviceDetails); } -} +} diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmDataQueue.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmDataQueue.java index 868b94c7..612be46d 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmDataQueue.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmDataQueue.java @@ -116,4 +116,5 @@ public class PmDataQueue { } return snssai; } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmEventProcessor.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmEventProcessor.java index 51a04660..81a49f9d 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmEventProcessor.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmEventProcessor.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -103,4 +103,5 @@ public class PmEventProcessor implements IPmEventProcessor{ result.put("snssai", pmNameArr[2]); return result; } -}
\ No newline at end of file + +} diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmThread.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmThread.java index e2903ae1..2a24a49c 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmThread.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PmThread.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,4 +89,5 @@ public class PmThread extends Thread { } } } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PolicyService.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PolicyService.java index ca5bf265..2d3a2df0 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PolicyService.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/PolicyService.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,6 +48,9 @@ public class PolicyService { private static Logger log = LoggerFactory.getLogger(PolicyService.class); private ObjectMapper objectMapper = new ObjectMapper(); + /** + * Initialization + */ @PostConstruct public void init() { Configuration configuration = Configuration.getInstance(); diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/SnssaiSamplesProcessor.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/SnssaiSamplesProcessor.java index 0c5c0eb8..ccb34edb 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/SnssaiSamplesProcessor.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/service/SnssaiSamplesProcessor.java @@ -224,4 +224,5 @@ public class SnssaiSamplesProcessor { } log.info("Throughput computed for RIC {}", ricToThroughputMapping); } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/AppConfig.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/AppConfig.java index 29d7d105..45ef1c38 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/AppConfig.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/AppConfig.java @@ -37,8 +37,6 @@ import org.springframework.web.client.RestTemplate; @Configuration public class AppConfig { - - /** * Rest Template bean. */ @@ -65,4 +63,5 @@ public class AppConfig { byteArrayHttpMessageConverter.setSupportedMediaTypes(supportedApplicationTypes); return byteArrayHttpMessageConverter; } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/BeanUtil.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/BeanUtil.java index 5f4006c9..3257ac05 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/BeanUtil.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/BeanUtil.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -49,4 +49,5 @@ public class BeanUtil implements ApplicationContextAware { public static <T> T getBean(Class<T> beanClass) { return context.getBean(beanClass); } + } diff --git a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/DmaapUtils.java b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/DmaapUtils.java index 7457533b..6e1cf912 100644 --- a/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/DmaapUtils.java +++ b/components/slice-analysis-ms/src/main/java/org/onap/slice/analysis/ms/utils/DmaapUtils.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * slice-analysis-ms * ================================================================================ - * Copyright (C) 2020 Wipro Limited. + * Copyright (C) 2020-2021 Wipro Limited. * ============================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. |