diff options
author | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2019-02-19 20:05:31 -0600 |
---|---|---|
committer | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2019-02-21 11:01:09 -0600 |
commit | 4c1c6891ed6cd4a9e5c2e0b3bacd0c2df89364a7 (patch) | |
tree | 36d229cab77b42d3c2504ce7ebe1f94d656e94da /policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusTopicParams.java | |
parent | 2917a67f12e32a7337e3a9f9b9fd3de4469a921c (diff) |
Support for lab contextual topic names.
This work allows a drools application, with its drl
template to refer to the topic name by its invariable
canonical name, ie. POLICY-CL-MGT. Since the drl
is a design time artifact, it is desired to know topics
by its canonical non-changeable name.
The actual per lab environment topic name may change
on a per deployment basis, for example POLICY-CL-MGT-WINDRIVER
or POLICY-CL-MGT-TLAB. The template can still use
POLICY-CL-MGT without modification but the actual installation
configuration would use the "effectiveTopic" property to
point to the right topic on a per lab basis.
This also helps with installation (long story) since
the canonical topics will be known ahead of time.
Change-Id: I8322bf7e427569c37a76eea5ce6d5b9547cb2ff3
Issue-ID: POLICY-1534
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
Diffstat (limited to 'policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusTopicParams.java')
-rw-r--r-- | policy-endpoints/src/main/java/org/onap/policy/common/endpoints/event/comm/bus/internal/BusTopicParams.java | 12 |
1 files changed, 11 insertions, 1 deletions
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 6e3c2632..b9817abf 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 @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * policy-endpoints + * ONAP * ================================================================================ * Copyright (C) 2018 Samsung Electronics Co., Ltd. All rights reserved. * Modifications Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved. @@ -51,6 +51,7 @@ public class BusTopicParams { private List<String> servers; private Map<String, String> additionalProps; private String topic; + private String effectiveTopic; private String apiKey; private String apiSecret; private String consumerGroup; @@ -122,6 +123,10 @@ public class BusTopicParams { return topic; } + public String getEffectiveTopic() { + return effectiveTopic; + } + public String getApiKey() { return apiKey; } @@ -276,6 +281,11 @@ public class BusTopicParams { return this; } + public TopicParamsBuilder effectiveTopic(String effectiveTopic) { + this.params.effectiveTopic = effectiveTopic; + return this; + } + public TopicParamsBuilder apiKey(String apiKey) { this.params.apiKey = apiKey; return this; |