aboutsummaryrefslogtreecommitdiffstats
path: root/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-02-15 12:24:14 -0500
committerJim Hahn <jrh3@att.com>2019-02-15 12:26:37 -0500
commitcb8557e068ec89473dcb4d01a68e7dfd0a4644c5 (patch)
tree4e5eaea52f9a5f5416e75f28f18b5ffdef0b86e6 /policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
parentb47140e63ebc5d878c66935698df99a987a6418e (diff)
Test gson in policy-management
Added jackson-like Gson annotations to policy-management classes. Also added tests to verify that the classes serialize the same with gson as with jackson. Removed some trailing spaces. Replaced tabs and adjusted spacing in json files. Removed trailing newlines. Updated license data per review comment. Fixed merge conflict. Added files that were inadvertently deleted. Change-Id: Ib546e70f9d9d83187a6a93ff5c634000c4d53da5 Issue-ID: POLICY-1431 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java')
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
index e08b3704..959114a2 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/system/PolicyEngine.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* policy-management
* ================================================================================
- * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,6 +40,8 @@ import org.onap.policy.common.endpoints.event.comm.TopicSource;
import org.onap.policy.common.endpoints.http.server.HttpServletServer;
import org.onap.policy.common.endpoints.http.server.HttpServletServerFactory;
import org.onap.policy.common.endpoints.properties.PolicyEndPointProperties;
+import org.onap.policy.common.gson.annotation.GsonJsonIgnore;
+import org.onap.policy.common.gson.annotation.GsonJsonProperty;
import org.onap.policy.drools.controller.DroolsController;
import org.onap.policy.drools.core.PolicyContainer;
import org.onap.policy.drools.core.jmx.PdpJmxListener;
@@ -431,6 +433,7 @@ class PolicyEngineManager implements PolicyEngine {
}
@JsonIgnore
+ @GsonJsonIgnore
@Override
public synchronized Properties getEnvironment() {
return this.environment;
@@ -1167,12 +1170,14 @@ class PolicyEngineManager implements PolicyEngine {
}
@JsonIgnore
+ @GsonJsonIgnore
@Override
public List<PolicyController> getPolicyControllers() {
return getControllerFactory().inventory();
}
@JsonProperty("controllers")
+ @GsonJsonProperty("controllers")
@Override
public List<String> getPolicyControllerIds() {
final List<String> controllerNames = new ArrayList<>();
@@ -1184,6 +1189,7 @@ class PolicyEngineManager implements PolicyEngine {
@Override
@JsonIgnore
+ @GsonJsonIgnore
public Properties getProperties() {
return this.properties;
}
@@ -1216,6 +1222,7 @@ class PolicyEngineManager implements PolicyEngine {
}
@JsonIgnore
+ @GsonJsonIgnore
@Override
public List<PolicyEngineFeatureAPI> getFeatureProviders() {
return getEngineProviders();