aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaResponse.java4
-rw-r--r--mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java10
2 files changed, 7 insertions, 7 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaResponse.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaResponse.java
index 8977f11e36..7fb5df7af6 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaResponse.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/camundabeans/CamundaResponse.java
@@ -40,6 +40,8 @@ public class CamundaResponse {
@JsonProperty("variables")
private String variables;
+ public CamundaResponse() {}
+
public String getProcessInstanceID() {
return processInstanceID;
}
@@ -56,8 +58,6 @@ public class CamundaResponse {
this.variables = variables;
}
- public CamundaResponse() {}
-
public String getResponse() {
return response;
}
diff --git a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
index b3d57b0137..3c4b1fa66b 100644
--- a/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
+++ b/mso-api-handlers/mso-requests-db-repositories/src/main/java/org/onap/so/db/request/data/repository/InfraActiveRequestsRepositoryImpl.java
@@ -89,6 +89,7 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
protected static final String REQUEST_ID = "requestId";
protected static final String REQUESTOR_ID = "requestorId";
protected static final String ACTION = "action";
+ protected static final String OPENV = "operationalEnvironment";
private static final List<String> VALID_COLUMNS =
Arrays.asList(REQUEST_ID, SERVICE_INSTANCE_ID, SERVICE_INSTANCE_NAME, ACTION, REQUEST_STATUS);
@@ -173,13 +174,13 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
predicates.add(cb.equal(tableRoot.get(NETWORK_INSTANCE_NAME), instanceName));
} else if (requestScope.equals("configuration")) {
predicates.add(cb.equal(tableRoot.get(CONFIGURATION_INSTANCE_NAME), instanceName));
- } else if (requestScope.equals("operationalEnvironment")) {
+ } else if (requestScope.equals(OPENV)) {
predicates.add(cb.equal(tableRoot.get(OPERATIONAL_ENV_NAME), instanceName));
}
} else {
if (instanceIdMap != null) {
- if ("service".equals(requestScope) && instanceIdMap.get("serviceInstanceId") != null) {
+ if ("service".equals(requestScope) && instanceIdMap.get(SERVICE_INSTANCE_ID) != null) {
predicates
.add(cb.equal(tableRoot.get(SERVICE_INSTANCE_ID), instanceIdMap.get("serviceInstanceId")));
}
@@ -208,8 +209,7 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
instanceIdMap.get("configurationInstanceId")));
}
- if (requestScope.equals("operationalEnvironment")
- && instanceIdMap.get("operationalEnvironmentId") != null) {
+ if (requestScope.equals(OPENV) && instanceIdMap.get("operationalEnvironmentId") != null) {
predicates.add(
cb.equal(tableRoot.get(OPERATIONAL_ENV_ID), instanceIdMap.get("operationalEnvironmentId")));
}
@@ -336,7 +336,7 @@ public class InfraActiveRequestsRepositoryImpl implements InfraActiveRequestsRep
// as the same requestorId can also match on different API methods
final String resourceType = orchestrationMap.get("resourceType");
if (resourceType == null) {
- predicates.add(cb.equal(tableRoot.get("requestScope"), "operationalEnvironment"));
+ predicates.add(cb.equal(tableRoot.get("requestScope"), OPENV));
}
for (final Map.Entry<String, String> entry : orchestrationMap.entrySet()) {