summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOMockServer/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOMockServer/src/main/java')
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/FileUtil.java21
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterMockTransformer.java2
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java6
-rw-r--r--bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterCreateMockTransformer.java6
4 files changed, 27 insertions, 8 deletions
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/FileUtil.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/FileUtil.java
index a2076331a3..40539fa1bd 100644
--- a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/FileUtil.java
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/FileUtil.java
@@ -2,7 +2,8 @@
* ============LICENSE_START=======================================================
* ONAP - SO
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,9 +23,26 @@ package org.openecomp.mso.bpmn.mock;
import java.io.IOException;
import java.io.InputStream;
+import org.openecomp.mso.logger.MsoLogger;
+/**
+ *
+ * File utility class.<br/>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version ONAP Sep 15, 2017
+ */
public class FileUtil {
+ private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+
+ private FileUtil() {
+ /**
+ * Constructor.
+ */
+ }
/**
* Read the specified resource file and return the contents as a String.
*
@@ -42,6 +60,7 @@ public class FileUtil {
stream.close();
return new String(bytes);
} catch (IOException e) {
+ LOGGER.debug("Exception:", e);
return "";
}
}
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterMockTransformer.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterMockTransformer.java
index 1f17a8bf31..848751f055 100644
--- a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterMockTransformer.java
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterMockTransformer.java
@@ -127,7 +127,7 @@ public class SDNCAdapterMockTransformer extends ResponseTransformer {
} catch (InterruptedException e1) {
LOGGER.debug("Exception :",e1);
}
- System.out.println("Sending callback response:" + callbackUrl);
+ LOGGER.debug("Sending callback response:" + callbackUrl);
ClientRequest request = new ClientRequest(callbackUrl);
request.body("text/xml", payLoad);
System.err.println(payLoad);
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java
index b782c05d38..36abbdc5ca 100644
--- a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/SDNCAdapterNetworkTopologyMockTransformer.java
@@ -117,16 +117,16 @@ public class SDNCAdapterNetworkTopologyMockTransformer extends ResponseTransform
// TODO Auto-generated catch block
LOGGER.debug("Exception :",e1);
}
- System.out.println("Sending callback response to url: " + callbackUrl);
+ LOGGER.debug("Sending callback response to url: " + callbackUrl);
ClientRequest request = new ClientRequest(callbackUrl);
request.body("text/xml", payLoad);
//System.err.println(payLoad);
try {
ClientResponse result = request.post();
- System.out.println("Successfully posted callback? Status: " + result.getStatus());
+ LOGGER.debug("Successfully posted callback? Status: " + result.getStatus());
} catch (Exception e) {
// TODO Auto-generated catch block
- System.out.println("catch error in - request.post() ");
+ LOGGER.debug("catch error in - request.post() ");
LOGGER.debug("Exception :",e);
}
}
diff --git a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterCreateMockTransformer.java b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterCreateMockTransformer.java
index ebedca8550..5bcab6a2ab 100644
--- a/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterCreateMockTransformer.java
+++ b/bpmn/MSOMockServer/src/main/java/org/openecomp/mso/bpmn/mock/VnfAdapterCreateMockTransformer.java
@@ -132,18 +132,18 @@ public class VnfAdapterCreateMockTransformer extends ResponseTransformer {
// TODO Auto-generated catch block
LOGGER.debug("Exception :",e1);
}
- System.out.println("Sending callback response to url: " + callbackUrl);
+ LOGGER.debug("Sending callback response to url: " + callbackUrl);
ClientRequest request = new ClientRequest(callbackUrl);
request.body("text/xml", payLoad);
//System.out.println("payLoad: " + payLoad);
try {
ClientResponse result = request.post();
- System.out.println("Successfully posted callback? Status: " + result.getStatus());
+ LOGGER.debug("Successfully posted callback? Status: " + result.getStatus());
//System.err.println("Successfully posted callback:" + result.getStatus());
} catch (Exception e) {
// TODO Auto-generated catch block
- System.out.println("catch error in - request.post() ");
+ LOGGER.debug("catch error in - request.post() ");
LOGGER.debug("Exception :",e);
}
}