import com.google.gson.Gson;
-//import org.slf4j.Logger;
-//import org.slf4j.LoggerFactory;
-
import java.util.ArrayList;
+import java.util.List;
import java.util.UUID;
-
import org.onap.aai.esr.entity.aai.EsrSystemInfo;
import org.onap.aai.esr.entity.aai.EsrSystemInfoList;
public class ExtsysUtil {
- public static String generateId() {
+ public String generateId() {
return UUID.randomUUID().toString();
}
/**
* change object to str.
*/
- public static String objectToString(Object obj) {
+ public String objectToString(Object obj) {
Gson gson = new Gson();
if (obj != null) {
return gson.toJson(obj);
public EsrSystemInfoList getEsrSystemInfoListFromAuthInfo(EsrSystemInfo esrSystemInfoObj) {
EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
- ArrayList<EsrSystemInfo> esrSystemInfo = new ArrayList<EsrSystemInfo>();
+ List<EsrSystemInfo> esrSystemInfo = new ArrayList<>();
esrSystemInfo.add(esrSystemInfoObj);
esrSystemInfoList.setEsrSystemInfo(esrSystemInfo);
return esrSystemInfoList;
}
- public EsrSystemInfoList getEsrSystemInfoListFromAuthInfoList(ArrayList<EsrSystemInfo> esrSystemInfo) {
+ public EsrSystemInfoList getEsrSystemInfoListFromAuthInfoList(List<EsrSystemInfo> esrSystemInfo) {
EsrSystemInfoList esrSystemInfoList = new EsrSystemInfoList();
esrSystemInfoList.setEsrSystemInfo(esrSystemInfo);;
return esrSystemInfoList;