From 0578fc4948e8e98e5fe92e63832336f0b7e17e85 Mon Sep 17 00:00:00 2001 From: subhash kumar singh Date: Thu, 15 Nov 2018 12:27:09 +0530 Subject: Fix auth token for request-db Fix auth token for request-db. Change-Id: I898781b2294392c5cd55df6fccd173f7274bc660 Issue-ID: SO-689 Signed-off-by: subhash kumar singh --- .../adapters/requestsdb/MsoRequestsDbAdapter.java | 11 ++++++++ .../requestsdb/MsoRequestsDbAdapterImpl.java | 32 ++++++++++++++++++++++ 2 files changed, 43 insertions(+) (limited to 'adapters') diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java index e28bdb2f96..0c2a49ae53 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapter.java @@ -72,6 +72,17 @@ public interface MsoRequestsDbAdapter { @WebParam(name = "progress") @XmlElement(required = false) String progress, @WebParam(name = "reason") @XmlElement(required = false) String reason) throws MsoRequestsDbException; + @WebMethod + public void initServiceOperationStatus( + @WebParam(name = "serviceId") @XmlElement(required = true) String serviceId, + @WebParam(name = "operationId") @XmlElement(required = false) String operationId, + @WebParam(name = "operationType") @XmlElement(required = false) String operationType, + @WebParam(name = "userId") @XmlElement(required = false) String userId, + @WebParam(name = "result") @XmlElement(required = false) String result, + @WebParam(name = "operationContent") @XmlElement(required = false) String operationContent, + @WebParam(name = "progress") @XmlElement(required = false) String progress, + @WebParam(name = "reason") @XmlElement(required = false) String reason) throws MsoRequestsDbException; + @WebMethod public void initResourceOperationStatus(@WebParam(name = "serviceId") @XmlElement(required = true) String serviceId, @WebParam(name = "operationId") @XmlElement(required = true) String operationId, diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java index 33b1028cbb..62e7e2e43c 100644 --- a/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java +++ b/adapters/mso-requests-db-adapter/src/main/java/org/onap/so/adapters/requestsdb/MsoRequestsDbAdapterImpl.java @@ -214,6 +214,38 @@ public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter { operationStatusRepository.save(operStatus); } + /** + * Init operation status
+ * + * @param serviceId + * @param operationId + * @param operationType + * @param userId + * @param result + * @param operationContent + * @param progress + * @param reason + * @throws MsoRequestsDbException + * @since ONAP Casablanca Release + */ + @Override + @Transactional + public void initServiceOperationStatus(String serviceId, String operationId, String operationType, String userId, + String result, String operationContent, String progress, String reason) throws MsoRequestsDbException { + OperationStatus operStatus = new OperationStatus(); + + operStatus.setOperationId(operationId); + operStatus.setServiceId(serviceId); + operStatus.setUserId(userId); + operStatus.setOperation(operationType); + operStatus.setReason(reason); + operStatus.setProgress(progress); + operStatus.setResult(result); + operStatus.setOperationContent(operationContent); + operStatus.setResult(result); + operationStatusRepository.save(operStatus); + } + /** * init the operation status of all the resources
* -- cgit 1.2.3-korg