summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-03-20 14:51:16 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-03-20 14:51:35 -0400
commit5037c628916cd5a52c8587d0ab8696fd32153a94 (patch)
treea9ec965abc5ddd8e96aac37d070e0ac57d1b3f20 /bpmn
parent353782a4d50f3764f71916385dc062401aa7456d (diff)
moved object declarations from class level
moved object declarations from class level to methods Change-Id: Ifaae789120d5838380840dee4d207495e55dbe5c Issue-ID: SO-1688 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java
index 99d5fca31f..cae4a19f20 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sdnc/SDNCClient.java
@@ -42,7 +42,6 @@ import org.springframework.stereotype.Component;
public class SDNCClient {
private static final Logger logger = LoggerFactory.getLogger(SDNCClient.class);
- private BaseClient<String, LinkedHashMap<String, Object>> STOClient = new BaseClient<>();
@Autowired
private SDNCProperties properties;
@@ -61,6 +60,8 @@ public class SDNCClient {
public String post(Object request, SDNCTopology topology) throws MapperException, BadResponseException {
String jsonRequest = sdnCommonTasks.buildJsonRequest(request);
String targetUrl = properties.getHost() + properties.getPath() + ":" + topology.toString() + "/";
+ BaseClient<String, LinkedHashMap<String, Object>> STOClient = new BaseClient<>();
+
STOClient.setTargetUrl(targetUrl);
HttpHeaders httpHeader = sdnCommonTasks.getHttpHeaders(properties.getAuth());
STOClient.setHttpHeader(httpHeader);
@@ -70,7 +71,8 @@ public class SDNCClient {
public String post(Object request, String url) throws MapperException, BadResponseException {
- String jsonRequest = sdnCommonTasks.buildJsonRequest(request);
+ String jsonRequest = sdnCommonTasks.buildJsonRequest(request);
+ BaseClient<String, LinkedHashMap<String, Object>> STOClient = new BaseClient<>();
STOClient.setTargetUrl(url);
HttpHeaders httpHeader = sdnCommonTasks.getHttpHeaders(properties.getAuth());
STOClient.setHttpHeader(httpHeader);
@@ -91,7 +93,8 @@ public class SDNCClient {
public String get(String queryLink) throws MapperException, BadResponseException {
String request = "";
String jsonRequest = sdnCommonTasks.buildJsonRequest(request);
- String targetUrl = UriBuilder.fromUri(properties.getHost()).path(queryLink).build().toString();
+ String targetUrl = UriBuilder.fromUri(properties.getHost()).path(queryLink).build().toString();
+ BaseClient<String, LinkedHashMap<String, Object>> STOClient = new BaseClient<>();
STOClient.setTargetUrl(targetUrl);
HttpHeaders httpHeader = sdnCommonTasks.getHttpHeaders(properties.getAuth());
STOClient.setHttpHeader(httpHeader);