[MSO-8] Update the maven dependency

Update the maven depenency for sdc-distribution-client to cooperate with the sdc changes.

Change-Id: I2da936e5c40cb68c7181bb78307192dd5655b5dc
Signed-off-by: xg353y <xg353y@intl.att.com>
diff --git a/adapters/mso-requests-db-adapter/WebContent/WEB-INF/web.xml b/adapters/mso-requests-db-adapter/WebContent/WEB-INF/web.xml
index 7fa3f2a..d43d244 100644
--- a/adapters/mso-requests-db-adapter/WebContent/WEB-INF/web.xml
+++ b/adapters/mso-requests-db-adapter/WebContent/WEB-INF/web.xml
@@ -56,6 +56,17 @@
 	<param-value>true</param-value>

   </context-param>

 

+    <security-constraint>

+        <web-resource-collection>

+            <web-resource-name>SoapRequests</web-resource-name>

+            <description>Soap Ingress Requests</description>

+            <url-pattern>/RequestsDbAdapter</url-pattern>

+            <http-method>POST</http-method>

+        </web-resource-collection>

+        <auth-constraint>

+            <role-name>BPEL-Client</role-name>

+        </auth-constraint>

+    </security-constraint>

 	<security-constraint>

 		<web-resource-collection>

 			<web-resource-name>SiteStatus</web-resource-name>

diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapter.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapter.java
index 5b4009f..58299ea 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapter.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapter.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -32,7 +32,7 @@
 /**
  * MSO Request DB Adapter Web Service
  */
-@WebService(name = "RequestsDbAdapter", targetNamespace = "http://com.att.mso/requestsdb")
+@WebService(name = "RequestsDbAdapter", targetNamespace = "http://org.openecomp.mso/requestsdb")
 public interface MsoRequestsDbAdapter {
 
     @WebMethod
@@ -47,7 +47,8 @@
                                     @WebParam(name = "networkId") @XmlElement(required = false) String networkId,
                                     @WebParam(name = "vnfId") @XmlElement(required = false) String vnfId,
                                     @WebParam(name = "vfModuleId") @XmlElement(required = false) String vfModuleId,
-                                    @WebParam(name = "volumeGroupId") @XmlElement(required = false) String volumeGroupId) throws MsoRequestsDbException;
+                                    @WebParam(name = "volumeGroupId") @XmlElement(required = false) String volumeGroupId,
+                                    @WebParam(name = "serviceInstanceName") @XmlElement(required = false) String serviceInstanceName) throws MsoRequestsDbException;
 
     @WebMethod
     public InfraActiveRequests getInfraRequest (@WebParam(name="requestId") @XmlElement(required = true) String requestId) throws MsoRequestsDbException;
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
index e1b752a..0ff8b5f 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/MsoRequestsDbAdapterImpl.java
@@ -7,9 +7,9 @@
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,12 +34,15 @@
 import org.openecomp.mso.adapters.requestsdb.exceptions.MsoRequestsDbException;
 import org.openecomp.mso.logger.MessageEnum;
 import org.openecomp.mso.logger.MsoLogger;
-import org.openecomp.mso.requestsdb.HibernateUtil;
+import org.openecomp.mso.db.HibernateUtils;
+import org.openecomp.mso.requestsdb.HibernateUtilsRequestsDb;
 import org.openecomp.mso.requestsdb.InfraActiveRequests;
 
