diff options
author | 2021-01-28 13:12:40 -0500 | |
---|---|---|
committer | 2021-02-01 17:45:32 -0500 | |
commit | dd89e148932ba0acbfc6ceb4b229b001b6b8dd33 (patch) | |
tree | e377fce20812d390a07eab5d12665fe3e1903a1f /graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryClient.java | |
parent | b8b0464aa8a05a345115264084b08229f35c8413 (diff) |
allow RestClient to configure custom headers
allow RestClient to configure custom headers
always load the first implementation on the classpath
Issue-ID: SO-3495
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: I9c433cdaed33a7db6182af259421676c088a1fae
Diffstat (limited to 'graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryClient.java')
-rw-r--r-- | graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryClient.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryClient.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryClient.java index f8f977d117..af875fa274 100644 --- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryClient.java +++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/graphinventory/GraphInventoryClient.java @@ -21,22 +21,22 @@ package org.onap.aaiclient.client.graphinventory; import java.net.URI; -import java.util.Map; +import javax.ws.rs.core.MultivaluedHashMap; +import javax.ws.rs.core.MultivaluedMap; +import org.javatuples.Pair; import org.onap.aaiclient.client.graphinventory.entities.uri.GraphInventoryUri; import org.onap.aaiclient.client.graphinventory.entities.uri.HttpAwareUri; import org.onap.so.client.RestClient; import org.onap.so.client.RestProperties; import org.onap.so.client.RestPropertiesLoader; -import com.google.common.collect.ImmutableMap; public abstract class GraphInventoryClient { private RestProperties props; - protected final Map<String, String> additionalHeaders; + protected final MultivaluedMap<String, Pair<String, String>> additionalHeaders; protected GraphInventoryClient(Class<? extends RestProperties> propertiesClass, - Map<String, String> additionalHeaders) { - + MultivaluedMap<String, Pair<String, String>> additionalHeaders) { RestProperties props = RestPropertiesLoader.getInstance().getNewImpl(propertiesClass); this.props = props; this.additionalHeaders = additionalHeaders; @@ -70,7 +70,7 @@ public abstract class GraphInventoryClient { public abstract String getGraphDBName(); - public Map<String, String> getAdditionalHeaders() { - return ImmutableMap.copyOf(this.additionalHeaders); + public MultivaluedMap<String, Pair<String, String>> getAdditionalHeaders() { + return new MultivaluedHashMap<>(this.additionalHeaders); } } |