1 package org.openecomp.vid.mso.rest;
3 import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
4 import org.openecomp.vid.mso.MsoClientFactory;
5 import org.openecomp.vid.mso.MsoInterface;
6 import org.openecomp.vid.mso.MsoResponseWrapper;
8 import java.text.DateFormat;
9 import java.text.SimpleDateFormat;
10 import java.util.Date;
13 * Created by pickjonathan on 21/06/2017.
14 * This class was created only for testing the new logic.
15 * It is not used by any of the controllers binded to the ui.
16 * This can be deleted in the future in order to keep a cleaner project.
17 * If deleting please dont forget to delete the controllers, factory and all involved in the assert test.
19 public class MsoBusinessLogicNew {
25 private MsoInterface msoClient;
27 private MsoInterface msoRestTempClient;
32 EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MsoBusinessLogicNew.class);
35 * The Constant dateFormat.
37 final static DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss:SSSS");
39 public MsoBusinessLogicNew() {
40 msoClient = MsoClientFactory.getInstance();
41 msoRestTempClient = new MsoRestClientNew();
44 public MsoResponseWrapper createSvcInstance(RequestDetails msoRequest) throws Exception {
45 String methodName = "createSvcInstance ";
46 logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
48 // String endpoint = SystemProperties.getProperty(MsoProperties.MSO_REST_API_SVC_INSTANCE);
50 // MsoResponseWrapper w = createInstance(msoRequest, p);
52 MsoResponseWrapper w = msoClient.createSvcInstance(msoRequest, "");
58 public MsoResponseWrapper createSvcInstanceRest(RequestDetails msoRequest) throws Exception {
59 String methodName = "createSvcInstance ";
60 logger.debug(EELFLoggerDelegate.debugLogger, dateFormat.format(new Date()) + "<== " + methodName + " start");
63 MsoResponseWrapper w = msoRestTempClient.createSvcInstance(msoRequest, "");