-@WebService(serviceName = "RequestsDbAdapter", endpointInterface = "org.openecomp.mso.adapters.requestsdb.MsoRequestsDbAdapter", targetNamespace = "http://com.att.mso/requestsdb")
+@WebService(serviceName = "RequestsDbAdapter", endpointInterface = "org.openecomp.mso.adapters.requestsdb.MsoRequestsDbAdapter", targetNamespace = "http://org.openecomp.mso/requestsdb")
 public class MsoRequestsDbAdapterImpl implements MsoRequestsDbAdapter {
 
+    protected HibernateUtils hibernateUtils = new HibernateUtilsRequestsDb ();
+    
     private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
 
     @Override
@@ -54,9 +57,10 @@
                                     String networkId,
                                     String vnfId,
                                     String vfModuleId,
-                                    String volumeGroupId) throws MsoRequestsDbException {
+                                    String volumeGroupId,
+                                    String serviceInstanceName) throws MsoRequestsDbException {
         MsoLogger.setLogContext (requestId, null);
-        Session session = HibernateUtil.getSessionFactory ().openSession ();
+        Session session = hibernateUtils.getSessionFactory ().openSession ();
         int result = 0;
         long startTime = System.currentTimeMillis ();
         try {
@@ -92,20 +96,23 @@
             if (volumeGroupId != null) {
                 queryString += "volumeGroupId = :volumeGroupId, ";
             }
+            if (serviceInstanceName != null) {
+                queryString += "serviceInstanceName = :serviceInstanceName, ";
+            }
             if (requestStatus == RequestStatusType.COMPLETE || requestStatus == RequestStatusType.FAILED) {
                 queryString += "endTime = :endTime, ";
             } else {
                 queryString += "modifyTime = :modifyTime, ";
             }
             queryString += "lastModifiedBy = :lastModifiedBy where requestId = :requestId OR clientRequestId = :requestId";
-            
-            LOGGER.debug("Executing update: " + queryString); 
-            
+
+            LOGGER.debug("Executing update: " + queryString);
+
             Query query = session.createQuery (queryString);
             query.setParameter ("requestId", requestId);
             if (statusMessage != null) {
                 query.setParameter ("statusMessage", statusMessage);
-                LOGGER.debug ("StatusMessage in updateInfraRequest is set to: " + statusMessage);               
+                LOGGER.debug ("StatusMessage in updateInfraRequest is set to: " + statusMessage);
             }
             if (responseBody != null) {
             	query.setParameter ("responseBody", responseBody);
@@ -115,7 +122,7 @@
                 query.setParameter ("requestStatus", requestStatus.toString ());
                 LOGGER.debug ("RequestStatus in updateInfraRequest is set to: " + requestStatus.toString());
             }
-            
+
             if (progress != null) {
                 query.setParameter ("progress", Long.parseLong (progress));
                 LOGGER.debug ("Progress in updateInfraRequest is set to: " + progress);
@@ -144,6 +151,10 @@
                 query.setParameter ("volumeGroupId", volumeGroupId);
                 LOGGER.debug ("VolumeGroupId in updateInfraRequest is set to: " + volumeGroupId);
             }
+            if (serviceInstanceName != null) {
+                query.setParameter ("serviceInstanceName", serviceInstanceName);
+                LOGGER.debug ("ServiceInstanceName in updateInfraRequest is set to: " + serviceInstanceName);
+            }
             Timestamp nowTimeStamp = new Timestamp (System.currentTimeMillis ());
             if (requestStatus == RequestStatusType.COMPLETE || requestStatus == RequestStatusType.FAILED) {
                 query.setParameter ("endTime", nowTimeStamp);
@@ -156,7 +167,7 @@
             LOGGER.debug ("LastModifiedBy in updateInfraRequest is set to: " + lastModifiedBy);
             result = query.executeUpdate ();
             checkIfExists (result, requestId, startTime);
-            session.getTransaction ().commit (); 
+            session.getTransaction ().commit ();
         } catch (HibernateException e) {
             String error = "Unable to update MSO Requests DB: " + e.getMessage ();
             LOGGER.error (MessageEnum.RA_CANT_UPDATE_REQUEST, "infra request parameters", requestId, "", "", MsoLogger.ErrorCode.BusinessProcesssError, "HibernateException - " + error, e);
@@ -184,7 +195,7 @@
     public InfraActiveRequests getInfraRequest (String requestId) throws MsoRequestsDbException {
         long startTime = System.currentTimeMillis ();
         MsoLogger.setLogContext (requestId, null);
-        Session session = HibernateUtil.getSessionFactory ().openSession ();
+        Session session = hibernateUtils.getSessionFactory ().openSession ();
 
         LOGGER.debug ("Call to MSO Infra RequestsDb adapter get method with request Id: " + requestId);
 
@@ -218,7 +229,7 @@
      */
     public boolean getSiteStatus (String siteName) {
         UUIDChecker.generateUUID (LOGGER);
-        Session session = HibernateUtil.getSessionFactory ().openSession ();
+        Session session = hibernateUtils.getSessionFactory ().openSession ();
 
         long startTime = System.currentTimeMillis ();
         SiteStatus siteStatus = null;
diff --git a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/exceptions/MsoRequestsDbException.java b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/exceptions/MsoRequestsDbException.java
index 8e4fcf4..5de06ca 100644
--- a/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/exceptions/MsoRequestsDbException.java
+++ b/adapters/mso-requests-db-adapter/src/main/java/org/openecomp/mso/adapters/requestsdb/exceptions/MsoRequestsDbException.java
@@ -30,7 +30,7 @@
  * 
  *
  */
-@WebFault (name="MsoRequestsDbException", faultBean="org.openecomp.mso.adapters.requestsdb.exceptions.MsoRequestsDbExceptionBean", targetNamespace="http://com.att.mso/requestsdb")
+@WebFault (name="MsoRequestsDbException", faultBean="org.openecomp.mso.adapters.requestsdb.exceptions.MsoRequestsDbExceptionBean", targetNamespace="http://org.openecomp.mso/requestsdb")
 public class MsoRequestsDbException extends Exception {
 
 	private static final long serialVersionUID = 1L;