summaryrefslogtreecommitdiffstats
path: root/dcae-analytics/dcae-analytics-tca-web/src/main
diff options
context:
space:
mode:
authorKai <lukai@chinamobile.com>2020-07-10 18:05:46 +0800
committerKai <lukai@chinamobile.com>2020-07-15 10:03:34 +0800
commit0688c66229fe1bfb1d7d8920705b019d5cfeb17f (patch)
tree717656f8ceae006223a395da3737400627e19de9 /dcae-analytics/dcae-analytics-tca-web/src/main
parentddb9b0f7e578aefd06ee9e3f01d810b0b9034f3a (diff)
TCAGen2 java upgrade
Issue-ID: DCAEGEN2-2285 Signed-off-by: Kai Lu <lukai@chinamobile.com> Change-Id: I1a7b3db68141ed8648fe47865f39dea22f0d999c
Diffstat (limited to 'dcae-analytics/dcae-analytics-tca-web/src/main')
-rw-r--r--dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java14
1 files changed, 2 insertions, 12 deletions
diff --git a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java
index 0214a3d..d70922b 100644
--- a/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java
+++ b/dcae-analytics/dcae-analytics-tca-web/src/main/java/org/onap/dcae/analytics/tca/web/TcaAppProperties.java
@@ -30,11 +30,6 @@ import org.onap.dcae.analytics.model.configbindingservice.BaseConfigBindingServi
import org.onap.dcae.analytics.model.configbindingservice.ConfigBindingServiceConstants;
import org.springframework.core.env.Environment;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.google.gson.JsonParser;
-
import lombok.Data;
import lombok.ToString;
@@ -106,17 +101,12 @@ public class TcaAppProperties extends BaseConfigBindingServiceProperties {
*/
private String getPolicy() {
- String policies = environment.getProperty(ConfigBindingServiceConstants.POLICIES);
+ String policies = environment.getProperty(ConfigBindingServiceConstants.WITHPOLICIES);
if (policies == null) {
return environment.getProperty(ConfigBindingServiceConstants.POLICY);
}
- JsonObject policiesObject = new JsonParser().parse(policies).getAsJsonObject();
- JsonArray items = policiesObject.get(ConfigBindingServiceConstants.ITEMS).getAsJsonArray();
- JsonElement policy = items.get(0)
- .getAsJsonObject().get(ConfigBindingServiceConstants.CONFIG)
- .getAsJsonObject().get(ConfigBindingServiceConstants.TCAPOLICY);
- return policy.toString();
+ return policies;
}