summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-requests-db
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2019-03-13 15:43:33 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-03-13 16:04:51 -0400
commit88953d4f6c0ae360e6fb5d6967fc71dcc3652b4a (patch)
tree91d6e1d0c5d833fbf96f1feac2a9b49a73755c40 /mso-api-handlers/mso-requests-db
parent7321d01bda3524066d5a76276a4511554b7a4062 (diff)
Added param requestId to query 1 row
Added param requestId to uniquely query 1 row from model distribution status db. Change-Id: Ice8db174166e6a00d211f191dcf5537eef729127 Issue-ID: SO-1651 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'mso-api-handlers/mso-requests-db')
-rw-r--r--mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java
index b809691b31..5958397851 100644
--- a/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java
+++ b/mso-api-handlers/mso-requests-db/src/main/java/org/onap/so/db/request/client/RequestsDbClient.java
@@ -96,7 +96,7 @@ public class RequestsDbClient {
private String findOneByServiceIdAndOperationIdURI = "/findOneByServiceIdAndOperationId";
- private String findOneByOperationalEnvIdAndServiceModelVersionIdURI = "/findOneByOperationalEnvIdAndServiceModelVersionId";
+ private String findOneByOperationalEnvIdAndServiceModelVersionIdAndRequestIdURI = "/findOneByOperationalEnvIdAndServiceModelVersionIdAndRequestId";
private String findAllByOperationalEnvIdAndRequestIdURI = "/findAllByOperationalEnvIdAndRequestId";
@@ -123,7 +123,7 @@ public class RequestsDbClient {
findOneByServiceIdAndOperationIdURI = endpoint + OPERATION_STATUS_SEARCH + findOneByServiceIdAndOperationIdURI;
requestProcessingDataURI = endpoint + requestProcessingDataURI;
operationalEnvDistributionStatusURI = endpoint + operationalEnvDistributionStatusURI;
- findOneByOperationalEnvIdAndServiceModelVersionIdURI = endpoint + OPERATIONAL_ENV_SERVICE_MODEL_STATUS_SEARCH + findOneByOperationalEnvIdAndServiceModelVersionIdURI;
+ findOneByOperationalEnvIdAndServiceModelVersionIdAndRequestIdURI = endpoint + OPERATIONAL_ENV_SERVICE_MODEL_STATUS_SEARCH + findOneByOperationalEnvIdAndServiceModelVersionIdAndRequestIdURI;
findAllByOperationalEnvIdAndRequestIdURI = endpoint + OPERATIONAL_ENV_SERVICE_MODEL_STATUS_SEARCH + findAllByOperationalEnvIdAndRequestIdURI;
}
@@ -227,16 +227,18 @@ public class RequestsDbClient {
}
}
- public OperationalEnvServiceModelStatus findOneByOperationalEnvIdAndServiceModelVersionId(String operationalEnvironmentId, String serviceModelVersionId) {
+ public OperationalEnvServiceModelStatus findOneByOperationalEnvIdAndServiceModelVersionIdAndRequestId(String operationalEnvironmentId, String serviceModelVersionId, String requestId) {
try {
HttpEntity<?> entity = getHttpEntity();
- OperationalEnvServiceModelStatus modelStatus = restTemplate.exchange(getUri(UriBuilder.fromUri(findOneByOperationalEnvIdAndServiceModelVersionIdURI)
+ OperationalEnvServiceModelStatus modelStatus = restTemplate.exchange(getUri(UriBuilder.fromUri(findOneByOperationalEnvIdAndServiceModelVersionIdAndRequestIdURI)
.queryParam(OPERATIONAL_ENVIRONMENT_ID, operationalEnvironmentId)
.queryParam(SERVICE_MODEL_VERSION_ID, serviceModelVersionId)
+ .queryParam(REQUEST_ID, requestId)
.build().toString()), HttpMethod.GET, entity, OperationalEnvServiceModelStatus.class).getBody();
if (null != modelStatus) {
modelStatus.setOperationalEnvId(operationalEnvironmentId);
modelStatus.setServiceModelVersionId(serviceModelVersionId);
+ modelStatus.setRequestId(requestId);
}
return modelStatus;
}catch(HttpClientErrorException e){