From 18914b033f67d25cc9377b2e381648a9e3184968 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 21 Jan 2019 12:42:10 -0500 Subject: Add gson support to policy-endpoints Added "provider" property to both http client and server builders. The provider defaults to jackson, to maintain backward compatibility until other policy code has been converted to gson. Removed commented item from pom. Added some comments and re-arranged a few pieces of code. Fixed a few typos and removed spacing at the end of some lines. Reordered imports. Added comments about limitations when using jersey-media-json-jackson. Address ridiculous checkstyle complaint. Support comma-separated list of serialization providers in jersey client. Disabled metainf discovery from jersey client and server so that the media-json dependencies could be re-instated in the pom. Address another ridiculous checkstyle complaint. Change-Id: Ic5a93b475d0ee9b435352b3516de6b865b00a86a Issue-ID: POLICY-1428 Signed-off-by: Jim Hahn --- .../endpoints/event/comm/bus/internal/BusTopicParams.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event') diff --git a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusTopicParams.java b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusTopicParams.java index b752d91c..6e3c2632 100644 --- a/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusTopicParams.java +++ b/policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusTopicParams.java @@ -3,7 +3,7 @@ * policy-endpoints * ================================================================================ * Copyright (C) 2018 Samsung Electronics Co., Ltd. All rights reserved. - * Modifications Copyright (C) 2018 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2018-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. @@ -72,6 +72,7 @@ public class BusTopicParams { private String clientName; private String hostname; private String basePath; + private String serializationProvider; public static TopicParamsBuilder builder() { return new TopicParamsBuilder(); @@ -254,6 +255,10 @@ public class BusTopicParams { return additionalProps != null; } + public String getSerializationProvider() { + return serializationProvider; + } + public static class TopicParamsBuilder { final BusTopicParams params = new BusTopicParams(); @@ -385,6 +390,11 @@ public class BusTopicParams { return this; } + public TopicParamsBuilder serializationProvider(String serializationProvider) { + this.params.serializationProvider = serializationProvider; + return this; + } + } } -- cgit 1.2.3-korg