Mocked test cases for NetconfDataAccessServiceImpl
[appc.git] / appc-adapters / appc-netconf-adapter / appc-netconf-adapter-bundle / src / main / java / org / onap / appc / adapter / netconf / internal / NetconfDataAccessServiceImpl.java
index 6ed181d..ce29451 100644 (file)
@@ -2,7 +2,7 @@
  * ============LICENSE_START=======================================================
  * ONAP : APPC
  * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Copyright (C) 2017 Amdocs
  * =============================================================================
@@ -18,7 +18,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * 
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
  * ============LICENSE_END=========================================================
  */
 
@@ -41,18 +40,20 @@ public class NetconfDataAccessServiceImpl implements NetconfDataAccessService {
 
     private final EELFLogger logger = EELFManager.getInstance().getLogger(NetconfDataAccessServiceImpl.class);
 
+    private String schema;
+
+    private DbLibService dbLibService;
+
+    @Override
     public void setSchema(String schema) {
         this.schema = schema;
     }
 
-    private String schema;
-
+    @Override
     public void setDbLibService(DbLibService service) {dbLibService = service;}
 
-    private DbLibService dbLibService;
-
     @Override
-    public String retrieveConfigFileName(String xmlID) throws DataAccessException {
+    public String retrieveConfigFileName(String xmlID) {
         String fileContent = "";
 
         String queryString = "select " + Constants.FILE_CONTENT_TABLE_FIELD_NAME + " " +
@@ -76,8 +77,7 @@ public class NetconfDataAccessServiceImpl implements NetconfDataAccessService {
     }
 
     @Override
-    public boolean retrieveConnectionDetails(String vnfType, ConnectionDetails connectionDetails) throws
-                    DataAccessException {
+    public boolean retrieveConnectionDetails(String vnfType, ConnectionDetails connectionDetails) {
         boolean recordFound = false;
 
         String queryString = "select " + Constants.USER_NAME_TABLE_FIELD_NAME + "," +
@@ -105,8 +105,7 @@ public class NetconfDataAccessServiceImpl implements NetconfDataAccessService {
     }
 
     @Override
-    public boolean retrieveNetconfConnectionDetails(String vnfType, NetconfConnectionDetails connectionDetails)
-            throws DataAccessException {
+    public boolean retrieveNetconfConnectionDetails(String vnfType, NetconfConnectionDetails connectionDetails) {
         ConnectionDetails connDetails = new ConnectionDetails();
         if(this.retrieveConnectionDetails(vnfType, connDetails))
         {
@@ -119,8 +118,7 @@ public class NetconfDataAccessServiceImpl implements NetconfDataAccessService {
     }
 
     @Override
-    public boolean logDeviceInteraction(String instanceId, String requestId, String creationDate, String logText)
-            throws DataAccessException {
+    public boolean logDeviceInteraction(String instanceId, String requestId, String creationDate, String logText) {
         String queryString = "INSERT INTO "+ Constants.DEVICE_INTERFACE_LOG_TABLE_NAME+"("+
                 Constants.SERVICE_INSTANCE_ID_FIELD_NAME+","+
                 Constants.REQUEST_ID_FIELD_NAME+","+