aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/dcaegen2/services/sonhms/Configuration.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap/dcaegen2/services/sonhms/Configuration.java')
-rw-r--r--src/main/java/org/onap/dcaegen2/services/sonhms/Configuration.java100
1 files changed, 97 insertions, 3 deletions
diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/Configuration.java b/src/main/java/org/onap/dcaegen2/services/sonhms/Configuration.java
index 563491c..8b05f8c 100644
--- a/src/main/java/org/onap/dcaegen2/services/sonhms/Configuration.java
+++ b/src/main/java/org/onap/dcaegen2/services/sonhms/Configuration.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* son-handler
* ================================================================================
- * Copyright (C) 2019-2020 Wipro Limited.
+ * Copyright (C) 2019-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.
@@ -45,6 +45,11 @@ public class Configuration {
private String pgPassword;
private List<String> dmaapServers;
private String configDbService;
+ private String cpsServiceUrl;
+ private String getCellDataUrl;
+ private String getNbrListUrl;
+ private String getPciUrl;
+ private String getPnfUrl;
private String oofService;
private String oofEndpoint;
private String cg;
@@ -74,6 +79,35 @@ public class Configuration {
private int policyNegativeAckThreshold;
private long policyFixedPciTimeInterval;
private String nfNamingCode;
+ private String ConfigClientType;
+ private String CpsUsername;
+ private String CpsPassword;
+
+ public String getCpsUsername()
+ {
+ return CpsUsername;
+ }
+ public void setCpsUsername(String CpsUsername)
+ {
+ this.CpsUsername = CpsUsername;
+ }
+ public String getCpsPassword()
+ {
+ return CpsPassword;
+ }
+ public void setCpsPassword(String CpsPassword)
+ {
+ this.CpsPassword = CpsPassword;
+ }
+
+ public String getConfigClientType()
+ {
+ return ConfigClientType;
+ }
+ public void setConfigClientType(String ConfigClientType)
+ {
+ this.ConfigClientType = ConfigClientType;
+ }
public int getPoorCountThreshold() {
return poorCountThreshold;
@@ -377,11 +411,64 @@ public class Configuration {
this.nfNamingCode = nfNamingCode;
}
- @Override
+ public static Logger getLog() {
+ return log;
+ }
+
+ public static void setLog(Logger log) {
+ Configuration.log = log;
+ }
+
+ public String getCpsServiceUrl() {
+ return cpsServiceUrl;
+ }
+
+ public void setCpsServiceUrl(String cpsServiceUrl) {
+ this.cpsServiceUrl = cpsServiceUrl;
+ }
+
+ public String getGetCellDataUrl() {
+ return getCellDataUrl;
+ }
+
+ public void setGetCellDataUrl(String getCellDataUrl) {
+ this.getCellDataUrl = getCellDataUrl;
+ }
+
+ public String getGetNbrListUrl() {
+ return getNbrListUrl;
+ }
+
+ public void setGetNbrListUrl(String getNbrListUrl) {
+ this.getNbrListUrl = getNbrListUrl;
+ }
+
+ public String getGetPciUrl() {
+ return getPciUrl;
+ }
+
+ public void setGetPciUrl(String getPciUrl) {
+ this.getPciUrl = getPciUrl;
+ }
+
+ public String getGetPnfUrl() {
+ return getPnfUrl;
+ }
+
+ public void setGetPnfUrl(String getPnfUrl) {
+ this.getPnfUrl = getPnfUrl;
+ }
+
+ public static void setInstance(Configuration instance) {
+ Configuration.instance = instance;
+ }
+
+ @Override
public String toString() {
return "Configuration [pgHost=" + pgHost + ", pgPort=" + pgPort + ", pgUsername=" + pgUsername + ", pgPassword="
+ pgPassword + ", dmaapServers=" + dmaapServers + ", configDbService=" + configDbService
- + ", oofService=" + oofService + ", oofEndpoint=" + oofEndpoint + ", cg=" + cg + ", cid=" + cid
+ + ", cpsServiceUrl=" + cpsServiceUrl + ", CpsUsername=" + CpsUsername + ",CpsPassword=" + CpsPassword + ",ConfigClientType=" + ConfigClientType + ", getCellDataUrl=" + getCellDataUrl + ", getNbrListUrl="
+ + getNbrListUrl + ", getPciUrl=" + getPciUrl + ", getPnfUrl=" + getPnfUrl + ", oofService=" + oofService + ", oofEndpoint=" + oofEndpoint + ", cg=" + cg + ", cid=" + cid
+ ", pollingInterval=" + pollingInterval + ", pollingTimeout=" + pollingTimeout + ", minCollision="
+ minCollision + ", minConfusion=" + minConfusion + ", sourceId=" + sourceId + ", callbackUrl="
+ callbackUrl + ", pciOptimizer=" + pciOptimizer + ", pciAnrOptimizer=" + pciAnrOptimizer
@@ -410,6 +497,8 @@ public class Configuration {
JsonObject publishes = jsonObject.getAsJsonObject("streams_publishes");
streamsPublishes = new Gson().fromJson(publishes, mapType);
+ CpsUsername = jsonObject.get("cps.username").getAsString();
+ CpsPassword = jsonObject.get("cps.password").getAsString();
pgPort = jsonObject.get("postgres.port").getAsInt();
pollingInterval = jsonObject.get("sonhandler.pollingInterval").getAsInt();
pgPassword = jsonObject.get("postgres.password").getAsString();
@@ -451,6 +540,11 @@ public class Configuration {
policyNegativeAckThreshold = jsonObject.get("sonhandler.policyNegativeAckThreshold").getAsInt();
policyFixedPciTimeInterval = jsonObject.get("sonhandler.policyFixedPciTimeInterval").getAsLong();
nfNamingCode = jsonObject.get("sonhandler.nfNamingCode").getAsString();
+ cpsServiceUrl = jsonObject.get("cps.service.url").getAsString();
+ getCellDataUrl = jsonObject.get("cps.get.celldata").getAsString();
+ getPnfUrl = jsonObject.get("cps.get.pnf.url").getAsString();
+ getPciUrl = jsonObject.get("cps.get.pci.url").getAsString();
+ ConfigClientType = jsonObject.get("sonhandler.clientType").getAsString();
log.info("configuration from CBS {}", this);