Change the exception throw way for VIM register.
[aai/esr-server.git] / esr-mgr / src / main / java / org / onap / aai / esr / util / ThirdpartySdncManagerUtil.java
index 2cf4a0a..d0f61ca 100644 (file)
@@ -24,10 +24,11 @@ import org.onap.aai.esr.entity.aai.EsrThirdpartySdncDetail;
 import org.onap.aai.esr.entity.rest.ThirdpartySdncRegisterInfo;
 
 public class ThirdpartySdncManagerUtil {
+  private static ExtsysUtil extsysUtil = new ExtsysUtil();
   
-  public static EsrThirdpartySdncDetail sdncRegisterInfo2EsrSdnc(ThirdpartySdncRegisterInfo sdncRegisterInfo) {
+  public EsrThirdpartySdncDetail sdncRegisterInfo2EsrSdnc(ThirdpartySdncRegisterInfo sdncRegisterInfo) {
     EsrThirdpartySdncDetail esrThirdpartySdnc = new EsrThirdpartySdncDetail();
-    sdncRegisterInfo.setThirdpartySdncId(ExtsysUtil.generateId());
+    sdncRegisterInfo.setThirdpartySdncId(extsysUtil.generateId());
     esrThirdpartySdnc.setThirdpartySdncId(sdncRegisterInfo.getThirdpartySdncId());
     esrThirdpartySdnc.setLocation(sdncRegisterInfo.getLocation());
     esrThirdpartySdnc.setProductName(sdncRegisterInfo.getProductName());
@@ -35,11 +36,11 @@ public class ThirdpartySdncManagerUtil {
     return esrThirdpartySdnc;
   }
   
-  private static EsrSystemInfoList getEsrSystemInfoList(ThirdpartySdncRegisterInfo sdncRegisterInfo) {
+  private EsrSystemInfoList getEsrSystemInfoList(ThirdpartySdncRegisterInfo sdncRegisterInfo) {
     EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
     ArrayList<EsrSystemInfo> esrSystemInfo = new ArrayList<EsrSystemInfo>();
     EsrSystemInfo authInfo = new EsrSystemInfo();
-    authInfo.setEsrSystemInfoId(ExtsysUtil.generateId());
+    authInfo.setEsrSystemInfoId(extsysUtil.generateId());
     authInfo.setVersion(sdncRegisterInfo.getVersion());
     authInfo.setSystemName(sdncRegisterInfo.getName());
     authInfo.setServiceUrl(sdncRegisterInfo.getUrl());
@@ -54,7 +55,7 @@ public class ThirdpartySdncManagerUtil {
     return esrSystemInfoList;
   }
 
-  public static ThirdpartySdncRegisterInfo esrSdnc2SdncRegisterInfo(EsrThirdpartySdncDetail esrSdnc) {
+  public ThirdpartySdncRegisterInfo esrSdnc2SdncRegisterInfo(EsrThirdpartySdncDetail esrSdnc) {
     ThirdpartySdncRegisterInfo registerSdncInfo = new ThirdpartySdncRegisterInfo();
     EsrSystemInfo esrSystemInfo = esrSdnc.getEsrSystemInfoList().getEsrSystemInfo().get(0);
     registerSdncInfo.setThirdpartySdncId(esrSdnc.getThirdpartySdncId());