summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers
diff options
context:
space:
mode:
Diffstat (limited to 'mso-api-handlers')
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java21
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelper.java2
2 files changed, 13 insertions, 10 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
index d11f1706e9..e6e81671cf 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/common/CamundaClient.java
@@ -49,6 +49,9 @@ import com.fasterxml.jackson.databind.SerializationFeature;
public class CamundaClient extends RequestClient {
private static Logger logger = LoggerFactory.getLogger(CamundaClient.class);
private static final String CAMUNDA_URL_MESAGE = "Camunda url is: ";
+ private static final String CAMUNDA_RESPONSE = "Response is: {}";
+ private static final String AUTHORIZATION = "Authorization";
+ private static final String BASIC = "Basic ";
public CamundaClient() {
super(CommonConstants.CAMUNDA);
@@ -71,7 +74,7 @@ public class CamundaClient extends RequestClient {
setupHeaders(post);
HttpResponse response = client.execute(post);
- logger.debug("Response is: {}", response);
+ logger.debug(CAMUNDA_RESPONSE, response);
return response;
}
@@ -88,8 +91,8 @@ public class CamundaClient extends RequestClient {
String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH,
props.getProperty(CommonConstants.ENCRYPTION_KEY_PROP));
if (userCredentials != null) {
- post.addHeader("Authorization",
- "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
+ post.addHeader(AUTHORIZATION,
+ BASIC + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
}
}
}
@@ -111,8 +114,8 @@ public class CamundaClient extends RequestClient {
String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH,
props.getProperty(CommonConstants.ENCRYPTION_KEY_PROP));
if (userCredentials != null) {
- post.addHeader("Authorization",
- "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
+ post.addHeader(AUTHORIZATION,
+ BASIC + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
}
}
}
@@ -120,7 +123,7 @@ public class CamundaClient extends RequestClient {
post.setEntity(input);
HttpResponse response = client.execute(post);
- logger.debug("Response is: {}", response);
+ logger.debug(CAMUNDA_RESPONSE, response);
return response;
}
@@ -151,15 +154,15 @@ public class CamundaClient extends RequestClient {
String userCredentials = getEncryptedPropValue(encryptedCredentials, CommonConstants.DEFAULT_BPEL_AUTH,
props.getProperty(CommonConstants.ENCRYPTION_KEY_PROP));
if (userCredentials != null) {
- post.addHeader("Authorization",
- "Basic " + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
+ post.addHeader(AUTHORIZATION,
+ BASIC + new String(DatatypeConverter.printBase64Binary(userCredentials.getBytes())));
}
}
}
post.setEntity(input);
HttpResponse response = client.execute(post);
- logger.debug("Response is: {}", response);
+ logger.debug(CAMUNDA_RESPONSE, response);
return response;
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelper.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelper.java
index 8b3b91ae1a..d9db5713a7 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelper.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/AAIClientHelper.java
@@ -42,7 +42,7 @@ import org.springframework.stereotype.Component;
@Component
public class AAIClientHelper {
- private static Logger logger = LoggerFactory.getLogger(AAIClientHelper.class);
+
/**
* Get managing ECOMP Environment Info from A&AI