APIInterface Detail UI SyncAsync 기능 추가.
This commit is contained in:
@@ -216,6 +216,20 @@ public class ApiInterfaceService extends OnlBaseService {
|
||||
apiInterfaceUI.setInboundResponseStandardMessageItems(convertMapToStdMessageItems(restOption.getStandardCommonFields()));
|
||||
}
|
||||
}
|
||||
|
||||
if("syncAsync".equals(apiInterfaceUI.getSyncAsyncType()) && serviceMessageEntityList != null && serviceMessageEntityList.size() > 1){
|
||||
ServiceMessageEntity extraServiceMessageEntity = serviceMessageEntityList.get(1);
|
||||
apiInterfaceUI.setToResponseAdapter(extraServiceMessageEntity.getPsvsysadptrbzwkgroupname());
|
||||
String restOptionStr = extraServiceMessageEntity.getRestoption();
|
||||
|
||||
if(StringUtils.isNotBlank(restOptionStr)) {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
RestOption restOption = mapper.readValue(restOptionStr, RestOption.class);
|
||||
|
||||
apiInterfaceUI.setOutboundResponseHttpMethod(restOption.getMethod());
|
||||
apiInterfaceUI.setOutboundResponseRestPath(restOption.getExtraPath());
|
||||
}
|
||||
}
|
||||
|
||||
apiInterfaceUI.setTransformYn(transformYn);
|
||||
apiInterfaceUI.setErrTransformYn(errTransformYn); // 추가
|
||||
@@ -430,8 +444,8 @@ public class ApiInterfaceService extends OnlBaseService {
|
||||
public void setServiceMessageRoutingInfo(ApiInterfaceUI vo, EAIMessageEntity eaiMessageEntity, List<ServiceMessageEntity> serviceMessageEntityList) throws Exception {
|
||||
// 기본 요청 ServiceMessageEntity 설정
|
||||
ServiceMessageEntity requestEntity = serviceMessageEntityList.get(0);
|
||||
|
||||
if ("async".equals(vo.getSyncAsyncType())) {
|
||||
|
||||
if ("async".equals(vo.getSyncAsyncType()) || "syncAsync".equals(vo.getSyncAsyncType())) {
|
||||
requestEntity.setPsvintfacdsticname("ASYN");
|
||||
}
|
||||
|
||||
@@ -462,6 +476,32 @@ public class ApiInterfaceService extends OnlBaseService {
|
||||
|
||||
setRouteInfo(vo, vo.getInboundResponseHttpMethod(), vo.getInboundResponseRestPath(), vo.getFromResponseAdapter(), responseEntity, vo.getInboundResponseStandardMessageItems());
|
||||
}
|
||||
|
||||
// syncAsync 타입인 경우 응답용 ServiceMessageEntity 추가 처리
|
||||
if ("syncAsync".equals(vo.getSyncAsyncType())) {
|
||||
ServiceMessageEntity responseEntity;
|
||||
|
||||
// ServiceMessageEntity가 없으면 새로 생성
|
||||
if (serviceMessageEntityList.size() < 2) {
|
||||
responseEntity = new ServiceMessageEntity();
|
||||
responseEntity.setId(new ServiceMessageEntityId(vo.getEaiSvcName(), 2));
|
||||
responseEntity.setEaimessage(eaiMessageEntity);
|
||||
serviceMessageEntityList.add(responseEntity);
|
||||
} else {
|
||||
responseEntity = serviceMessageEntityList.get(1);
|
||||
}
|
||||
|
||||
// ServiceMessageEntity 설정
|
||||
responseEntity.setPsvsysadptrbzwkgroupname(vo.getToResponseAdapter());
|
||||
responseEntity.setPsvintfacdsticname("ASYN");
|
||||
|
||||
// REST 정보 설정
|
||||
AdapterGroupUI responseAdapter = adapterService.selectDetail(vo.getToResponseAdapter());
|
||||
String responseRoutName = getOutboundProcessorName(responseAdapter);
|
||||
responseEntity.setOutbndroutname(responseRoutName);
|
||||
|
||||
setRouteInfo(vo, vo.getOutboundResponseHttpMethod(), vo.getOutboundResponseRestPath(), vo.getToResponseAdapter(), responseEntity, vo.getStandardMessageItems());
|
||||
}
|
||||
}
|
||||
|
||||
public static List<StdMessageItemUI> convertMapToStdMessageItems(Map<String, String> standardCommonFields) {
|
||||
|
||||
@@ -54,6 +54,11 @@ public class ApiInterfaceUI {
|
||||
private String inboundResponseHttpMethod;
|
||||
private String inboundResponseRestPath;
|
||||
private String fromResponseAdapter;
|
||||
|
||||
//SYNC-ASYNC 용
|
||||
private String outboundResponseHttpMethod;
|
||||
private String outboundResponseRestPath;
|
||||
private String toResponseAdapter;
|
||||
|
||||
private String inboundErrResponseLayout;
|
||||
private String errResponseTransform;
|
||||
|
||||
Reference in New Issue
Block a user