Merge branch 'jenkins_with_weblogic' of http://192.168.240.178:18080/eapim/eapim-admin.git into jenkins_with_weblogic
This commit is contained in:
@@ -303,8 +303,8 @@
|
|||||||
<div class="content_middle">
|
<div class="content_middle">
|
||||||
<div class="search_wrap">
|
<div class="search_wrap">
|
||||||
<!--어드민만 보이게 -->
|
<!--어드민만 보이게 -->
|
||||||
<span id="socketLink" style="cursor:pointer;font-size:13px;display:none;" onClick="goFilePage()"><b>[<%= localeMessage.getString("socketStat.fileDown") %>]</b></span>
|
<%-- <span id="socketLink" style="cursor:pointer;font-size:13px;display:none;" onClick="goFilePage()"><b>[<%= localeMessage.getString("socketStat.fileDown") %>]</b></span> --%>
|
||||||
<span id="socketLink2" style="cursor:pointer;font-size:13px;display:none;" onClick="goPage()"><b>[<%= localeMessage.getString("socketStat.socketMoniPop") %>]</b></span>
|
<%-- <span id="socketLink2" style="cursor:pointer;font-size:13px;display:none;" onClick="goPage()"><b>[<%= localeMessage.getString("socketStat.socketMoniPop") %>]</b></span> --%>
|
||||||
<button type="button" class="cssbtn" id="btn_excel" level="W" ><i class="material-icons">table_view</i> <%= localeMessage.getString("button.excel") %></button>
|
<button type="button" class="cssbtn" id="btn_excel" level="W" ><i class="material-icons">table_view</i> <%= localeMessage.getString("button.excel") %></button>
|
||||||
<button type="button" class="cssbtn" id="btn_search" level="R" ><i class="material-icons">search</i> <%= localeMessage.getString("button.search") %></button>
|
<button type="button" class="cssbtn" id="btn_search" level="R" ><i class="material-icons">search</i> <%= localeMessage.getString("button.search") %></button>
|
||||||
<%-- <img src="<c:url value="/img/btn_excel.png"/>" id="btn_excel" level="W"/> --%>
|
<%-- <img src="<c:url value="/img/btn_excel.png"/>" id="btn_excel" level="W"/> --%>
|
||||||
|
|||||||
@@ -1313,6 +1313,8 @@
|
|||||||
|
|
||||||
$('#functionComboDialog').val($('#functionCombo').val());
|
$('#functionComboDialog').val($('#functionCombo').val());
|
||||||
|
|
||||||
|
setSearchable("functionComboDialog");
|
||||||
|
|
||||||
mouseoverEndpoint(endpoint, 'click-endpoint');
|
mouseoverEndpoint(endpoint, 'click-endpoint');
|
||||||
moveDialogPosition(false);
|
moveDialogPosition(false);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -575,14 +575,31 @@
|
|||||||
$("input[name=searchStartDateTime]").inputmask("9999-99-99", { 'autoUnmask': true });
|
$("input[name=searchStartDateTime]").inputmask("9999-99-99", { 'autoUnmask': true });
|
||||||
$("input[name=searchEndDateTime]").inputmask("9999-99-99", { 'autoUnmask': true });
|
$("input[name=searchEndDateTime]").inputmask("9999-99-99", { 'autoUnmask': true });
|
||||||
|
|
||||||
// 기본값 설정 (이번달 1일 ~ 오늘)
|
// 기본값 설정 (어제 기준 해당 월 1일 ~ 어제)
|
||||||
var today = getToday();
|
var today = getToday();
|
||||||
|
var todayStr = today.replace(/-/g, '');
|
||||||
|
|
||||||
|
// 오늘 날짜를 Date 객체로 변환
|
||||||
|
var year = parseInt(todayStr.substring(0, 4));
|
||||||
|
var month = parseInt(todayStr.substring(4, 6));
|
||||||
|
var day = parseInt(todayStr.substring(6, 8));
|
||||||
|
var todayDate = new Date(year, month - 1, day);
|
||||||
|
|
||||||
|
// 어제 날짜 계산
|
||||||
|
todayDate.setDate(todayDate.getDate() - 1);
|
||||||
|
var yesterday = todayDate.getFullYear() + '-' +
|
||||||
|
('0' + (todayDate.getMonth() + 1)).slice(-2) + '-' +
|
||||||
|
('0' + todayDate.getDate()).slice(-2);
|
||||||
|
|
||||||
|
// 어제가 속한 달의 1일 계산
|
||||||
|
var firstDayOfMonth = todayDate.getFullYear() + '-' +
|
||||||
|
('0' + (todayDate.getMonth() + 1)).slice(-2) + '-01';
|
||||||
|
|
||||||
if (!$("input[name=searchStartDateTime]").val()) {
|
if (!$("input[name=searchStartDateTime]").val()) {
|
||||||
var firstDay = today.substring(0, 8) + "01";
|
$("input[name=searchStartDateTime]").val(firstDayOfMonth);
|
||||||
$("input[name=searchStartDateTime]").val(firstDay.substring(0, 4) + '-' + firstDay.substring(4, 6) + '-' + firstDay.substring(6, 8));
|
|
||||||
}
|
}
|
||||||
if (!$("input[name=searchEndDateTime]").val()) {
|
if (!$("input[name=searchEndDateTime]").val()) {
|
||||||
$("input[name=searchEndDateTime]").val(today);
|
$("input[name=searchEndDateTime]").val(yesterday);
|
||||||
}
|
}
|
||||||
|
|
||||||
initCharts();
|
initCharts();
|
||||||
|
|||||||
@@ -245,4 +245,8 @@ public class AdapterGroupService extends AbstractDataService<AdapterGroup, Strin
|
|||||||
|
|
||||||
return query.fetch();
|
return query.fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AdapterGroup saveAndFlush(AdapterGroup adapterGroup) {
|
||||||
|
return repository.saveAndFlush(adapterGroup);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+14
@@ -1,5 +1,6 @@
|
|||||||
package com.eactive.eai.rms.data.entity.onl.stdmessage;
|
package com.eactive.eai.rms.data.entity.onl.stdmessage;
|
||||||
|
|
||||||
|
import com.eactive.eai.data.entity.onl.adapter.AdapterGroup;
|
||||||
import com.eactive.eai.data.entity.onl.message.QEAIMessageEntity;
|
import com.eactive.eai.data.entity.onl.message.QEAIMessageEntity;
|
||||||
import com.eactive.eai.data.entity.onl.stdmessage.QStandardMessageInfo;
|
import com.eactive.eai.data.entity.onl.stdmessage.QStandardMessageInfo;
|
||||||
import com.eactive.eai.data.entity.onl.stdmessage.StandardMessageInfo;
|
import com.eactive.eai.data.entity.onl.stdmessage.StandardMessageInfo;
|
||||||
@@ -113,5 +114,18 @@ public class StandardMessageInfoService
|
|||||||
return map;
|
return map;
|
||||||
}).collect(Collectors.toList());
|
}).collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<StandardMessageInfo> findByBzwksvckeynameStartingWith(String adapterName) {
|
||||||
|
QStandardMessageInfo qStandardMessageInfo = QStandardMessageInfo.standardMessageInfo;
|
||||||
|
|
||||||
|
return getJPAQueryFactory()
|
||||||
|
.selectFrom(qStandardMessageInfo)
|
||||||
|
.where(qStandardMessageInfo.bzwksvckeyname.startsWith(adapterName))
|
||||||
|
.fetch();
|
||||||
|
}
|
||||||
|
|
||||||
|
public StandardMessageInfo saveAndFlush(StandardMessageInfo stdMsgInfo) {
|
||||||
|
return repository.saveAndFlush(stdMsgInfo);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ public class AdapterController extends OnlBaseAnnotationController {
|
|||||||
synchronized (obj) {
|
synchronized (obj) {
|
||||||
service.update(adapterGroupUI);
|
service.update(adapterGroupUI);
|
||||||
|
|
||||||
Map<String, String> resultMap = service.reloadSync(adapterGroupUI);
|
Map<String, String> resultMap = service.reloadSyncStdMsgAndAdapter(adapterGroupUI.getAdptrbzwkgroupname());
|
||||||
return ResponseEntity.ok(resultMap);
|
return ResponseEntity.ok(resultMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+176
-8
@@ -23,10 +23,15 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import com.eactive.eai.agent.command.Command;
|
||||||
import com.eactive.eai.agent.command.CommonCommand;
|
import com.eactive.eai.agent.command.CommonCommand;
|
||||||
|
import com.eactive.eai.common.stdmessage.STDMessageManager;
|
||||||
import com.eactive.eai.data.entity.onl.adapter.Adapter;
|
import com.eactive.eai.data.entity.onl.adapter.Adapter;
|
||||||
import com.eactive.eai.data.entity.onl.adapter.AdapterGroup;
|
import com.eactive.eai.data.entity.onl.adapter.AdapterGroup;
|
||||||
|
import com.eactive.eai.data.entity.onl.adapter.AdapterProp;
|
||||||
import com.eactive.eai.data.entity.onl.adapter.AdapterPropGroup;
|
import com.eactive.eai.data.entity.onl.adapter.AdapterPropGroup;
|
||||||
|
import com.eactive.eai.data.entity.onl.stdmessage.StandardMessageInfo;
|
||||||
|
import com.eactive.eai.data.jpa.BaseRepository;
|
||||||
import com.eactive.eai.rms.common.acl.monitoringCode.MonitoringCodeManService;
|
import com.eactive.eai.rms.common.acl.monitoringCode.MonitoringCodeManService;
|
||||||
import com.eactive.eai.rms.common.base.OnlBaseService;
|
import com.eactive.eai.rms.common.base.OnlBaseService;
|
||||||
import com.eactive.eai.rms.common.comDomain.CommonDomainManService;
|
import com.eactive.eai.rms.common.comDomain.CommonDomainManService;
|
||||||
@@ -42,6 +47,7 @@ import com.eactive.eai.rms.data.entity.onl.adapter.AdapterTypePropertyService;
|
|||||||
import com.eactive.eai.rms.data.entity.onl.adapter.CommonDomain;
|
import com.eactive.eai.rms.data.entity.onl.adapter.CommonDomain;
|
||||||
import com.eactive.eai.rms.data.entity.onl.code.CodeService;
|
import com.eactive.eai.rms.data.entity.onl.code.CodeService;
|
||||||
import com.eactive.eai.rms.data.entity.onl.server.EAIServerService;
|
import com.eactive.eai.rms.data.entity.onl.server.EAIServerService;
|
||||||
|
import com.eactive.eai.rms.data.entity.onl.stdmessage.StandardMessageInfoService;
|
||||||
import com.eactive.eai.rms.onl.common.exception.BizException;
|
import com.eactive.eai.rms.onl.common.exception.BizException;
|
||||||
import com.eactive.eai.rms.onl.common.service.AdapterChangeThreadPool;
|
import com.eactive.eai.rms.onl.common.service.AdapterChangeThreadPool;
|
||||||
import com.eactive.eai.rms.onl.manage.adapter.adapter.mapper.AdapterGroupUIMapper;
|
import com.eactive.eai.rms.onl.manage.adapter.adapter.mapper.AdapterGroupUIMapper;
|
||||||
@@ -52,6 +58,7 @@ import com.eactive.eai.rms.onl.manage.adapter.adapter.ui.AdapterGroupUIMixIn;
|
|||||||
import com.eactive.eai.rms.onl.manage.adapter.adapter.ui.AdapterGroupUISearch;
|
import com.eactive.eai.rms.onl.manage.adapter.adapter.ui.AdapterGroupUISearch;
|
||||||
import com.eactive.eai.rms.onl.manage.adapter.adapter.ui.AdapterPropUI;
|
import com.eactive.eai.rms.onl.manage.adapter.adapter.ui.AdapterPropUI;
|
||||||
import com.eactive.eai.rms.onl.manage.adapter.adapter.ui.AdapterUI;
|
import com.eactive.eai.rms.onl.manage.adapter.adapter.ui.AdapterUI;
|
||||||
|
import com.ext.eai.agent.stdmessage.ReloadSTDMessageCommand;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.ObjectWriter;
|
import com.fasterxml.jackson.databind.ObjectWriter;
|
||||||
@@ -106,7 +113,10 @@ public class AdapterManService extends OnlBaseService {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private EAIServerService eaiServerService;
|
private EAIServerService eaiServerService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StandardMessageInfoService standardmessageinfoService;
|
||||||
|
|
||||||
public Page<AdapterGroupUI> selectList(Pageable pageable, AdapterGroupUISearch adapterGroupUISearch) {
|
public Page<AdapterGroupUI> selectList(Pageable pageable, AdapterGroupUISearch adapterGroupUISearch) {
|
||||||
Page<AdapterGroup> page = adapterGroupService.findPage(pageable, adapterGroupUISearch);
|
Page<AdapterGroup> page = adapterGroupService.findPage(pageable, adapterGroupUISearch);
|
||||||
return page.map(adapterGroupUIMapper::toVoWithoutChildrenMapping);
|
return page.map(adapterGroupUIMapper::toVoWithoutChildrenMapping);
|
||||||
@@ -234,11 +244,133 @@ public class AdapterManService extends OnlBaseService {
|
|||||||
|
|
||||||
public void update(AdapterGroupUI adapterGroupUI) {
|
public void update(AdapterGroupUI adapterGroupUI) {
|
||||||
|
|
||||||
AdapterGroup adapterGroup = adapterGroupService.getById(adapterGroupUI.getAdptrbzwkgroupname());
|
AdapterGroup adapterGroup = adapterGroupService.getById(adapterGroupUI.getAdptrbzwkgroupname());
|
||||||
adapterGroupUIMapper.updateEntity(adapterGroupUI, adapterGroup);
|
|
||||||
|
Map<String, String> oldApiPathMap = extractApiPaths(adapterGroup);
|
||||||
|
|
||||||
|
adapterGroupUIMapper.updateEntity(adapterGroupUI, adapterGroup);
|
||||||
|
|
||||||
|
// NonUniqueObjectException 대응
|
||||||
|
adapterGroupService.saveAndFlush(adapterGroup);
|
||||||
|
|
||||||
adapterGroupService.save(adapterGroup);
|
|
||||||
|
// HS04 - API_FULL_PATH 동기화
|
||||||
|
syncIfApiPathChanged(adapterGroup, oldApiPathMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Map<String, String> extractApiPaths(AdapterGroup adapterGroup) {
|
||||||
|
|
||||||
|
Map<String, String> pathMap = new HashMap<>();
|
||||||
|
|
||||||
|
if (adapterGroup == null || adapterGroup.getAdapters() == null) {
|
||||||
|
return pathMap;
|
||||||
|
}
|
||||||
|
for (Adapter adapter : adapterGroup.getAdapters()) {
|
||||||
|
|
||||||
|
if (adapter.getAdapterPropGroup() == null
|
||||||
|
|| adapter.getAdapterPropGroup().getAdapterProps() == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (AdapterProp prop : adapter.getAdapterPropGroup().getAdapterProps()) {
|
||||||
|
String propName = prop.getId().getPrptyname();
|
||||||
|
|
||||||
|
if ("API_PATH".equals(propName)) {
|
||||||
|
String adapterName = adapter.getId().getAdptrbzwkgroupname();
|
||||||
|
|
||||||
|
String apiPathValue = prop.getPrpty2val();
|
||||||
|
|
||||||
|
pathMap.put(adapterName, apiPathValue);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return pathMap;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void syncIfApiPathChanged(AdapterGroup newGroup, Map<String, String> oldPathMap) {
|
||||||
|
|
||||||
|
if (newGroup.getAdapters() == null) return;
|
||||||
|
|
||||||
|
for (Adapter newAdapter : newGroup.getAdapters()) { // adapterData 분리
|
||||||
|
String adapterName = newAdapter.getId().getAdptrbzwkgroupname(); // 업데이트할때 들어온 어댑터 이름
|
||||||
|
String newPath = findApiPathValue(newAdapter);
|
||||||
|
|
||||||
|
String oldPath = oldPathMap.get(adapterName);
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(oldPath)
|
||||||
|
&& StringUtils.isNotBlank(newPath)
|
||||||
|
&& !StringUtils.equals(oldPath, newPath)) {
|
||||||
|
|
||||||
|
updateStdMessageInfoApiFullPath(adapterName, oldPath, newPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private String findApiPathValue(Adapter adapter) {
|
||||||
|
if (adapter.getAdapterPropGroup() == null
|
||||||
|
|| adapter.getAdapterPropGroup().getAdapterProps() == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return adapter.getAdapterPropGroup().getAdapterProps().stream()
|
||||||
|
.filter(prop -> prop.getId() != null && "API_PATH".equals(prop.getId().getPrptyname()))
|
||||||
|
.findFirst()
|
||||||
|
.map(AdapterProp::getPrpty2val)
|
||||||
|
.orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateStdMessageInfoApiFullPath(String adapterName, String oldPath, String newPath) {
|
||||||
|
|
||||||
|
List<StandardMessageInfo> stdMsgInfoList = standardmessageinfoService.findByBzwksvckeynameStartingWith(adapterName);
|
||||||
|
|
||||||
|
// 변경 사항이 있었는지 체크해서 HS04 Reload 함.
|
||||||
|
for (StandardMessageInfo stdMsgInfo : stdMsgInfoList) {
|
||||||
|
String fullPath = stdMsgInfo.getApifullpath();
|
||||||
|
|
||||||
|
// 기존 경로(oldPath)를 포함하고 있을 때만 교체
|
||||||
|
if (StringUtils.isNotBlank(fullPath) && fullPath.contains(oldPath)) {
|
||||||
|
|
||||||
|
int pipeIndex = fullPath.indexOf("|");
|
||||||
|
|
||||||
|
if (pipeIndex != -1) {
|
||||||
|
String methodPart = fullPath.substring(0, pipeIndex + 1);
|
||||||
|
String uriPart = fullPath.substring(pipeIndex + 1);
|
||||||
|
|
||||||
|
if (uriPart.startsWith(oldPath)) {
|
||||||
|
String newUriPart = newPath + uriPart.substring(oldPath.length());
|
||||||
|
String updatedFullPath = methodPart + newUriPart;
|
||||||
|
|
||||||
|
stdMsgInfo.setApifullpath(updatedFullPath);
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
// DB에 즉시 반영
|
||||||
|
standardmessageinfoService.saveAndFlush(stdMsgInfo);
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
log.error("StandardMessageInfo APIFULLPATH SAVE FAIL key = {}", stdMsgInfo.getBzwksvckeyname());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 파이프가 없는 경우 로그 생성
|
||||||
|
log.warn("[StandardMessageInfo APIFULLPATH Sync Skip] Abnormal data format found. Adapter: {}, FullPath: {}", adapterName, fullPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void delete(AdapterGroupUI adapterGroupUI) {
|
public void delete(AdapterGroupUI adapterGroupUI) {
|
||||||
adapterGroupService.deleteById(adapterGroupUI.getAdptrbzwkgroupname());
|
adapterGroupService.deleteById(adapterGroupUI.getAdptrbzwkgroupname());
|
||||||
@@ -407,7 +539,43 @@ public class AdapterManService extends OnlBaseService {
|
|||||||
adapterGroup.setMoniuseyn(adapterGroupUI.getMoniuseyn());
|
adapterGroup.setMoniuseyn(adapterGroupUI.getMoniuseyn());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String, String> reloadSyncStdMsgAndAdapter(String adapterGroupName) throws Exception {
|
||||||
|
|
||||||
|
Map<String, String> result = new HashMap<>();
|
||||||
|
|
||||||
|
String status = "success";
|
||||||
|
|
||||||
|
try {
|
||||||
|
log.debug(">>>>>>>> [Reload Start] 어댑터 그룹명 {}", adapterGroupName);
|
||||||
|
|
||||||
|
CommonCommand pcommand = new CommonCommand(
|
||||||
|
"com.eactive.eai.agent.adapter.ReloadAdapterPropGroupCommand",
|
||||||
|
adapterGroupName
|
||||||
|
);
|
||||||
|
agentUtilService.broadcast(pcommand);
|
||||||
|
|
||||||
|
CommonCommand acommand = new CommonCommand(
|
||||||
|
"com.eactive.eai.agent.adapter.ReloadAdapterGroupCommand",
|
||||||
|
adapterGroupName
|
||||||
|
);
|
||||||
|
agentUtilService.broadcast(acommand);
|
||||||
|
|
||||||
|
Command stdcommand = new ReloadSTDMessageCommand();
|
||||||
|
stdcommand.setArgs("ALL");
|
||||||
|
agentUtilService.broadcast(stdcommand);
|
||||||
|
|
||||||
|
log.info(">>>>>> [Reload End] 모든 리로드 명령 전송 완료");
|
||||||
|
} catch (Exception e) {
|
||||||
|
status = "error";
|
||||||
|
log.error("리로드 실패", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
result.put("status", status);
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public Map<String, String> reloadSync(AdapterGroupUI adapterGroupUI) throws Exception {
|
public Map<String, String> reloadSync(AdapterGroupUI adapterGroupUI) throws Exception {
|
||||||
Map<String, Object> receive = null;
|
Map<String, Object> receive = null;
|
||||||
Map<String, String> result = new HashMap<>();
|
Map<String, String> result = new HashMap<>();
|
||||||
@@ -419,19 +587,19 @@ public class AdapterManService extends OnlBaseService {
|
|||||||
prptyGroupName);
|
prptyGroupName);
|
||||||
agentUtilService.broadcast(pcommand);
|
agentUtilService.broadcast(pcommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
CommonCommand acommand = new CommonCommand("com.eactive.eai.agent.adapter.ReloadAdapterGroupCommand",
|
CommonCommand acommand = new CommonCommand("com.eactive.eai.agent.adapter.ReloadAdapterGroupCommand",
|
||||||
adapterGroupUI.getAdptrbzwkgroupname());
|
adapterGroupUI.getAdptrbzwkgroupname());
|
||||||
receive = agentUtilService.broadcast(acommand);
|
receive = agentUtilService.broadcast(acommand);
|
||||||
|
|
||||||
if (receive.values().stream().anyMatch(value -> value == null || !"success".equals(value))) {
|
if (receive.values().stream().anyMatch(value -> value == null || !"success".equals(value))) {
|
||||||
status = "error";
|
status = "error";
|
||||||
}
|
}
|
||||||
|
|
||||||
result.put("status", status);
|
result.put("status", status);
|
||||||
result.put("message", receive.toString());
|
result.put("message", receive.toString());
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> deleteSync(AdapterGroupUI map, List<AdapterUI> list) throws Exception {
|
public Map<String, String> deleteSync(AdapterGroupUI map, List<AdapterUI> list) throws Exception {
|
||||||
|
|||||||
+12
-4
@@ -2,6 +2,7 @@ package com.eactive.eai.rms.onl.manage.rule.layoutsync;
|
|||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -212,11 +213,18 @@ public class LayoutSyncController extends OnlBaseAnnotationController implements
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
SAXBuilder builder = new SAXBuilder();
|
SAXBuilder builder = new SAXBuilder();
|
||||||
|
|
||||||
// 응답 전문
|
// 응답 전문
|
||||||
File res = new File( request.getSession().getServletContext().getRealPath("/WEB-INF/") + "/layout-messagesync-res.xml" );
|
InputStream resStream = request.getSession().getServletContext().getResourceAsStream("/WEB-INF/layout-messagesync-res.xml");
|
||||||
rDoc = builder.build(res);
|
if (resStream == null) {
|
||||||
results = rDoc.getRootElement();
|
throw new Exception("layout-messagesync-res.xml 파일을 찾을 수 없습니다.");
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
rDoc = builder.build(resStream);
|
||||||
|
results = rDoc.getRootElement();
|
||||||
|
} finally {
|
||||||
|
resStream.close();
|
||||||
|
}
|
||||||
|
|
||||||
// 요청 전문
|
// 요청 전문
|
||||||
sis = request.getInputStream();
|
sis = request.getInputStream();
|
||||||
|
|||||||
Reference in New Issue
Block a user