- 전문변환 한쪽만 존재 할 경우에도 복제 할 수 있도록 수정
This commit is contained in:
@@ -1180,17 +1180,54 @@ public class ApiInterfaceService extends OnlBaseService {
|
|||||||
apiInterfaceUI.setInboundRestPath(newInboundRestPath);
|
apiInterfaceUI.setInboundRestPath(newInboundRestPath);
|
||||||
|
|
||||||
if ("Y".equals(apiInterfaceUI.getTransformYn())) {
|
if ("Y".equals(apiInterfaceUI.getTransformYn())) {
|
||||||
apiInterfaceUI.setInboundRequestLayout(changeToTargetLayoutUI(layoutManService.getLayoutUiToExport(apiInterfaceUI.getInboundRequestLayout()), newBizCd, newApiInterfaceId));
|
|
||||||
apiInterfaceUI.setOutboundRequestLayout(changeToTargetLayoutUI(layoutManService.getLayoutUiToExport(apiInterfaceUI.getOutboundRequestLayout()), newBizCd, newApiInterfaceId));
|
String newInReq = processLayoutIfExist(apiInterfaceUI.getInboundRequestLayout(), newBizCd, newApiInterfaceId);
|
||||||
apiInterfaceUI.setOutboundResponseLayout(changeToTargetLayoutUI(layoutManService.getLayoutUiToExport(apiInterfaceUI.getOutboundResponseLayout()), newBizCd, newApiInterfaceId));
|
String newOutReq = processLayoutIfExist(apiInterfaceUI.getOutboundRequestLayout(), newBizCd, newApiInterfaceId);
|
||||||
apiInterfaceUI.setInboundResponseLayout(changeToTargetLayoutUI(layoutManService.getLayoutUiToExport(apiInterfaceUI.getInboundResponseLayout()), newBizCd, newApiInterfaceId));
|
String newOutRes = processLayoutIfExist(apiInterfaceUI.getOutboundResponseLayout(), newBizCd, newApiInterfaceId);
|
||||||
|
String newInRes = processLayoutIfExist(apiInterfaceUI.getInboundResponseLayout(), newBizCd, newApiInterfaceId);
|
||||||
apiInterfaceUI.setRequestTransform(changeToTargetTransformUI(transform2Service.getTransformUiToExport(apiInterfaceUI.getRequestTransform()), newBizCd, newApiInterfaceId, apiInterfaceUI.getInboundRequestLayout(), apiInterfaceUI.getOutboundRequestLayout()));
|
|
||||||
apiInterfaceUI.setResponseTransform(changeToTargetTransformUI(transform2Service.getTransformUiToExport(apiInterfaceUI.getResponseTransform()), newBizCd, newApiInterfaceId, apiInterfaceUI.getOutboundResponseLayout(), apiInterfaceUI.getInboundResponseLayout()));
|
apiInterfaceUI.setInboundRequestLayout(newInReq);
|
||||||
|
apiInterfaceUI.setOutboundRequestLayout(newOutReq);
|
||||||
|
apiInterfaceUI.setOutboundResponseLayout(newOutRes);
|
||||||
|
apiInterfaceUI.setInboundResponseLayout(newInRes);
|
||||||
|
|
||||||
|
if (newInReq != null && newOutReq != null) {
|
||||||
|
apiInterfaceUI.setRequestTransform(
|
||||||
|
changeToTargetTransformUI(
|
||||||
|
transform2Service.getTransformUiToExport(apiInterfaceUI.getRequestTransform()),
|
||||||
|
newBizCd, newApiInterfaceId, newInReq, newOutReq
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newOutRes != null && newInRes != null) {
|
||||||
|
apiInterfaceUI.setResponseTransform(
|
||||||
|
changeToTargetTransformUI(
|
||||||
|
transform2Service.getTransformUiToExport(apiInterfaceUI.getResponseTransform()),
|
||||||
|
newBizCd, newApiInterfaceId, newOutRes, newInRes
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
importApiInterfaceUi(apiInterfaceUI, importDupliCheck);
|
importApiInterfaceUi(apiInterfaceUI, importDupliCheck);
|
||||||
|
|
||||||
return apiInterfaceUI;
|
return apiInterfaceUI;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 복제시 레이아웃 정보가 있는 경우에만 변환 로직을 수행
|
||||||
|
*/
|
||||||
|
private String processLayoutIfExist(String layoutId, String newBizCd, String newApiInterfaceId) {
|
||||||
|
|
||||||
|
if (layoutId == null || layoutId.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
LayoutUI layoutEntity = layoutManService.getLayoutUiToExport(layoutId);
|
||||||
|
|
||||||
|
return changeToTargetLayoutUI(layoutEntity, newBizCd, newApiInterfaceId);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user