aboutsummaryrefslogtreecommitdiffstats
path: root/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.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/controller/internal/MavenDroolsController.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/controller/internal/MavenDroolsController.java')
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java b/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java
index 55352fe2..6a4b8f22 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/controller/internal/MavenDroolsController.java
@@ -36,6 +36,8 @@ import org.kie.api.runtime.rule.FactHandle;
import org.kie.api.runtime.rule.QueryResults;
import org.kie.api.runtime.rule.QueryResultsRow;
import org.onap.policy.common.endpoints.event.comm.TopicSink;
+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.PolicySession;
@@ -67,6 +69,7 @@ public class MavenDroolsController implements DroolsController {
* Policy Container, the access object to the policy-core layer.
*/
@JsonIgnore
+ @GsonJsonIgnore
protected final PolicyContainer policyContainer;
/**
@@ -646,12 +649,14 @@ public class MavenDroolsController implements DroolsController {
}
@JsonIgnore
+ @GsonJsonIgnore
@Override
public PolicyContainer getContainer() {
return this.policyContainer;
}
@JsonProperty("sessions")
+ @GsonJsonProperty("sessions")
@Override
public List<String> getSessionNames() {
return getSessionNames(true);
@@ -681,6 +686,7 @@ public class MavenDroolsController implements DroolsController {
}
@JsonProperty("sessionCoordinates")
+ @GsonJsonProperty("sessionCoordinates")
@Override
public List<String> getCanonicalSessionNames() {
return getSessionNames(false);