aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoBusinessLogicNew.java
diff options
context:
space:
mode:
authorOfir Sonsino <os0695@att.com>2017-09-20 14:08:19 +0300
committerOfir Sonsino <os0695@att.com>2017-09-20 14:14:56 +0300
commit1ba64a4a45f26e8bdb58e866e540aa58f32e2e52 (patch)
treedac3ada662bb141fe986526d13b2436032e5012e /vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoBusinessLogicNew.java
parentcbdd17f586a4914890bd2b26ee91be135568f38c (diff)
Change management and PNF support
Issue-ID: VID-44, VID-48, VID-49, VID-50, VID-51, VID-52 Change-Id: I83e940aad2e4e294a0927b546c4c08ca8e539a65 Signed-off-by: Ofir Sonsino <os0695@att.com>
Diffstat (limited to 'vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoBusinessLogicNew.java')
-rw-r--r--vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoBusinessLogicNew.java67
1 files changed, 67 insertions, 0 deletions
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoBusinessLogicNew.java b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoBusinessLogicNew.java
new file mode 100644
index 000000000..1afb2df21
--- /dev/null
+++ b/vid-app-common/src/main/java/org/openecomp/vid/mso/rest/MsoBusinessLogicNew.java
@@ -0,0 +1,67 @@
+package org.openecomp.vid.mso.rest;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.vid.mso.MsoClientFactory;
+import org.openecomp.vid.mso.MsoInterface;
+import org.openecomp.vid.mso.MsoResponseWrapper;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * Created by pickjonathan on 21/06/2017.
+ * This class was created only for testing the new logic.
+ * It is not used by any of the controllers binded to the ui.
+ * This can be deleted in the future in order to keep a cleaner project.
+ * If deleting please dont forget to delete the controllers, factory and all involved in the assert test.
+ */
+public class MsoBusinessLogicNew {
+
+ /**
+ * \
+ * The MSO Client
+ */
+ private MsoInterface msoClient;
+
+ private MsoInterface msoRestTempClient;
+
+ /**
+ * The logger.
+ */
+ EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoBusinessLogicNew.class);
+
+ /**
+ * The Constant dateFormat.
+ */
+ final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
+
+ public MsoBusinessLogicNew() {
+ msoClient = MsoClientFactory.getInstance();
+ msoRestTempClient = new MsoRestClientNew();
+ }
+
+ public MsoResponseWrapper createSvcInstance(RequestDetails msoRequest) throws Exception {
+ String methodName = "createSvcInstance ";
+ logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+// String endpoint = SystemProperties.getProperty(MsoProperties.MSO_REST_API_SVC_INSTANCE);
+//
+// MsoResponseWrapper w = createInstance(msoRequest, p);
+
+ MsoResponseWrapper w = msoClient.createSvcInstance(msoRequest, "");
+
+ return w;
+ }
+
+
+ public MsoResponseWrapper createSvcInstanceRest(RequestDetails msoRequest) throws Exception {
+ String methodName = "createSvcInstance ";
+ logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
+
+
+ MsoResponseWrapper w = msoRestTempClient.createSvcInstance(msoRequest, "");
+
+ return w;
+ }
+}