From e177f345f2ef8743b5afb68cd7fe1056195de2ec Mon Sep 17 00:00:00 2001 From: Yunsam Eo Date: Tue, 4 Nov 2025 15:38:12 +0900 Subject: [PATCH 01/50] =?UTF-8?q?.gitmodules=20=EC=9B=90=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitmodules | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index 2e4b4a3..02309e3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,20 @@ [submodule "elink-online-core"] path = elink-online-core - url = ssh://git@192.168.240.178:18081/eapim/elink-online-core.git + url = ../elink-online-core.git +// url = ssh://git@192.168.240.178:18081/eapim/elink-online-core.git [submodule "elink-online-transformer"] path = elink-online-transformer - url = ssh://git@192.168.240.178:18081/eapim/elink-online-transformer.git + url = ../elink-online-transformer.git +// url = ssh://git@192.168.240.178:18081/eapim/elink-online-transformer.git [submodule "elink-online-common"] path = elink-online-common - url = ssh://git@192.168.240.178:18081/eapim/elink-online-common.git + url = ../eapim/elink-online-common.git +// url = ssh://git@192.168.240.178:18081/eapim/elink-online-common.git [submodule "elink-online-emsclient"] path = elink-online-emsclient - url = ssh://git@192.168.240.178:18081/eapim/elink-online-emsclient.git + url = ../elink-online-emsclient.git +// url = ssh://git@192.168.240.178:18081/eapim/elink-online-emsclient.git [submodule "elink-online-core-jpa"] path = elink-online-core-jpa - url = ssh://git@192.168.240.178:18081/eapim/elink-online-core-jpa.git + url = ../elink-online-core-jpa.git +// url = ssh://git@192.168.240.178:18081/eapim/elink-online-core-jpa.git From 577af1978fe6d3bbb2d91807734c5df80847b6fd Mon Sep 17 00:00:00 2001 From: Yunsam Eo Date: Tue, 4 Nov 2025 16:15:41 +0900 Subject: [PATCH 02/50] =?UTF-8?q?.gitmodules=20=EC=9B=90=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitmodules | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index 02309e3..114733c 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,20 +1,15 @@ [submodule "elink-online-core"] path = elink-online-core url = ../elink-online-core.git -// url = ssh://git@192.168.240.178:18081/eapim/elink-online-core.git [submodule "elink-online-transformer"] path = elink-online-transformer url = ../elink-online-transformer.git -// url = ssh://git@192.168.240.178:18081/eapim/elink-online-transformer.git [submodule "elink-online-common"] path = elink-online-common url = ../eapim/elink-online-common.git -// url = ssh://git@192.168.240.178:18081/eapim/elink-online-common.git [submodule "elink-online-emsclient"] path = elink-online-emsclient url = ../elink-online-emsclient.git -// url = ssh://git@192.168.240.178:18081/eapim/elink-online-emsclient.git [submodule "elink-online-core-jpa"] path = elink-online-core-jpa url = ../elink-online-core-jpa.git -// url = ssh://git@192.168.240.178:18081/eapim/elink-online-core-jpa.git From 8af9e484781454dcc4c481dabd4cb51949d99c1a Mon Sep 17 00:00:00 2001 From: Yunsam Eo Date: Tue, 4 Nov 2025 16:47:10 +0900 Subject: [PATCH 03/50] =?UTF-8?q?.gitmodules=20=ED=8E=B8=EC=A7=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitmodules | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index 114733c..765ac2a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,15 @@ [submodule "elink-online-core"] path = elink-online-core - url = ../elink-online-core.git + url = ssh://git@192.168.240.178:18081/eapim/elink-online-core.git [submodule "elink-online-transformer"] path = elink-online-transformer - url = ../elink-online-transformer.git + url = ssh://git@192.168.240.178:18081/eapim/elink-online-transformer.git [submodule "elink-online-common"] path = elink-online-common - url = ../eapim/elink-online-common.git + url = ssh://git@192.168.240.178:18081/eapim/elink-online-common.git [submodule "elink-online-emsclient"] path = elink-online-emsclient - url = ../elink-online-emsclient.git + url = ssh://git@192.168.240.178:18081/eapim/elink-online-emsclient.git [submodule "elink-online-core-jpa"] path = elink-online-core-jpa - url = ../elink-online-core-jpa.git + url = ssh://git@192.168.240.178:18081/eapim/elink-online-core-jpa.git \ No newline at end of file From 4ed85b2652e468511c0a0c6a36bf30a7f6a53500 Mon Sep 17 00:00:00 2001 From: Yunsam Date: Wed, 5 Nov 2025 20:08:46 +0900 Subject: [PATCH 04/50] =?UTF-8?q?Weblogic=20Default=20Servlet=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/web.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml index 6661aad..9e4b1fe 100644 --- a/WebContent/WEB-INF/web.xml +++ b/WebContent/WEB-INF/web.xml @@ -36,7 +36,6 @@ - + authserver @@ -71,6 +70,7 @@ + + authserver diff --git a/WebContent/WEB-INF/weblogic-web.xml b/WebContent/WEB-INF/weblogic-web.xml index 3e0192a..2e359f1 100644 --- a/WebContent/WEB-INF/weblogic-web.xml +++ b/WebContent/WEB-INF/weblogic-web.xml @@ -35,6 +35,16 @@ /WEB-INF/applicationContext.xml + + + default + weblogic.servlet.FileServlet + + + default + /static/* + + authserver From 48ada81aeb563929ba2d308bf140e5467b8a157a Mon Sep 17 00:00:00 2001 From: Yunsam Date: Wed, 5 Nov 2025 20:34:43 +0900 Subject: [PATCH 06/50] =?UTF-8?q?Weblogic=20Default=20Servlet=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/web.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml index 78e0ce6..cc3d507 100644 --- a/WebContent/WEB-INF/web.xml +++ b/WebContent/WEB-INF/web.xml @@ -35,7 +35,6 @@ /WEB-INF/applicationContext.xml - + authserver From 2fa1cefb75edb8d4e1460b1b0b9ac1c72d86f6ed Mon Sep 17 00:00:00 2001 From: JAEWOO HONG Date: Thu, 6 Nov 2025 14:13:17 +0900 Subject: [PATCH 07/50] =?UTF-8?q?ApiAdapterController.java=20=ED=8E=B8?= =?UTF-8?q?=EC=A7=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ApiAdapterController.java | 54 ++++++++++++++++++- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eactive/eai/adapter/controller/ApiAdapterController.java b/src/main/java/com/eactive/eai/adapter/controller/ApiAdapterController.java index 0b60677..ec24133 100644 --- a/src/main/java/com/eactive/eai/adapter/controller/ApiAdapterController.java +++ b/src/main/java/com/eactive/eai/adapter/controller/ApiAdapterController.java @@ -33,6 +33,14 @@ import com.eactive.eai.common.util.Logger; import com.eactive.eai.common.util.MessageUtil; import com.eactive.eai.common.util.UUIDGenerator; import com.eactive.eai.inbound.error.InboundErrorInfoVO; +import com.kjbank.encrypt.exchange.crypto.AES256Cipher; +import com.kjbank.encrypt.exchange.crypto.AES256GCMCipher; +import com.kjbank.encrypt.exchange.crypto.AESCipher; + +// jwhong +import org.json.simple.JSONObject; +import java.util.HashMap; +import java.util.Map; @RestController public class ApiAdapterController implements HttpAdapterServiceKey { @@ -87,8 +95,20 @@ public class ApiAdapterController implements HttpAdapterServiceKey { Properties transactionProp = new Properties(); try { String responseData = service.callApi(servletRequest, servletResponse, httpProp, adapterGroupVO, adapterVO, transactionProp); - if (RESPONSE_TYPE_ASYNC.equals(responseType)) { - responseEntity = ResponseEntity.ok("dummy"); + // if (RESPONSE_TYPE_ASYNC.equals(responseType)) { // table의 값이 ASYNC 로 들어가 있는데 response_type_async는 ASYN 로 되어 있어 아래처럼 비교함 jwhong 2025 + if ("ASYNC".equals(responseType)) { + //responseEntity = ResponseEntity.ok("dummy"); // comment by jwhong + servletResponse.addHeader("traceId", responseData); // uuid를 response header에 + int httpStatus = servletResponse.getStatus(); + if (httpStatus == 200) { + // 업체별 aync response message 가 다르다. + String asyncMsgStyle = httpProp.getProperty("ASYNC_RTNMSG_TYPE", "").toUpperCase(); + String responseBody = makeResponseBodyMsg(asyncMsgStyle); + responseEntity = ResponseEntity.status(httpStatus).contentType(mediaType).body(responseBody); + // jwhong + } else { + responseEntity = ResponseEntity.status(httpStatus).contentType(mediaType).body(responseData); + } } else { // responseEntity = ResponseEntity.ok().contentType(mediaType).body(responseData); // 버즈빌 포인트 적립 처리하기 위하여 정상응답이더라도 응답코드(apiRsltCd) 값이 200이 아닌 경우 처리를 위하여 수정 @@ -186,5 +206,35 @@ public class ApiAdapterController implements HttpAdapterServiceKey { InboundErrorLogger.error(errorInfoVO); } + + private String makeResponseBodyMsg(String asyncMsgStyle) { + + Map dataMap = new HashMap<>(); + dataMap.put("result", 1); + Map map = new HashMap<>(); + + switch (asyncMsgStyle) { + case "TB_SUC": + map.put("rspCode", "TB_SUC_000"); + map.put("rspMsg", "정상"); + map.put("data", dataMap); + break; + case "ONLYDATA": + map.put("data", dataMap); + map.put("success", "true"); + break; + default: + map.put("code", "200"); + map.put("data", dataMap); + map.put("message", "정상 처리 되었습니다."); + break; + } + + JSONObject json = new JSONObject(); + json.putAll(map); + + return json.toJSONString(); + } + } \ No newline at end of file From 750532c047fec0d40702890aa991633e314bb287 Mon Sep 17 00:00:00 2001 From: JAEWOO HONG Date: Thu, 6 Nov 2025 14:15:57 +0900 Subject: [PATCH 08/50] =?UTF-8?q?ApiAdapterService.java=20=ED=8E=B8?= =?UTF-8?q?=EC=A7=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapter/service/ApiAdapterService.java | 317 +++++++++++++++++- 1 file changed, 304 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/eactive/eai/adapter/service/ApiAdapterService.java b/src/main/java/com/eactive/eai/adapter/service/ApiAdapterService.java index 77b80b4..88a46f3 100644 --- a/src/main/java/com/eactive/eai/adapter/service/ApiAdapterService.java +++ b/src/main/java/com/eactive/eai/adapter/service/ApiAdapterService.java @@ -7,6 +7,7 @@ import com.eactive.eai.adapter.Keys; import com.eactive.eai.adapter.http.HttpMemoryLogger; import com.eactive.eai.adapter.http.HttpMethodType; import com.eactive.eai.adapter.http.dynamic.HttpAdapterServiceSupport; +import com.eactive.eai.adapter.http.dynamic.filter.JwtAuthFilter; import com.eactive.eai.common.exception.ExceptionUtil; import com.eactive.eai.common.message.MessageType; import com.eactive.eai.common.util.CommonLib; @@ -24,6 +25,7 @@ import org.apache.commons.lang3.time.StopWatch; import org.apache.mina.common.ByteBuffer; import org.json.simple.JSONObject; import org.json.simple.JSONValue; +import org.json.simple.parser.JSONParser; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.MediaType; @@ -40,6 +42,7 @@ import java.util.*; import com.eactive.eai.authserver.service.OAuth2Manager; import com.kjbank.encrypt.exchange.crypto.AES256Cipher; import com.kjbank.encrypt.exchange.crypto.AESCipher; +import com.kjbank.encrypt.exchange.crypto.AES256GCMCipher; import java.nio.charset.StandardCharsets; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -47,12 +50,15 @@ import java.io.ObjectOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import org.springframework.security.oauth2.provider.ClientDetails; +import com.nimbusds.jwt.SignedJWT; + @Service public class ApiAdapterService extends HttpAdapterServiceSupport { static Logger logger = Logger.getLogger(Logger.LOGGER_ADAPTER); public static final String HEADER_GROUP = "HEADER_GROUP"; + public static final String HTTP_STATUS = "HTTP_STATUS"; // jwhong // HEADER_GROUP JSON에 추가할 항목 정의, 없으면 전체 header 추가 public static final String HEADER_KEYS = "HEADER_KEYS"; public static final String PROPERTIES_NAME_HTTP_REQUEST_METHOD = "httpRequestMethod"; @@ -61,6 +67,7 @@ public class ApiAdapterService extends HttpAdapterServiceSupport { private static final String JSON_FIELD_NAME = "json-body"; private static final String FILE_GROUP_NAME = "image-file"; private static final String UPLOAD_ROOT_PATH = "UPLOAD_ROOT_PATH"; + public static final String PAYLOAD_PARAM_NAME_CLIENT_ID = "client_id"; // jwhong public String callApi(HttpServletRequest request, HttpServletResponse response, Properties httpProp, AdapterGroupVO adapterGroupVO, AdapterVO adapterVO, Properties transactionProp) throws Exception { int traceLevel = 0; @@ -105,10 +112,14 @@ public class ApiAdapterService extends HttpAdapterServiceSupport { transactionProp.put(ENC_PATHS, httpProp.getProperty(ENC_PATHS, "")); transactionProp.put(ENCRYPT_ALGORITHM, httpProp.getProperty(ENCRYPT_ALGORITHM, "")); //jwhong - transactionProp.put(HEADER_NAME_CLIENT_ID, getHeaders(request).get(HEADER_NAME_CLIENT_ID)); // jwhong + if (getHeaders(request).get(HEADER_NAME_CLIENT_ID) != null) { // jwhong + transactionProp.put(HEADER_NAME_CLIENT_ID, getHeaders(request).get(HEADER_NAME_CLIENT_ID)); + } transactionProp.put(ENCRYPT_BASE_TYPE, httpProp.getProperty(ENCRYPT_BASE_TYPE, "")); //jwhong //transactionProp.put(INBOUND_TOKEN, getHeaders(request).get(INBOUND_TOKEN)); // jwhong transactionProp.put(INBOUND_TOKEN, getHeaders(request).get(INBOUND_TOKEN) != null ? getHeaders(request).get(INBOUND_TOKEN) : ""); //jwhong , null 이면 default로 "" put + transactionProp.put(ENCRYPT_AES256_IV, httpProp.getProperty(ENCRYPT_AES256_IV, "")); //jwhong + transactionProp.put(ENCRYPT_AES256_KEY, httpProp.getProperty(ENCRYPT_AES256_KEY, "")); //jwhong try { @@ -218,7 +229,7 @@ public class ApiAdapterService extends HttpAdapterServiceSupport { paramValue = ""; } else { // jwhong decrypt - paramValue = doPreDecryption(paramValue, transactionProp); + paramValue = doPreDecryption(paramValue, transactionProp, request); } if ("Y".equals(urlDecodeYn) && isParameterType) { @@ -262,7 +273,7 @@ public class ApiAdapterService extends HttpAdapterServiceSupport { } } } - + if (headerJson.size() > 0) { jsonMessage.put(headerGroupName, headerJson); message = jsonMessage.toJSONString(); @@ -284,6 +295,7 @@ public class ApiAdapterService extends HttpAdapterServiceSupport { stopWatch.stop(); String syncAsyncType = transactionProp.getProperty(INBOUND_SYNC_ASYNC_TYPE); + if (!"ASYN".equals(syncAsyncType) && MessageType.JSON.equals(adptMsgType) && StringUtils.isNotBlank(headerGroupName)) { ObjectMapper mapper = new ObjectMapper(); ObjectNode rootNode = (ObjectNode) mapper.readTree(result); @@ -298,19 +310,85 @@ public class ApiAdapterService extends HttpAdapterServiceSupport { result = mapper.writeValueAsString(rootNode); } } - + + // ASYNC 인 경우 광주은행은 RETURN 해 주는 값들이 수정되어야 한다. JWHONG + /* + if ("ASYN".equals(syncAsyncType) && MessageType.JSON.equals(adptMsgType) && StringUtils.isNotBlank(headerGroupName)) { + ObjectMapper mapper = new ObjectMapper(); + ObjectNode rootNode = (ObjectNode) mapper.readTree(result); + JsonNode headerGroup = rootNode.get(headerGroupName); + if(headerGroup != null) { + for(Iterator it = headerGroup.fieldNames(); it.hasNext();) { + String name = it.next(); + String value = headerGroup.get(name).asText(); + response.addHeader(name, value); + } + rootNode.remove(headerGroupName); + result = mapper.writeValueAsString(rootNode); + } + } + */ + + // KJBank는 요청에 대한 응답 (Sync응답, Aync 에 대한 Ack응답) 에 대하여 암호화 하지 않는다. 무조건 안한다. 따라서 아래부분은 구현은 했지만 사용하지 않는다. + //result = doPostEncryption(result, transactionProp); // jwhong Encrypt return result; } - // jwhong encrypt + // jwhong decrypt - private String doPreDecryption(String eaiBody, Properties transactionProp) { + private String doPreDecryption(String eaiBody, Properties transactionProp, HttpServletRequest request) { + String decryptAlgorithm = transactionProp.getProperty(ENCRYPT_ALGORITHM, ""); + String xElinkClientId = transactionProp.getProperty(HEADER_NAME_CLIENT_ID, ""); // 이 값이 OAuth의 client id 값이다 . http header 에 포함되어 온다. jwhong + String encryptBaseKeyType = transactionProp.getProperty(ENCRYPT_BASE_TYPE); + //String inboundToken2 = transactionProp.getProperty(INBOUND_TOKEN, ""); // 이건 token 값이 아니고 authorization 값이다 + String inboundToken = ""; + + String secretAES256Iv = transactionProp.getProperty("ENCRYPT_AES256_IV"); + String secretAES256Key = transactionProp.getProperty("ENCRYPT_AES256_KEY"); + + if ( decryptAlgorithm == "" ) { // 복호화 대상이 아님 + return eaiBody; + } + + inboundToken = JwtTokenExtractor(request); + xElinkClientId = JwtClientIdExtractor(inboundToken); // token에서 client id를 추출함 + + // 암호화 key를 token 내용으로 할지 client secret 내용으로 할지 결정함. adapter property에 정의함 + // ENCRYPT_ALGORITHM 을 설정했는데 ENCRYPT_BASE_TYPE을 설정안하면 Decrypt 수행시 Exception 발생함 + String clientSecret = ""; + if ("TOKEN".equalsIgnoreCase(encryptBaseKeyType)) { + clientSecret = inboundToken; + } else if ( "SECRETKEY".equalsIgnoreCase(encryptBaseKeyType)) { + OAuth2Manager manager = OAuth2Manager.getInstance(); + ClientDetails clientDetail = manager.getClientDeatilsStore().get(xElinkClientId); + + if ( clientDetail != null ) { // 여기서 not null 이라는 것은 apim oauth server에서 발급된 token 임. + // 즉 KJBank 에서 요청이 들어온 것이다. + clientSecret = clientDetail.getClientSecret(); + } // 그럼 업체에서 요청이 들어오면?? 업체도 apim oauth server에서 발급된 token을 사용하는것이다. + } + + byte[] decryptedMessage = null; + decryptedMessage = doInboundPreDecrypt(eaiBody, decryptAlgorithm,clientSecret,secretAES256Iv, secretAES256Key ); + + String resultMessage = new String(decryptedMessage, StandardCharsets.UTF_8 ); + return resultMessage; + //return new String(decryptedMessage, StandardCharsets.UTF_8 ); + } + + + // jwhong encrypt + private String doPostEncryption(String eaiBody, Properties transactionProp) { String decryptAlgorithm = transactionProp.getProperty(ENCRYPT_ALGORITHM, ""); String xElinkClientId = transactionProp.getProperty(HEADER_NAME_CLIENT_ID, ""); // 이 값이 OAuth의 client id 값이다 . http header 에 포함되어 온다. jwhong String encryptBaseKeyType = transactionProp.getProperty(ENCRYPT_BASE_TYPE); String inboundToken = transactionProp.getProperty(INBOUND_TOKEN, ""); + String secretAES256Iv = transactionProp.getProperty("ENCRYPT_AES256_IV"); + String secretAES256Key = transactionProp.getProperty("ENCRYPT_AES256_KEY"); + + if ( decryptAlgorithm == "" ) { // 복호화 대상이 아님 return eaiBody; } @@ -330,7 +408,7 @@ public class ApiAdapterService extends HttpAdapterServiceSupport { } byte[] decryptedMessage = null; - decryptedMessage = doInboundPreDecrypt(eaiBody, decryptAlgorithm,clientSecret); + decryptedMessage = doInboundPostEncrypt(eaiBody, decryptAlgorithm,clientSecret,secretAES256Iv, secretAES256Key ); String resultMessage = new String(decryptedMessage, StandardCharsets.UTF_8 ); return resultMessage; @@ -366,11 +444,13 @@ public class ApiAdapterService extends HttpAdapterServiceSupport { } - private byte[] doInboundPreDecrypt(String eaiStringBody, String decryptAlgorithm, String clientSecretKey) { + private byte[] doInboundPreDecrypt(String eaiStringBody, String decryptAlgorithm, String clientSecretKey, String secretAES256Iv, String secretAES256Key) { byte[] decryptedMessage = null; //String eaiStringBody = new String(eaiBody, StandardCharsets.UTF_8); + eaiStringBody = extractBodyMsg(decryptAlgorithm, eaiStringBody); + //test source //System.out.println("eaiBody 바이트 배열 길이: " + eaiBody.length); System.out.println("Base64 문자열: " + eaiStringBody); @@ -387,10 +467,20 @@ public class ApiAdapterService extends HttpAdapterServiceSupport { // end test source switch (decryptAlgorithm) { - case "AES128": - - String key128 = clientSecretKey.substring(22,38); //togetherEncoder 경우는 substring(44,60) 이네?? + case "AES128-TOSS": try { + String key128 = clientSecretKey.substring(22,38); //togetherEncoder 경우는 substring(44,60) 이네?? + //String decryptedStrMessage = AESCipher.decrypt(eaiStringBody, key128); + String decryptedStrMessage = AESCipher.decryptExistException(eaiStringBody, key128); + decryptedMessage = decryptedStrMessage.getBytes(StandardCharsets.UTF_8); + } catch (Exception e) { + e.printStackTrace(); + logger.error("HttpClientAdapterServiceRest] AES128 Decryption error=" + e.getMessage()); + } + break; + case "AES128-TOGETHER": + try { + String key128 = clientSecretKey.substring(44,60); //togetherEncoder 경우는 substring(44,60) 이네?? //String decryptedStrMessage = AESCipher.decrypt(eaiStringBody, key128); String decryptedStrMessage = AESCipher.decryptExistException(eaiStringBody, key128); decryptedMessage = decryptedStrMessage.getBytes(StandardCharsets.UTF_8); @@ -400,8 +490,8 @@ public class ApiAdapterService extends HttpAdapterServiceSupport { } break; case "AES256": - String key = clientSecretKey.substring(10,42); try { + String key = clientSecretKey.substring(10,42); String decryptedStrMessage = AES256Cipher.decrypt(eaiStringBody, key); decryptedMessage = decryptedStrMessage.getBytes(StandardCharsets.UTF_8); } catch (Exception e) { @@ -409,9 +499,41 @@ public class ApiAdapterService extends HttpAdapterServiceSupport { logger.error("HttpClientAdapterServiceRest] AES256 Decryption error=" + e.getMessage()); } break; + case "AES256-KAKAO": + try { + String decryptedStrMessage = AES256Cipher.decrypt(eaiStringBody, secretAES256Iv, secretAES256Key); + decryptedMessage = decryptedStrMessage.getBytes(StandardCharsets.UTF_8); + } catch (Exception e) { + e.printStackTrace(); + logger.error("HttpClientAdapterServiceRest] AES256 Decryption error=" + e.getMessage()); + } + break; + case "AES256-TOSS": + try { + String decryptedStrMessage = AES256Cipher.decrypt(eaiStringBody, secretAES256Iv, secretAES256Key); + decryptedMessage = decryptedStrMessage.getBytes(StandardCharsets.UTF_8); + } catch (Exception e) { + e.printStackTrace(); + logger.error("HttpClientAdapterServiceRest] AES256 Decryption error=" + e.getMessage()); + } + break; + + case "AES256GCM": + try { + byte[] key = AES256GCMCipher.generateKey(); + AES256GCMCipher cipher = new AES256GCMCipher(key); + byte[] aad = "metadata".getBytes(); + + String decryptedStrMessage = cipher.decrypt(eaiStringBody , aad); + decryptedMessage = decryptedStrMessage.getBytes(StandardCharsets.UTF_8); + + } catch (Exception e) { + e.printStackTrace(); + logger.error("HttpClientAdapterServiceRest] AES256GCM Encryption error=" + e.getMessage()); + } + break; default: try { - //decryptedMessage = Arrays.copyOf(eaiBody, eaiBody.length); decryptedMessage = eaiStringBody.getBytes(); } catch (Exception e) { e.printStackTrace(); @@ -423,6 +545,175 @@ public class ApiAdapterService extends HttpAdapterServiceSupport { return decryptedMessage; } + private String extractBodyMsg(String decryptAlgorithm, String eaiStringBody) { + + String decryptedJsonKey = ""; + String decryptedBodyMessage = ""; + + switch (decryptAlgorithm) { + case "AES128-TOSS": + decryptedJsonKey = "preScreeningRequest"; + break; + case "AES128-TOGETHER": + decryptedJsonKey = "obpTxData"; + break; + case "AES256": + decryptedJsonKey = "preScreeningRequest"; + break; + case "AES256-KAKAO": + decryptedJsonKey = "encrypted_data"; + break; + case "AES256-TOSS": + decryptedJsonKey = "encryptedData"; + break; + case "AES256GCM": + break; + default: + break; + } + + try { + JSONParser parser = new JSONParser(); + JSONObject jsonObject = (JSONObject) parser.parse(eaiStringBody); + decryptedBodyMessage = (String) jsonObject.get(decryptedJsonKey); + } catch (Exception e) { + e.printStackTrace(); + logger.error("HttpClient5AdapterServiceRest] extractBodyMsg error : " + e.getMessage()); + } + + return decryptedBodyMessage; + + } + + private byte[] doInboundPostEncrypt(String eaiStringBody, String encryptAlgorithm, String clientSecretKey, String secretAES256Iv, String secretAES256Key) { + + byte[] encryptedMessage = null; + //String eaiStringBody = new String(eaiBody, StandardCharsets.UTF_8); + + //test source + //System.out.println("eaiBody 바이트 배열 길이: " + eaiBody.length); + System.out.println("Base64 문자열: " + eaiStringBody); + System.out.println("Base64 문자열 길이: " + eaiStringBody.length()); + System.out.println("Base64 문자열 끝: " + eaiStringBody.substring(eaiStringBody.length() - 10)); + + // Base64 디코딩 테스트 + try { + byte[] decoded = Base64.getDecoder().decode(eaiStringBody); + System.out.println("디코딩 성공, 길이: " + decoded.length); + } catch (IllegalArgumentException e) { + System.out.println("Base64 디코딩 실패: " + e.getMessage()); + } + // end test source + + switch (encryptAlgorithm) { + case "AES128-TOSS": + try { + String key128 = clientSecretKey.substring(22,38); //togetherEncoder 경우는 substring(44,60) 이네?? + String decryptedStrMessage = AESCipher.encrypt(eaiStringBody, key128); + encryptedMessage = decryptedStrMessage.getBytes(StandardCharsets.UTF_8); + } catch (Exception e) { + e.printStackTrace(); + logger.error("HttpClientAdapterServiceRest] AES128 Decryption error=" + e.getMessage()); + } + break; + case "AES128-TOGETHER": + try { + String key128 = clientSecretKey.substring(44,60); //togetherEncoder 경우는 substring(44,60) 이네?? + String decryptedStrMessage = AESCipher.encrypt(eaiStringBody, key128); + encryptedMessage = decryptedStrMessage.getBytes(StandardCharsets.UTF_8); + } catch (Exception e) { + e.printStackTrace(); + logger.error("HttpClientAdapterServiceRest] AES128 Decryption error=" + e.getMessage()); + } + break; + case "AES256": + try { + String key = clientSecretKey.substring(10,42); + String decryptedStrMessage = AES256Cipher.encrypt(eaiStringBody, key); + encryptedMessage = decryptedStrMessage.getBytes(StandardCharsets.UTF_8); + } catch (Exception e) { + e.printStackTrace(); + logger.error("HttpClientAdapterServiceRest] AES256 Decryption error=" + e.getMessage()); + } + break; + case "AES256-KAKAO": + try { + String decryptedStrMessage = AES256Cipher.encrypt(eaiStringBody, secretAES256Iv, secretAES256Key); + encryptedMessage = decryptedStrMessage.getBytes(StandardCharsets.UTF_8); + } catch (Exception e) { + e.printStackTrace(); + logger.error("HttpClientAdapterServiceRest] AES256 Decryption error=" + e.getMessage()); + } + break; + case "AES256-TOSS": + try { + String decryptedStrMessage = AES256Cipher.encrypt(eaiStringBody, secretAES256Iv, secretAES256Key); + encryptedMessage = decryptedStrMessage.getBytes(StandardCharsets.UTF_8); + } catch (Exception e) { + e.printStackTrace(); + logger.error("HttpClientAdapterServiceRest] AES256 Decryption error=" + e.getMessage()); + } + break; + + case "AES256GCM": + try { + byte[] key = AES256GCMCipher.generateKey(); + AES256GCMCipher cipher = new AES256GCMCipher(key); + byte[] aad = "metadata".getBytes(); + + String decryptedStrMessage = cipher.encrypt(eaiStringBody , aad); + encryptedMessage = decryptedStrMessage.getBytes(StandardCharsets.UTF_8); + + } catch (Exception e) { + e.printStackTrace(); + logger.error("HttpClientAdapterServiceRest] AES256GCM Encryption error=" + e.getMessage()); + } + break; + default: + try { + encryptedMessage = eaiStringBody.getBytes(); + } catch (Exception e) { + e.printStackTrace(); + logger.error("HttpClientAdapterServiceRest] doOutboundPostFilter Array copy error=" + e.getMessage()); + } + break; + } + + return encryptedMessage; + } + + + + private String JwtTokenExtractor(HttpServletRequest request) { + + String Token = ""; + try { + Token = JwtAuthFilter.extractJWTToken(request); + } catch (Exception e) { + logger.error(e.getMessage()); + } + + System.out.println("Token is: " + Token); + return Token; + + } + + private String JwtClientIdExtractor(String inboundToken) { + + String tokenClientId =""; + try { + SignedJWT signedJWT = SignedJWT.parse(inboundToken); + tokenClientId = (String) signedJWT.getJWTClaimsSet().getClaim(PAYLOAD_PARAM_NAME_CLIENT_ID); + } catch (Exception e) { + logger.error(e.getMessage()); + tokenClientId = ""; + } + + System.out.println("Token Client ID: " + tokenClientId); + return tokenClientId; + + } + // jwhong until here From 58c02c3791699a3b7a1e10b62b203b7d4eb3b1f6 Mon Sep 17 00:00:00 2001 From: "Yunsam.Eo" Date: Fri, 7 Nov 2025 17:48:06 +0900 Subject: [PATCH 09/50] =?UTF-8?q?=EC=98=A8=EB=9D=BC=EC=9D=B8=EC=9D=B8?= =?UTF-8?q?=EC=8A=A4=ED=84=B4=EC=8A=A4=20=EA=B4=80=EB=A6=AC=EC=9A=A9=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=9B=90=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/mgr/JMSPurgeMan.jsp | 407 +++++++++++++++++++ WebContent/mgr/JMSReceiverMan.jsp | 245 +++++++++++ WebContent/mgr/_condperrtginfo.jsp | 14 + WebContent/mgr/_refmsgid.jsp | 14 + WebContent/mgr/adapter.jsp | 126 ++++++ WebContent/mgr/adaptergrp.jsp | 184 +++++++++ WebContent/mgr/b2badaptermap.jsp | 165 ++++++++ WebContent/mgr/b2bextract.jsp | 153 +++++++ WebContent/mgr/b2bservice.jsp | 250 ++++++++++++ WebContent/mgr/bizkey.jsp | 151 +++++++ WebContent/mgr/businessday.jsp | 41 ++ WebContent/mgr/c2rservice.jsp | 222 ++++++++++ WebContent/mgr/currentTx.jsp | 76 ++++ WebContent/mgr/currentWeb.jsp | 17 + WebContent/mgr/eaimessage.jsp | 366 +++++++++++++++++ WebContent/mgr/eaiserver.jsp | 106 +++++ WebContent/mgr/errorcode.jsp | 111 +++++ WebContent/mgr/firstAccountInfo.jsp | 48 +++ WebContent/mgr/inflowAdapter.jsp | 81 ++++ WebContent/mgr/inflowInterface.jsp | 81 ++++ WebContent/mgr/kbmessage.jsp | 228 +++++++++++ WebContent/mgr/kbmsgparser.jsp | 68 ++++ WebContent/mgr/lifecycle.jsp | 138 +++++++ WebContent/mgr/messagekey.jsp | 185 +++++++++ WebContent/mgr/newsvcmonitor.jsp | 304 ++++++++++++++ WebContent/mgr/property.jsp | 109 +++++ WebContent/mgr/refmsgid.jsp | 144 +++++++ WebContent/mgr/restrictInfo.jsp | 89 ++++ WebContent/mgr/routing.jsp | 120 ++++++ WebContent/mgr/stdmessage.jsp | 129 ++++++ WebContent/mgr/svcmessages.jsp | 354 ++++++++++++++++ WebContent/mgr/svcmonitor.jsp | 310 ++++++++++++++ WebContent/mgr/svcmonitorbwk.jsp | 407 +++++++++++++++++++ WebContent/mgr/testcall.jsp | 158 +++++++ WebContent/mgr/transRuleReload.jsp | 103 +++++ WebContent/mgr/transformer/Transform.jsp | 214 ++++++++++ WebContent/mgr/transformer/TransformFunc.jsp | 186 +++++++++ WebContent/mgr/transformer/layout.jsp | 218 ++++++++++ WebContent/mgr/transformer/layoutItem.jsp | 211 ++++++++++ WebContent/mgr/transformer/layoutType.jsp | 149 +++++++ WebContent/mgr/useDateControl.jsp | 77 ++++ WebContent/mgr/viewThreadList.jsp | 115 ++++++ 42 files changed, 6874 insertions(+) create mode 100644 WebContent/mgr/JMSPurgeMan.jsp create mode 100644 WebContent/mgr/JMSReceiverMan.jsp create mode 100644 WebContent/mgr/_condperrtginfo.jsp create mode 100644 WebContent/mgr/_refmsgid.jsp create mode 100644 WebContent/mgr/adapter.jsp create mode 100644 WebContent/mgr/adaptergrp.jsp create mode 100644 WebContent/mgr/b2badaptermap.jsp create mode 100644 WebContent/mgr/b2bextract.jsp create mode 100644 WebContent/mgr/b2bservice.jsp create mode 100644 WebContent/mgr/bizkey.jsp create mode 100644 WebContent/mgr/businessday.jsp create mode 100644 WebContent/mgr/c2rservice.jsp create mode 100644 WebContent/mgr/currentTx.jsp create mode 100644 WebContent/mgr/currentWeb.jsp create mode 100644 WebContent/mgr/eaimessage.jsp create mode 100644 WebContent/mgr/eaiserver.jsp create mode 100644 WebContent/mgr/errorcode.jsp create mode 100644 WebContent/mgr/firstAccountInfo.jsp create mode 100644 WebContent/mgr/inflowAdapter.jsp create mode 100644 WebContent/mgr/inflowInterface.jsp create mode 100644 WebContent/mgr/kbmessage.jsp create mode 100644 WebContent/mgr/kbmsgparser.jsp create mode 100644 WebContent/mgr/lifecycle.jsp create mode 100644 WebContent/mgr/messagekey.jsp create mode 100644 WebContent/mgr/newsvcmonitor.jsp create mode 100644 WebContent/mgr/property.jsp create mode 100644 WebContent/mgr/refmsgid.jsp create mode 100644 WebContent/mgr/restrictInfo.jsp create mode 100644 WebContent/mgr/routing.jsp create mode 100644 WebContent/mgr/stdmessage.jsp create mode 100644 WebContent/mgr/svcmessages.jsp create mode 100644 WebContent/mgr/svcmonitor.jsp create mode 100644 WebContent/mgr/svcmonitorbwk.jsp create mode 100644 WebContent/mgr/testcall.jsp create mode 100644 WebContent/mgr/transRuleReload.jsp create mode 100644 WebContent/mgr/transformer/Transform.jsp create mode 100644 WebContent/mgr/transformer/TransformFunc.jsp create mode 100644 WebContent/mgr/transformer/layout.jsp create mode 100644 WebContent/mgr/transformer/layoutItem.jsp create mode 100644 WebContent/mgr/transformer/layoutType.jsp create mode 100644 WebContent/mgr/useDateControl.jsp create mode 100644 WebContent/mgr/viewThreadList.jsp diff --git a/WebContent/mgr/JMSPurgeMan.jsp b/WebContent/mgr/JMSPurgeMan.jsp new file mode 100644 index 0000000..e0ccc83 --- /dev/null +++ b/WebContent/mgr/JMSPurgeMan.jsp @@ -0,0 +1,407 @@ +<%@ page import="java.util.*"%> +<%@ page import="com.eactive.eai.common.message.*,java.text.SimpleDateFormat"%> +<%@ page import="javax.jms.*,com.eactive.eai.flowcontrol.jms.*,javax.naming.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%! +public final static String JMS_FACTORY = "com.eactive.eai.common.FlowRouterConnectionFactory"; + +public ArrayList displayQueue(String queueName, String mSelector, int maxCount) throws Exception { + + ArrayList al = new ArrayList(); + + InitialContext ctx = ctx = new InitialContext(); + + QueueConnectionFactory qconFactory = null; + QueueConnection qcon = null; + QueueSession qsession = null; + QueueBrowser qbrowser = null; + javax.jms.Queue queue = null; + + int count = 0; + try { + java.text.DateFormat DATE_FORMAT = DATE_FORMAT = java.text.DateFormat.getDateTimeInstance( + java.text.DateFormat.SHORT, java.text.DateFormat.SHORT); + if (DATE_FORMAT instanceof java.text.SimpleDateFormat) + ((java.text.SimpleDateFormat) DATE_FORMAT) + .applyPattern("yy/MM/dd kk:mm:ss"); + + qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY); + qcon = qconFactory.createQueueConnection(); + + qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); + queue = (javax.jms.Queue) ctx.lookup(queueName); + + if(mSelector != null && mSelector.length() > 0) { + qbrowser = qsession.createBrowser(queue, mSelector); + } + else { + qbrowser = qsession.createBrowser(queue); + } + qcon.start(); + + Enumeration e = qbrowser.getEnumeration(); + Message m = null; + + if (! e.hasMoreElements()) { + System.out.println("There are no messages on this queue. - " + queueName); + } + else { + System.out.println(queueName + " - Queued JMS Messages: "+DATE_FORMAT.format(new java.util.Date(System + .currentTimeMillis()))); + + while (e.hasMoreElements()) { + m = (Message) e.nextElement(); + count++; + System.out.println("get Message " + count ); + + /* + System.out.println("Message ID " + m.getJMSMessageID() + + " delivered " + new Date(m.getJMSTimestamp()) + + " to " + m.getJMSDestination()); + System.out.print("\tExpires "); + + if (m.getJMSExpiration() > 0) { + System.out.println( new Date( m.getJMSExpiration())); + } + else { + System.out.println("never"); + } + + System.out.println("\tPriority " + m.getJMSPriority()); + System.out.println("\tMode " + ( + m.getJMSDeliveryMode() == DeliveryMode.PERSISTENT ? + "PERSISTENT" : "NON_PERSISTENT")); + System.out.println("\tCorrelation ID " + m.getJMSCorrelationID()); + System.out.println("\tReply to " + m.getJMSReplyTo()); + System.out.println("\tMessage type " + m.getJMSType()); + System.out.println("\tMessage BizCode " + m.getStringProperty("BizCode")); + + if (m instanceof TextMessage) { + System.out.println("\tTextMessage \"" + + ((TextMessage)m).getText() + "\""); + } + */ + + if(count > maxCount) { + break; + } + else { + if(m instanceof ObjectMessage) { + al.add(m); + } + } + } + } + } + catch( Exception e ) { + //e.printStackTrace(); + } + finally { + try { + if(qbrowser != null) qbrowser.close(); + if(qsession != null) qsession.close(); + if(qcon != null) qcon.close(); + } + catch(Exception ex) {} + } + return al; +} + +public ArrayList purgeQueue(String queueName, String mSelector, int purgeSize, boolean isLogging) throws Exception { + + ArrayList al = new ArrayList(); + + InitialContext ctx = new InitialContext(); + + QueueConnectionFactory qconFactory = null; + QueueConnection qcon = null; + QueueSession qsession = null; + QueueReceiver qreceiver = null; + javax.jms.Queue queue = null; + + long sTime = System.currentTimeMillis(); + + long cTime = 0; + + int purgeCount = 0; + + try { + java.text.DateFormat DATE_FORMAT = DATE_FORMAT = java.text.DateFormat.getDateTimeInstance( + java.text.DateFormat.SHORT, java.text.DateFormat.SHORT); + if (DATE_FORMAT instanceof java.text.SimpleDateFormat) + ((java.text.SimpleDateFormat) DATE_FORMAT) + .applyPattern("yy/MM/dd kk:mm:ss"); + + qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY); + qcon = qconFactory.createQueueConnection(); + + qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); + queue = (javax.jms.Queue) ctx.lookup(queueName); + + if(mSelector != null && mSelector.length() > 0) { + qreceiver = qsession.createReceiver(queue, mSelector); + } + else { + qreceiver = qsession.createReceiver(queue); + } + qcon.start(); + + Message m = null; + + System.out.println(">> "+queueName + " - Queued JMS Messages: "+DATE_FORMAT.format(new java.util.Date(System + .currentTimeMillis()))); + cTime = System.currentTimeMillis() - sTime; + sTime = System.currentTimeMillis(); + + for(int i=0; i> No more Message in Queue - " + queueName); + System.out.println(">> Stop Purge."); + break; + } + + purgeCount++; + + System.out.println("\n>> purge "+(i+1)); + + if(isLogging) { + /* + System.out.println("Message ID " + m.getJMSMessageID() + + " delivered " + new Date(m.getJMSTimestamp()) + + " to " + m.getJMSDestination()); + System.out.print("\tExpires "); + + if (m.getJMSExpiration() > 0) { + System.out.println( new Date( m.getJMSExpiration())); + } + else { + System.out.println("never"); + } + + System.out.println("\tPriority " + m.getJMSPriority()); + System.out.println("\tMode " + ( + m.getJMSDeliveryMode() == DeliveryMode.PERSISTENT ? + "PERSISTENT" : "NON_PERSISTENT")); + System.out.println("\tCorrelation ID " + m.getJMSCorrelationID()); + System.out.println("\tReply to " + m.getJMSReplyTo()); + System.out.println("\tMessage type " + m.getJMSType()); + System.out.println("\tMessage BizCode " + m.getStringProperty("BizCode")); + + if (m instanceof TextMessage) { + System.out.println("\tTextMessage \"" + + ((TextMessage)m).getText() + "\""); + } + */ + if(m instanceof ObjectMessage) { + al.add(m); + } + } + } + System.out.println("----------------------------------------------------------------"); + System.out.println(">> Purge "+purgeCount+" messages completed : connect time("+cTime+") ms, purge time (" + + (System.currentTimeMillis() - sTime) +") ms"); + + System.out.println("----------------------------------------------------------------"); + + return al; + } + + catch( Exception e ) { + throw e; + } + finally { + try { + if(qreceiver != null) qreceiver.close(); + if(qsession != null) qsession.close(); + if(qcon != null) qcon.close(); + } + catch(Exception ex) {} + } +}%> +<% + ArrayList al = null; + String queueName = request.getParameter("queueName"); + String maxCount = request.getParameter("maxCount"); + String fromTime = request.getParameter("fromTime"); + String toTime = request.getParameter("toTime"); + + + String selector = request.getParameter("selector"); + + String actionType = request.getParameter("actionType"); + + String[][] monitorDataTotal = null; + String[][] monitorData = null; + + String timeSelector = ""; + String mSelector = ""; + if( (fromTime != null && fromTime.length() == 14) && (toTime != null && toTime.length() == 14)) { + SimpleDateFormat SDF_YYYYMMDDHHMMSS_NO_MARK = new SimpleDateFormat( "yyyyMMddHHmmss"); + Date fDate= SDF_YYYYMMDDHHMMSS_NO_MARK.parse(fromTime); + Date tDate= SDF_YYYYMMDDHHMMSS_NO_MARK.parse(toTime); + Calendar calendar = new GregorianCalendar(TimeZone.getTimeZone("GMT+09:00"),Locale.KOREA); + calendar.setTime (fDate); + Long ftimeMili = calendar.getTimeInMillis(); + + calendar.setTime (tDate); + Long ttimeMili = calendar.getTimeInMillis(); + + timeSelector = "JMSTimestamp BETWEEN " + ftimeMili + " AND " + ttimeMili ; + + if(selector != null && selector.trim().length() > 0) { + mSelector = selector + " AND " + timeSelector; + } + else { + mSelector = timeSelector; + } + } + + FCQueueReceiverManager man = FCQueueReceiverManager.getInstance(); + System.out.println("actionType = " + actionType); + System.out.println("queueName = " + queueName); + System.out.println("maxCount = " + maxCount); + System.out.println("selector = " + selector); + System.out.println("fromTime = " + fromTime); + System.out.println("toTime = " + toTime); + System.out.println("mSelector = " + mSelector); + + String errorMsg = null; + + try { + if("DISPLAY".equals(actionType)) { + System.out.println("DISPLAY : queueName = " + queueName); + int mCount = Integer.parseInt(maxCount); + al = displayQueue(queueName, mSelector, mCount); + } + else if("PURGE".equals(actionType)) { + System.out.println("PURGE : queueName = " + queueName); + int mCount = Integer.parseInt(maxCount); + al = purgeQueue(queueName, mSelector, mCount, true); + } + else { + System.out.println("Unhandled Action " + actionType); + } + + + } catch(Exception e) { + errorMsg = e.getMessage(); + } + +%> + + + + FC Queue Purger + + + + +

+ FC Queue Receiver Manager +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+<% + if(errorMsg != null) { +%> +Error : <%= errorMsg %> +<% + } +%> +
* Queue Name" >
* Message Count" >
Selector" >
Selector Time(yyyyMMddHHmmss) + " > + " > +
Selector keys( EAIBWKCLS, EAISVCCD, OSIDINSTCD )
+ + +

+ + + + + + + +<% + + if(al == null || al.size() == 0) { +%> + + + +<% + } + else { + try { + for(int i=0; i + + + + + + +<% + + } + } + } catch(Exception e) { + out.println(e.getMessage()); + } + } +%> +
JMS MsgIDJMS deliveredBwkClsEAISvcCd
No Message in Queue 
<%= om.getJMSMessageID() %> <%= new Date(om.getJMSTimestamp()) %> <%= msg.getBwkCls() %> <%= msg.getEAISvcCd() %> 

+ +
+ + \ No newline at end of file diff --git a/WebContent/mgr/JMSReceiverMan.jsp b/WebContent/mgr/JMSReceiverMan.jsp new file mode 100644 index 0000000..10b435b --- /dev/null +++ b/WebContent/mgr/JMSReceiverMan.jsp @@ -0,0 +1,245 @@ +<%@ page import="javax.jms.*,com.eactive.eai.flowcontrol.jms.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<% + String receiverName = request.getParameter("receiverName"); + String queueName = request.getParameter("queueName"); + String errorQueueName = request.getParameter("errorQueueName"); + String receiverCount = request.getParameter("receiverCount"); + String delayMs = request.getParameter("delayMs"); + String retryCnt = request.getParameter("retryCnt"); + String selector = request.getParameter("selector"); + String descr = request.getParameter("descr"); + + String sreceiverName = request.getParameter("s_receiverName"); + String actionType = request.getParameter("actionType"); + + String[][] monitorDataTotal = null; + String[][] monitorData = null; + + FCQueueReceiverManager man = FCQueueReceiverManager.getInstance(); + System.out.println("actionType = " + actionType); + + + System.out.println("sreceiverName = " + sreceiverName); + + String errorMsg = null; + + String[] receiverNames = null; + + try { + if("START".equals(actionType)) { + System.out.println("START : receiverName = " + receiverName); + int ireceiverCount = Integer.parseInt(receiverCount); + int idelayMs = Integer.parseInt(delayMs); + int iretryCnt = Integer.parseInt(retryCnt); + FCQueueReceiverVO vo = new FCQueueReceiverVO(); + vo.setReceiverName(receiverName); + vo.setQueueName(queueName); + vo.setErrorQueueName(errorQueueName); + vo.setReceiverCount(ireceiverCount); + vo.setErrorDelayTimeMs(idelayMs); + vo.setRetryCount(iretryCnt); + vo.setMessageSelector(selector); + vo.setDescription(descr); + + man.setFCQueueReceiver(vo); + } + else if("STOP".equals(actionType)) { + System.out.println("STOP : receiverName = " + sreceiverName); + man.removeFCQueueReceiver(sreceiverName); + } + else if("STATUS".equals(actionType)) { + System.out.println("STATUS : receiverName = " + sreceiverName); + monitorDataTotal = man.getMonitorData(); + monitorData = man.getMonitorData(sreceiverName); + FCQueueReceiverVO vo = man.getFCQueueReceiver(sreceiverName); + receiverName = vo.getReceiverName(); + queueName = vo.getQueueName(); + errorQueueName = vo.getErrorQueueName(); + receiverCount = "" + vo.getReceiverCount(); + delayMs = "" + vo.getErrorDelayTimeMs(); + retryCnt = "" + vo.getRetryCount(); + selector = vo.getMessageSelector(); + descr = vo.getDescription(); + } + else if("RESET".equals(actionType)) { + System.out.println("RESET : receiverName = " + sreceiverName); + man.resetCount(sreceiverName); + + } + else { + System.out.println("Unhandled Action " + actionType); + } + + System.out.println("receiverName = " + receiverName); + System.out.println("queueName = " + queueName); + System.out.println("errorQueueName= " + errorQueueName); + System.out.println("receiverCount = " + receiverCount); + System.out.println("delayMs = " + delayMs); + System.out.println("retryCnt = " + retryCnt); + System.out.println("selector = " + selector); + System.out.println("descr = " + descr); + + } catch(Exception e) { + errorMsg = e.getMessage(); + //e.printStackTrace(); + } + + try { + receiverNames = man.getAllReceiverNames(); + } catch(Exception e) { + errorMsg = e.getMessage(); + //e.printStackTrace(); + } +%> + + + + FC Queue Receiver Manager + + + + +

+ FC Queue Receiver Manager +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+<% + if(errorMsg != null) { +%> +Error : <%= errorMsg %> +<% + } +%> +
* Receiver Name" >
* Queue Name" >
* Error Queue Name" >
* Queue Thread Count" >
* Error Delay Time(ms)" >
* Retry Count" >
Selector" >
Selector keys( EAIBWKCLS, EAISVCCD, OSIDINSTCD )
Description" >
+ + + + + + + +

+ + + + + + +<% + if(monitorDataTotal != null) { + for(int i=0; i + + + + + +<% + } + } +%> +
Receiver NameMSG COUNTSUCCESS
<%= monitorDataTotal[i][0] %> <%= monitorDataTotal[i][1] %> <%= monitorDataTotal[i][2] %> 

+ Detail : <%= sreceiverName %>
+ STATUS : 0 -Wait, 1-Runnung, 2- Retry
+ + + + + + + +<% + if(monitorData != null) { + for(int i=0; i + + + + + + +<% + } + } +%> +
Receiver NameMSG COUNTSUCCESSSTATUS
<%= monitorData[i][0] %> <%= monitorData[i][1] %> <%= monitorData[i][2] %> <%= monitorData[i][3] %> 
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/_condperrtginfo.jsp b/WebContent/mgr/_condperrtginfo.jsp new file mode 100644 index 0000000..541ff4d --- /dev/null +++ b/WebContent/mgr/_condperrtginfo.jsp @@ -0,0 +1,14 @@ +<%@ page language="java" contentType="text/html;charset=utf-8"%> + + + + EAI 조건부 라우팅 정보 테이블 + + + +

+ EAI 조건부 라우팅 정보 테이블 페이지 입니다.
+ 프로퍼티 정보 출력/수정 페이지 작성 필요합니다. +

+ + \ No newline at end of file diff --git a/WebContent/mgr/_refmsgid.jsp b/WebContent/mgr/_refmsgid.jsp new file mode 100644 index 0000000..98f8f28 --- /dev/null +++ b/WebContent/mgr/_refmsgid.jsp @@ -0,0 +1,14 @@ +<%@ page language="java" contentType="text/html;charset=utf-8"%> + + + + EAI 참고 메시지 ID + + + +

+ EAI 참고 메시지 ID 페이지 입니다.
+ 프로퍼티 정보 출력/수정 페이지 작성 필요합니다. +

+ + \ No newline at end of file diff --git a/WebContent/mgr/adapter.jsp b/WebContent/mgr/adapter.jsp new file mode 100644 index 0000000..c854495 --- /dev/null +++ b/WebContent/mgr/adapter.jsp @@ -0,0 +1,126 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.adapter.AdapterGroupVO"%> +<%@ page import="com.eactive.eai.adapter.AdapterManager"%> +<%@ page import="com.eactive.eai.adapter.AdapterVO"%> + +<% + String flag = ""; + + AdapterManager manager = AdapterManager.getInstance(); + List grpList = manager.getAllAdapterGroupNames(); + + String selectedName = request.getParameter("groupName"); + String selectedadp = request.getParameter("adpName"); + if (selectedName == null && grpList.size() > 0) + selectedName = (String)grpList.get(0); + + AdapterGroupVO grpVO = manager.getAdapterGroupVO(selectedName); + String[] adpNames = grpVO.getAdapterNames(); + + if (selectedadp == null && adpNames.length > 0) + selectedadp = adpNames[0]; + + AdapterVO aVO = manager.getAdapterVO(selectedName,selectedadp ); + + + if ("S".equals(request.getParameter("flag"))) { + grpVO = manager.getAdapterGroupVO(selectedName); + adpNames = grpVO.getAdapterNames(); + selectedadp = adpNames[0]; + aVO = grpVO.getAdapterVO(selectedadp); + } + + if (selectedName != null && selectedadp != null) { + aVO = manager.getAdapterVO(selectedName, selectedadp); + } + +%> + + + + + Adpater Informations + + + + +

+ 어댑터 정보

+

+
+ + + + + + + + + + +
어댑터 그룹명 :   +
어댑터 이름 :   +

+ + <% + if (aVO != null) { + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + <% + } + %> +
  어뎁터업무 이름 :   
  리스너클래스명 :   
  프라퍼티 그룹명 :   
  테스터클래스명 :   
  어뎁터 상태 :   
  AdapterVO :  <%=aVO.toString()%>
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/adaptergrp.jsp b/WebContent/mgr/adaptergrp.jsp new file mode 100644 index 0000000..c504a6e --- /dev/null +++ b/WebContent/mgr/adaptergrp.jsp @@ -0,0 +1,184 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.adapter.AdapterGroupVO"%> +<%@ page import="com.eactive.eai.adapter.AdapterManager"%> +<%@ page import="com.eactive.eai.adapter.AdapterVO"%> + +<% + AdapterManager manager = AdapterManager.getInstance(); + List alls = manager.getAllAdapterGroupNames(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if (selectedKey == null && alls.size() > 1) { + selectedKey = (String)alls.get(0); + } + + AdapterGroupVO vo = null; + + if (selectedKey != null) { + vo = manager.getAdapterGroupVO(selectedKey); + } + +%> + + + + + Adpater Informations + + + + +

+ 어댑터 그룹정보

+

+ +
+ + + + + + + + + + +
어댑터그룹명 :    +
 

+
+<% + if (vo != null) { +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  어댑터 그룹명 :   
  업무구분코드 :   
  표준/비표준 :   
  어댑터 사용구분 :   
  송수신 로그여부 :   
  IN/OUT 구분 :   
  어뎁터 유형 :   
  메시지타입 :   
  참조 클래스명 :   
  KESA F/W 사용여부 :   
  특정 LU 사용여부 :   
  대외기관코드
(표준전문셋팅) :  
 
  어댑터 기관코드
(대외기관명) :  
 
  업체코드 데이터
(업무데이터 추출 룰) :  
 
  TAS 어댑터 여부 :   
  어댑터 별명 :   
  AdapterGroupVO.toString() :  <%=vo.toString()%>

+ + + + + + + + + <% + if (vo != null) { + Iterator adtIt = vo.getAdapters(); + while(adtIt.hasNext()) { + AdapterVO adtVO = (AdapterVO)adtIt.next(); + %> + + + + + + + + + +<% + } + } +%> +<% + } +%> + +
 어뎁터업무 이름 리스너클래스명 프라퍼티 그룹명 테스터클래스명 어댑터 정보
+ + + \ No newline at end of file diff --git a/WebContent/mgr/b2badaptermap.jsp b/WebContent/mgr/b2badaptermap.jsp new file mode 100644 index 0000000..788e085 --- /dev/null +++ b/WebContent/mgr/b2badaptermap.jsp @@ -0,0 +1,165 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.b2badaptermapping.B2BAdapterMapManager"%> +<%@ page import="com.eactive.eai.common.b2badaptermapping.*"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + + B2BAdapterMapManager manager = B2BAdapterMapManager.getInstance(); + String action = request.getParameter("actionType"); + String[] alls = manager.getAllKeyNames(); + + String selectedKey = request.getParameter("selectedKey"); + + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + //manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + B2BAdapterMapVO vo = null; + + if(selectedKey!=null) { + vo = manager.getB2BAdapterMap(selectedKey); + } + +%> + + + + + + + B2BAdapterMapManager + + + + +

+ 라우팅 특정포트 매핑 관리

+

+
+ + + + + + + + + + + + + +
EAI 서비스 코드 :    +
 

+ + + + + + + +<% + if(vo != null ){ + +%> + + + + + + + + + +<% + String[] fkeys = vo.getAllKeyNames(); + for(int i=0; i< fkeys.length; i++) { + B2BAdapterMapFldVO fld = vo.getB2BAdapterMapFld(fkeys[i]); +%> + + + + + + + + + + + + + + + + + + + + + +<% + } +} +%> +
  내용  
  EAI서버인스턴스명 :   
  EAI서비스코드 :   
MAP FIELD : (<%=fkeys[i]%>)  
  기관코드 :   
 세부업무구분명 :   
  어뎁터업무그룹명 :   
  어뎁터업무이름 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/b2bextract.jsp b/WebContent/mgr/b2bextract.jsp new file mode 100644 index 0000000..3294142 --- /dev/null +++ b/WebContent/mgr/b2bextract.jsp @@ -0,0 +1,153 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.b2bextractor.B2BExtractManager"%> +<%@ page import="com.eactive.eai.common.b2bextractor.B2BExtractVO"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + B2BExtractManager manager = B2BExtractManager.getInstance(); + String[] alls = manager.getAllKeyNames(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + int seq = 1; + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + // 마지막 제거 + manager.reload(selectedKey.substring(0,selectedKey.length()-1)); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + B2BExtractVO vo = null; + if(selectedKey!=null) { + vo = manager.getB2BExtract(selectedKey); + } + +%> + + + + + + + B2BExtractManager + + + + +

+ 라우팅 필드추출 정보 관리

+

+
+ + + + + + + + + + + + + + + + + + + +
IF서비스코드+IF서비스처리번호 :    +
IF서비스코드 :   
IF서비스처리번호 :   
+
+ + + + + + + +<% + if(vo != null ){ + +%> + + + + + + + + + + + + + + + + + + +<% +} +%> +
  내용  
  IF서비스코드 :   
  IF서비스 처리번호 :   
  기관코드추출 CLASS :   
  어댑터라우팅추출 CLASS :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/b2bservice.jsp b/WebContent/mgr/b2bservice.jsp new file mode 100644 index 0000000..8a40543 --- /dev/null +++ b/WebContent/mgr/b2bservice.jsp @@ -0,0 +1,250 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.b2bservice.B2BServiceManager"%> +<%@ page import="com.eactive.eai.common.b2bservice.B2BServiceVO"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + + B2BServiceManager manager = B2BServiceManager.getInstance(); + String action = request.getParameter("actionType"); + String [] alls = manager.getAllKeys(); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + // 마지막 제거 + manager.reload(selectedKey.substring(0,selectedKey.length()-1)); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + B2BServiceVO vo = null; + if(selectedKey!=null) { + vo = manager.getB2BServiceVO(selectedKey); + } + +%> + + + + + + + B2BServiceManager + + + + +

+ 라우팅 B2B기관 정보 관리

+

+
+ + + + + + + + + + + + + + + + + + + +
기관코드 + 서비스처리순서 :   +
기관코드 :    
서비스처리번호 :    
+
+ + + + + + +<% + if(vo != null ){ + +%> + + + + + + + + + + + + + + + + + +<%-- + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% +} +%> +
  내용  
 기관코드 :   
 서비스처리순서 :   
  수동인터페이스유형 :    +
  수동업무시스템명 :   
  수동시스템ID :   
  수동시스템서비스코드 :   
  수동시스템인터페이스유형 :   
  FailOver여부 :    +
  변환유무 :    +
  변환메시지ID :   
  기본응답메시지비교값 :   
  기본응답변환유무 :   
  기본응답변환메시지ID :   
  오류응답메시지비교값 :   
  오류응답변환유무 :   
  오류응답변환메시지ID :   
  다음서비스처리순서 :   
  Outbound라우팅명 :   
  타임아웃값 :   
  보상서비스처리코드 :   
  추가삭제여부 :   
  헤더제어구분코드 :   
  참고클래스명 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/bizkey.jsp b/WebContent/mgr/bizkey.jsp new file mode 100644 index 0000000..36184e0 --- /dev/null +++ b/WebContent/mgr/bizkey.jsp @@ -0,0 +1,151 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.bizkey.BizKeyFldVO"%> +<%@ page import="com.eactive.eai.common.bizkey.BizKeyManager"%> +<%@ page import="com.eactive.eai.common.bizkey.BizKeyVO"%> + +<% + BizKeyManager manager = BizKeyManager.getInstance(); + String[] alls = manager.getAllKeyNames(); + String action = request.getParameter("actionType"); + + + String selectedKey = request.getParameter("selectedKey"); + + if(selectedKey == null && alls.length > 1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + //마지막 TR 을 빼고 처리 해야됨 + manager.reload(selectedKey.substring(0, selectedKey.length()-2), selectedKey.substring(selectedKey.length()-2)); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + + BizKeyVO vo = null; + if(selectedKey != null) { + vo = manager.getBizKey(selectedKey); + } +%> + + + + BizKey Manager + + + + +

+ 로그조회키 관리

+

+
+ + + + + + + + + + + + + +
로그조회키 :    +
 
+
+ + + + + +<% + if(vo != null) { +%> + + + + + + + + + + <% + int fldSize = vo.getBizKeyFldLength(); + for(int i=0; i + + + + + + + + + + + + +<% + } + } +%> +
  Property Key     Property Value
  EAI서비스코드 :   
  추출구분 :   + <% + int exrClassLength = EAITable.EXR_CLASS_TYPES.length; + String exrClassTypeName = ""; + for(int i=0; i  +
 FldPrcssNo[<%= vo.getBizKeyFld(i).getColPssSeq() %>]  
  메시지유형 :    +
  업무필드명 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/businessday.jsp b/WebContent/mgr/businessday.jsp new file mode 100644 index 0000000..2793a14 --- /dev/null +++ b/WebContent/mgr/businessday.jsp @@ -0,0 +1,41 @@ +<%@ page import="java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.kbstar.eai.common.businessday.*"%> + +<% + BusinessDayManager manager = BusinessDayManager.getInstance(); + Map messages = manager.getAllBusinessDays(); +%> + + + 일자전환 변경대상 정보 + + + +

+ 일자전환 변경대상 정보

+

+
+ + + + + +<% + Iterator it = messages.keySet().iterator(); + for(int i=0;it.hasNext();i++) { + BusinessDayVO vo = (BusinessDayVO)messages.get((String)it.next()); +%> + + + + +<% } %> +
EAI 서비스코드전문유효일자
<%= vo.getEAISvcName() %><%= vo.getTelgmValdYmd() %>
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/c2rservice.jsp b/WebContent/mgr/c2rservice.jsp new file mode 100644 index 0000000..42bba32 --- /dev/null +++ b/WebContent/mgr/c2rservice.jsp @@ -0,0 +1,222 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.c2rservice.C2RServiceManager"%> +<%@ page import="com.eactive.eai.common.c2rservice.C2RServiceVO"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + + String action = request.getParameter("actionType"); + + C2RServiceManager manager = C2RServiceManager.getInstance(); + String key[] = manager.getAllKeys(); + + String selectedKey = request.getParameter("selectKeys"); + int seq = 1; + if(selectedKey == null && key.length>0) { + selectedKey = key[0]; + } + + C2RServiceVO sm = null; + + if(selectedKey!=null) { + sm = manager.getC2RServiceVO(selectedKey); + } + +%> + + + + + + + C2RServiceManager + + + + +

+ C2RService Configuration

+

+
+ + + + + + + +
+ + + + + +
  +
+

+ + + + + + + +<% + if(sm != null ){ + +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% +} +%> +
  내용  
 기관코드 :   
 서비스처리순서 :   
  수동인터페이스유형 :    +
  수동업무시스템명 :   
  수동시스템ID :   
  수동시스템서비스코드 :   
  수동시스템인터페이스유형 :   
  FailOver여부 :    +
  변환유무 :    +
  변환메시지ID :   
  기본응답메시지비교값 :   
  기본응답변환유무 :   
  기본응답변환메시지ID :   
  오류응답메시지비교값 :   
  오류응답변환유무 :   
  오류응답변환메시지ID :   
  다음서비스처리순서 :   
  Outbound라우팅명 :   
  타임아웃값 :   
  보상서비스처리코드 :   
  추가삭제여부 :   
  헤더제어구분코드 :   
  참고클래스명 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/currentTx.jsp b/WebContent/mgr/currentTx.jsp new file mode 100644 index 0000000..450c568 --- /dev/null +++ b/WebContent/mgr/currentTx.jsp @@ -0,0 +1,76 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.adapter.AdapterGroupVO"%> +<%@ page import="com.eactive.eai.adapter.AdapterManager"%> +<%@ page import="com.eactive.eai.adapter.Keys"%> + + +<%@ page import="com.eactive.eai.inbound.processor.RequestProcessor"%> + +<% + AdapterManager manager = AdapterManager.getInstance(); + List all = manager.getAllAdapterGroupNames(); + + String flag = request.getParameter("flag"); + if(flag!=null && flag.equals("reset")) { + RequestProcessor.resetCount(); + } + + +%> + + + + + 어댑터 별 진행 서비스 수 + + + + +

+ RequestProcessor 처리 현황 +

+
+ + + + + + + + + + + + +
현재수신 건수에러건수초기화
<%= RequestProcessor.rcvCount()%><%= RequestProcessor.errCount()%>
+
+
+

+ 어댑터 별 진행 서비스 수 +

+ + + + + + + <% + for(int i=0;i + + + + + + <% }%> +
이름상태진행건수
<%=g.getName()%><%=g.isStarted()%><%=g.currentTx()%>
+ + + \ No newline at end of file diff --git a/WebContent/mgr/currentWeb.jsp b/WebContent/mgr/currentWeb.jsp new file mode 100644 index 0000000..2aed23f --- /dev/null +++ b/WebContent/mgr/currentWeb.jsp @@ -0,0 +1,17 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ page import="com.eactive.eai.common.web.FrontFilter"%> + + + + Currrnet Tx in Web Application + + + +

+ Currrnet Tx in Web Application +

+ + + + \ No newline at end of file diff --git a/WebContent/mgr/eaimessage.jsp b/WebContent/mgr/eaimessage.jsp new file mode 100644 index 0000000..5454675 --- /dev/null +++ b/WebContent/mgr/eaimessage.jsp @@ -0,0 +1,366 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.message.EAIMessage"%> +<%@ page import="com.eactive.eai.common.message.ServiceMessage"%> +<%@ page import="com.eactive.eai.common.message.EAIMessageManager"%> + +<% + EAIMessageManager manager = EAIMessageManager.getInstance(); + String[] alls = manager.getAllEAISvcCd(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + + EAIMessage vo = null; + + if(selectedKey!=null) { + vo = manager.getEAIMessage(selectedKey); + } + + +%> + + + + + EAIMessage Manager + + + + +

+ EAI 서비스 코드관리

+

+
+ + + + + + + + + + + + + +
EAI서비스코드   +
 

+ + + + +<% + if(vo != null) { +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% + if(vo.getSvcMsgs().size()<=0) { +%> + +<% + } + else { +%> + +<% + } +%> + + + + <% + } +%> +
  내용  
  EAI서비스코드 :   
  EAI서버인스턴스명 :   
  서비스시간유무 :   +   +
  서비스동시사용 :   +   +
  서비스처리유형 :   +   +
  Flow Control라우팅명 :   
  통합유형 :   +   +
  기동서비스구분 :   +   +
  서비스처리순서 :   
  로그처리일련번호 :   
  서비스전열로그여부 :   +   +
  업무구분 :   
  표준메시지사용구분 :   +   +
  기동시스템인터페이스유형 :   
  레이어메시지ID :   
  서버로그레벨 :   +   +
  서비스로그레벨 :   +   +
  오류EAI서비스명 :   
  오류요청변환ID명 :   
  오류요청에러필드명 :   
  오류응답변환ID명 :   
  오류응답에러필드명 :   
  EAI서비스 설명 :   
  EAI서버구분코드 :   
  그룹사코드 :   
  거래처리구분 :   
  사용여부 :   
  서비스처리정보리스트 :    0건 입니다.    <%=vo.getSvcMsgs().size()%>  건  
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/eaiserver.jsp b/WebContent/mgr/eaiserver.jsp new file mode 100644 index 0000000..6ff096e --- /dev/null +++ b/WebContent/mgr/eaiserver.jsp @@ -0,0 +1,106 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.server.EAIServerManager"%> +<%@ page import="com.eactive.eai.common.server.EAIServerVO"%> + +<% + EAIServerManager manager = EAIServerManager.getInstance(); + String[] alls = manager.getAllEaiSvrInstNm(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + + EAIServerVO vo = null; + + if(selectedKey!=null) { + vo = manager.getEAIServer(selectedKey); + } +%> + + + + + EAIServer Manager + + + + +

+ 서버 관리

+

+
+ + + + + + + + + + +
EAI Server 인스턴스명 :    +
 

+ + + + +<% + if(vo != null) { +%> + + + + + + + + + + + + + + + + + + + + + + + + + + <% + } +%> +
  내용  
  서버 인스턴스명 :   
  서버 아이피 :   
  서버 포트 :   
  장애극복서버명 :   
  호스트명 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/errorcode.jsp b/WebContent/mgr/errorcode.jsp new file mode 100644 index 0000000..c5a8e60 --- /dev/null +++ b/WebContent/mgr/errorcode.jsp @@ -0,0 +1,111 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.errorcode.ErrorCodeManager"%> +<%@ page import="com.eactive.eai.common.errorcode.ErrorCodeVO"%> + +<% + ErrorCodeManager manager = ErrorCodeManager.getInstance(); + String[] alls = manager.getAllCodes(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + ErrorCodeVO vo = null; + + if(selectedKey != null){ + vo = manager.getMessageVO(selectedKey); + } + + +%> + + + + Error Code Message Manager + + + + +

+ 오류메시지 관리

+

+
+ + + + + + + + + + + + + + +
  +
 

+ + + + +<% if(vo!=null) { %> + + + + + + + + + + + + +<% } else { %> + +<% } %> +
  내용  
오류메시지 코드 :   
오류메시지 :   
조치사항 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/firstAccountInfo.jsp b/WebContent/mgr/firstAccountInfo.jsp new file mode 100644 index 0000000..cff9a77 --- /dev/null +++ b/WebContent/mgr/firstAccountInfo.jsp @@ -0,0 +1,48 @@ +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="java.io.*, java.util.*"%> +<%@ page import="com.eactive.eai.agent.firstaccount.ShareMemory" %> +<% + ShareMemory sm = ShareMemory.getInstance(); + String accNum = sm.getAccoutName(); + String [] accNumArr = accNum.split(","); +%> + + + + FirstAccount Info + + + + +

+ FirstAccount Info

+

+
+ + + + + +
FirstAccount :<%=accNum %>
+
+ + + + + + <% + for(int i=0; i + + + + + <% + } + %> + +
  ¼ø¹ø     ¸ñ·Ï
[ <%=i %> ] :   <%=accNumArr[i] %>
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/inflowAdapter.jsp b/WebContent/mgr/inflowAdapter.jsp new file mode 100644 index 0000000..26a9029 --- /dev/null +++ b/WebContent/mgr/inflowAdapter.jsp @@ -0,0 +1,81 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.inflow.InflowControlManager"%> +<%@ page import="com.eactive.eai.common.inflow.InflowTargetVO"%> + +<% + InflowControlManager manager = InflowControlManager.getInstance(); + String[] names = manager.getAdapterAllKeys(); + String selectedName = request.getParameter("name"); + if(selectedName == null && names.length>0) selectedName = names[0]; + InflowTargetVO vo = manager.getAdapterInflow(selectedName); +%> + + + + Inflow Adapter Manager + + + + +

+ Infow Adapter Configuration

+

+
+ +<% + if(selectedName!=null) { +%> + + + + + <% + if (vo != null){ + %> + + + + + + + + + + + + + + + + + + <% + } + %> +<% } else { %> + +<% } %> +
어댑터명 :    +
선택된 어댑터명 :   
초당 임계치 :   
추가 임계치 :   
추가 임계치 TimeUnit :   
+ + + + +
+ +

+
+ + \ No newline at end of file diff --git a/WebContent/mgr/inflowInterface.jsp b/WebContent/mgr/inflowInterface.jsp new file mode 100644 index 0000000..42fae72 --- /dev/null +++ b/WebContent/mgr/inflowInterface.jsp @@ -0,0 +1,81 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.inflow.InflowControlManager"%> +<%@ page import="com.eactive.eai.common.inflow.InflowTargetVO"%> + +<% + InflowControlManager manager = InflowControlManager.getInstance(); + String[] names = manager.getInterfaceAllKeys(); + String selectedName = request.getParameter("name"); + if(selectedName == null && names.length>0) selectedName = names[0]; + InflowTargetVO vo = manager.getInterfaceInflow(selectedName); +%> + + + + Inflow Interface Manager + + + + +

+ Infow Interface Configuration

+

+
+ +<% + if(selectedName!=null) { +%> + + + + + <% + if (vo != null){ + %> + + + + + + + + + + + + + + + + + + <% + } + %> +<% } else { %> + +<% } %> +
인터페이스명 :    +
선택된 인터페이스명 :   
초당 임계치 :   
추가 임계치 :   
추가 임계치 TimeUnit :   
+ + + + +
+ +

+
+ + \ No newline at end of file diff --git a/WebContent/mgr/kbmessage.jsp b/WebContent/mgr/kbmessage.jsp new file mode 100644 index 0000000..8643068 --- /dev/null +++ b/WebContent/mgr/kbmessage.jsp @@ -0,0 +1,228 @@ +<%-- <%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.agent.AgentUtil"%> +<%@ page import="com.eactive.eai.agent.command.Command"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.kbstar.eai.common.kbmessage.*"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + KBMessageManager manager = KBMessageManager.getInstance(); + String[] alls = manager.getAllKBMessageKeys(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + KBMessage vo = null; + + if(selectedKey != null){ + vo = manager.getKBMessage(selectedKey); + } + + +%> + + + + + EAI KBMessage Manager + + + + +

+ EAI KB내부표준 메시지 관리

+

+
+ + + + + + + + + + + + +
업무 서비스 키 :    +
 
+
+
+ + + + + +<% + if(vo != null) { +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% + } +%> +
  Property Key     Property Value
  업무 서비스 키 :    
  CICS트랜코드 :    
  전문요청구분코드 : (S-요청 /R-응답)   
  그룹회사코드 :    
  수신거래코드 :    
  처리결과수신거래코드 :    
  화면번호 :    
  대외기관코드 :    
  내외부구분코드 : (1-내부/2-외부)   
  원거래복원여부 : (0-불필요/1-필요)   
  복합거래요청구분코드 : (' '-없음/T-다중전송/A-다중조합)   
  시스템운영환경구분코드 : (O-운영/S-테스트,스테이징/D-개발/R-DR)   
  취소구분코드 : (1-정상/3-정정취소/4-정정/5-취소)   
  EAI거래코드   
  EAI내외부구분코드   
  채널구분코드   
  채널세부업무구분코드   
  매체구분코드   
  거래부점코드   
  사용자 직원번호   
  은행코드   
+ + --%> \ No newline at end of file diff --git a/WebContent/mgr/kbmsgparser.jsp b/WebContent/mgr/kbmsgparser.jsp new file mode 100644 index 0000000..689a69e --- /dev/null +++ b/WebContent/mgr/kbmsgparser.jsp @@ -0,0 +1,68 @@ +<%-- <%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.kbstar.eai.common.kbmessage.*,com.kbstar.eai.common.kbmessage.parser.*"%> +<% + String action = request.getParameter("Convert"); + String kbmessagetext = ""; + String fixeddata = ""; + String xmldata = ""; + String errorMsg = ""; + + if("Convert".equals(action)) { + try { + kbmessagetext = request.getParameter("kbmessagetext"); + //KBMessage kbMsg = KBMessageUtil.convert(kbmessagetext.getBytes(), false); + KBMessageParser parser = KBMessageParserFactory.createPaserFactory(KBMessageParserType.ASC.toString()); + KBMessage kbMsg = parser.convert(kbmessagetext.getBytes()); + fixeddata = kbMsg.toString(); + xmldata = kbMsg.toXMLString(); + } + catch(Exception e) { + errorMsg = e.getMessage(); + } + } +%> + + + + KBMessage Util + + + + +

+ Message Parser

+

+
+ + + + +<% if(errorMsg != null && errorMsg.length() > 0) { %> + + + +<% } %> +
+ +
<%= errorMsg %>
+ + + + + + + + + + + + + +
 KBMessage 전문 
 전문파싱 
 XML 전문 
+
+ --%> \ No newline at end of file diff --git a/WebContent/mgr/lifecycle.jsp b/WebContent/mgr/lifecycle.jsp new file mode 100644 index 0000000..d85f169 --- /dev/null +++ b/WebContent/mgr/lifecycle.jsp @@ -0,0 +1,138 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.lifecycle.Lifecycle"%> +<%@ page import="com.eactive.eai.common.lifecycle.LifecycleManager"%> +<%@ page import="com.eactive.eai.common.lifecycle.LifecycleVO"%> +<%@ page import="java.util.HashMap"%> +<%@ page import="com.eactive.eai.common.util.* "%> +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + + LifecycleManager manager = ApplicationContextProvider.getContext().getBean(LifecycleManager.class); + String action = request.getParameter("actionType"); + + List lists = manager.getLifecycleVOList(); + + String[] alls = new String[lists.size()]; + + for(int i=0; i< alls.length; i++){ + alls[i] = ((LifecycleVO)lists.get(i)).getLifecycleClass(); + } + + String selectedKey = request.getParameter("selectedKey"); + + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + + LifecycleVO vo = null; + + if(selectedKey!=null) { + for(int i=0; i < alls.length; i++){ + String lifeC = ((LifecycleVO)lists.get(i)).getLifecycleClass(); + if(selectedKey.equals(lifeC)){ + vo = (LifecycleVO)lists.get(i); + } + } + } + +%> + + + + + + LifeCycle Manager + + + + +

+ 라이프사이클 관리

+

+
+ + + + + + + + + + + +
라이프사이클 클래스명 :   +

+ + + + + + + +<% + if(vo != null ){ + +%> + + + + + + + + + + + + + +<% +} +%> +
  내용  
  라이프사이클 클래스명 :   
  로딩순서 :   
  라이프사이클 구분코드 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/messagekey.jsp b/WebContent/mgr/messagekey.jsp new file mode 100644 index 0000000..e5960d9 --- /dev/null +++ b/WebContent/mgr/messagekey.jsp @@ -0,0 +1,185 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.messagekey.*"%> + +<% + MessageKeyManager manager = MessageKeyManager.getInstance(); + String[] alls = manager.getAllKeyNames(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + //I를 "," 로 분리 해야됨 + manager.reload(selectedKey.substring(0,selectedKey.length()-1),selectedKey.substring(selectedKey.length()-1) ); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + + MessageKeyVO vo = null; + if(selectedKey != null){ + vo = manager.getMessageKey(selectedKey); + } + String voName = (String)vo.getName(); + String adptName = voName.substring(0, voName.length()-1); + String exrTp = voName.substring(voName.length()-1); + +%> + + + + MessageKey Manager + + + + +

+ 메세지키 관리

+

+
+ + + + + + + + + + + + + + + + + +
어댑터명 + 기능구분 :    +
어댑터명 :    
기능구분 :    
+
+ + + + +<% + if(vo != null) { +%> + + + + + + + + + + + + + <% + int groupSize = vo.getAlMsgGroups().size(); + for(int g=0; g + + + +<% + MessageKeyGroupVO group = vo.getMessageKeyGroup(g); + int fldSize = group.getMessageKeyFldLength(); + for(int i=0; i + + + + + + + + + + + + + + + + + + + + + + + + + +<% + } + } + } +%> + +
  내용  
  어댑터명 :    
  메시지유형 :     + +
  기능구분 :     +
 Group[<%= g %>]  
 Field[<%= i %>]  
  업무필드명 :    
  클래스명 :    
  필드시작위치 :    
  필드길이 :    
  정상값 :    
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/newsvcmonitor.jsp b/WebContent/mgr/newsvcmonitor.jsp new file mode 100644 index 0000000..2093e5c --- /dev/null +++ b/WebContent/mgr/newsvcmonitor.jsp @@ -0,0 +1,304 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.message.EAIMessage"%> +<%@ page import="com.eactive.eai.common.message.ServiceMessage"%> +<%@ page import="com.eactive.eai.common.message.EAIMessageManager"%> +<%@ page import="com.eactive.eai.common.monitor.EAIServiceMonitor"%> +<%@ page import="com.eactive.eai.common.monitor.MonitorVO"%> +<%@ page import="java.util.HashMap"%> + +<% + + EAIServiceMonitor monitor = EAIServiceMonitor.getInstance(); + String[] voKey = monitor.getAllMonitorVOKey(); + String action = request.getParameter("actionType"); + MonitorVO vo = null; + String[] pssCntKey = null; + String[] pssErrCntKey = null; + HashMap pssCnt = null; + HashMap pssCntInPeriod = null; + HashMap errPssCnt = null; + HashMap errPssCntInPeriod = null; + + String selectedSvcCds = request.getParameter("svcCds"); + if(selectedSvcCds == null && voKey.length>=1){ + selectedSvcCds = voKey[0]; + } + + if(selectedSvcCds!=null) { + vo = monitor.getMonitorVO(selectedSvcCds); + if("RESET".equals(action)) { + vo.reset(); + } + pssCntKey = vo.getAllPssCntKey(); + pssCnt = vo.getPssCnt(); + pssCntInPeriod = vo.getPssCntInPeriod(); + errPssCnt = vo.getErrPssCnt(); + errPssCntInPeriod = vo.getErrPssCntInPeriod(); + + pssErrCntKey = vo.getAllErrPssCntKey(); + + } + + if("ALLRESET".equalsIgnoreCase(action)){ + monitor.resetAll(); + } +%> + + + + + Service ID/Log Sequence 별 통계 Monitor + + + + +

+ Service ID/Log Sequence 별 통계 데이터

+

+
+ + + + + + + + +
+ + + + + +
  +
+
+ + + +

+ + +<% + if(pssCntKey != null && pssCntKey.length >0){ + if(vo != null) { +%> + + + + + + + + + + + + <% + int pssCntKeyLength = pssCntKey.length; + int pssErrCntKeyLength = pssErrCntKey.length; + + long[] verTotal = new long[pssErrCntKeyLength]; + long[] verInPeriodTotal = new long[pssErrCntKeyLength]; + for(int i=0;i + + + <% + } + %> + + + + <% + for(int i=0;i + + + + <% + } + double avgOfprocessTime = 0; + double psvAvgOfProcessTime = 0; + + if("AA".equalsIgnoreCase(vo.getIfType())){ + if(Long.parseLong(pssCnt.get(pssCntKey[1]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[1]).toString()); + } + if(Long.parseLong(pssCnt.get(pssCntKey[3]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[3]).toString()); + } + } + else{ + + if(Long.parseLong(pssCnt.get(pssCntKey[3]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[3]).toString()); + } + } + if(Long.parseLong(pssCnt.get(pssCntKey[2]).toString()) > 0 && vo.getPsvSumOfPssTime() > 0 ){ + psvAvgOfProcessTime = vo.getPsvSumOfPssTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[2]).toString()); + } + %> + + + + + + + + <% + + for(int i=0;i + + + + <% + } + %> + + + + + + <% + for(int i=0;i + + <% + + } + %> + + + + + + + + + + + + + + + + <% + + for(int i=0;i + + + <% + } + %> + + + + <% + for(int i=0;i + + + + <% + } + + double avgOfprocessTimeInPeriod = 0; + double psvAvgOfProcessTimeInPeriod = 0; + + if("AA".equalsIgnoreCase(vo.getIfType())){ + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[1]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[1]).toString()); + } + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()); + } + } + else{ + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()); + } + } + + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[2]).toString()) >0 && vo.getPsvSumOfPssTimeInPeriod() > 0){ + psvAvgOfProcessTimeInPeriod = vo.getPsvSumOfPssTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[2]).toString()); + } + + %> + + + + + + + + <% + for(int i=0;i + + + + <% + } + %> + + + + + + <% + for(int i=0;i + + <% + + } + %> + + + <% + } + }else{ + %> +
   일일 통계
구분Log Sequence 별 처리 누적 EAI 시스템 평균 처리시간(초) 수동 시스템 평균 처리시간(초)
<%=pssErrCntKey[i]%>
  처리 건수 :      +    
  에러 발생 건수 
  Log Sequence 별 합계 :  
   최근시간 통계
구분Log Sequence 별 처리 누적 EAI 시스템 평균 처리시간(초) 수동 시스템 평균 처리시간(초)
<%=pssErrCntKey[i]%>
처리 건수 :      +    
  에러 발생 건수 
  Log Sequence 별 합계 :  
+ 해당 서비스 ID에 대한 거래 내역이 없습니다. + <% + } + %> + +
+ + \ No newline at end of file diff --git a/WebContent/mgr/property.jsp b/WebContent/mgr/property.jsp new file mode 100644 index 0000000..6416820 --- /dev/null +++ b/WebContent/mgr/property.jsp @@ -0,0 +1,109 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.property.PropGroupVO"%> +<%@ page import="com.eactive.eai.common.property.PropManager"%> + +<% + PropManager manager = PropManager.getInstance(); + String[] alls = manager.getAllPropGroupNames(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + + PropGroupVO vo = null; + + String[] keys = null; + if(selectedKey!=null) { + vo = manager.getPropGroupVO(selectedKey); + keys = vo.keys(); + } +%> + + + + Property Manager + + + + +

+ 프라퍼티 관리

+

+
+ + + + + + + + + + + + + +
프라퍼티 그룹 :    +
 
+
+ + + + + + <% + if(vo!=null) { + for (int i=0; i + + + + + <% + } + } + %> +
  Property Key     Property Value
  <%=keys[i]%> :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/refmsgid.jsp b/WebContent/mgr/refmsgid.jsp new file mode 100644 index 0000000..cdf2062 --- /dev/null +++ b/WebContent/mgr/refmsgid.jsp @@ -0,0 +1,144 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.message.EAIMessage"%> +<%@ page import="com.eactive.eai.common.message.ServiceMessage"%> +<%@ page import="com.eactive.eai.common.message.EAIMessageManager"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + + String action = request.getParameter("actionType"); + String seq = request.getParameter("actionSeq"); + String eAISvcCd = checkNull(request.getParameter("id")); + + EAIMessageManager manager = EAIMessageManager.getInstance(); + String[] eaiSvcCds = manager.getAllEAISvcCd(); + + String selectedSvcCds = request.getParameter("svcCds"); + if(selectedSvcCds == null && eaiSvcCds.length>=1) { + selectedSvcCds = eaiSvcCds[0]; + } + if(eAISvcCd.length() > 0) + selectedSvcCds = eAISvcCd; + + EAIMessage eAIMsg = new EAIMessage(); + List svcMsg = new ArrayList(); + + + if(selectedSvcCds!=null) { + System.out.println("selectedSvcCds : "+ selectedSvcCds); + eAIMsg = manager.getEAIMessage(selectedSvcCds); + svcMsg = eAIMsg.getSvcMsgs(); + } + +%> + + + + + + EAI RefMessageIds Manager + + + + +

+ EAI RefMessageIDs Configuration

+

+
+ + + + + + + + +
EAI 서비스코드   +

+ + + + + +<% + if(svcMsg != null) { + int size = svcMsg.size(); + for(int i=0; i + + + + + + + + + +<% + if(refmsgid != null && refmsgid.length >0){ + for(int j=0; j + + + + + + + + +<% + } + } + } +} + +%> +
  내용  
+ +
 SvcPssSeq[<%= i+1 %>]  
  RefMsgIDSeq :   
  RefMsgID :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/restrictInfo.jsp b/WebContent/mgr/restrictInfo.jsp new file mode 100644 index 0000000..d3978e4 --- /dev/null +++ b/WebContent/mgr/restrictInfo.jsp @@ -0,0 +1,89 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.restrict.*"%> + +<% + RestrictInfoManager manager = RestrictInfoManager.getInstance(); + + String action = request.getParameter("actionType"); + if("RELOAD".equals(action)) { + System.out.println("restrictInfo.jap - RELOAD called"); + manager.reload(); + } + + String[] names = manager.getAllCodes(); + Map messages = manager.getAllRestrictInfos(); + String selectedName = request.getParameter("code"); + if(selectedName == null && names.length>1) selectedName = names[0]; + +%> + + + + RestrictInfoManager + + + + +

+ RestrictInfo

+

+
+ + +<% if(selectedName!=null) { %> + + + + + + + + + + + + + + + + + + + + + + + + +<% } else { %> + +<% } %> +
  +
 
 
 
 
 
+ + + + +
+ +

+
+ + \ No newline at end of file diff --git a/WebContent/mgr/routing.jsp b/WebContent/mgr/routing.jsp new file mode 100644 index 0000000..8527f2c --- /dev/null +++ b/WebContent/mgr/routing.jsp @@ -0,0 +1,120 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.routing.RoutingManager"%> +<%@ page import="com.eactive.eai.common.routing.RoutingVO"%> + +<% + RoutingManager manager = RoutingManager.getInstance(); + String[] alls = manager.getAllRoutingNames(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + RoutingVO vo = null; + + if(selectedKey != null){ + vo = manager.getRoutingVO(selectedKey); + } +%> + + + + + Routing Manager + + + + +

+ 라우팅 관리

+

+
+ + + + + + + + + + + + + +
라우팅명 :    +
 

+ + + + +<% + if(vo != null) { +%> + + + + + + + + + + + + + + + + + + + + + <% + } +%> +
  내용  
  라우팅명 :   
  동기 라우팅 URI :   
  비동기 라우팅 URI :   
  레이어구분코드 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/stdmessage.jsp b/WebContent/mgr/stdmessage.jsp new file mode 100644 index 0000000..3ff9e38 --- /dev/null +++ b/WebContent/mgr/stdmessage.jsp @@ -0,0 +1,129 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.agent.AgentUtil"%> +<%@ page import="com.eactive.eai.agent.command.Command"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.stdmessage.*"%> +<%@ page import="com.eactive.eai.common.server.EAIServerManager"%> +<%@ page import="java.util.HashMap"%> +<%@ page import="com.eactive.eai.message.StandardMessage"%> +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + STDMessageManager manager = STDMessageManager.getInstance(); + String[] alls = manager.getAllSTDMessageKeys(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + StandardMessage vo = null; + + if(selectedKey != null) { + vo = manager.getSTDMessage(selectedKey); + } +%> + + + + + EAI STDMessage Manager + + + + +

+ EAI 내부표준 메시지 관리

+

+
+ + + + + + + + + + + + +
업무 서비스 키 :    +
 
+
+
+ + + + + +<% + if(vo != null) { +%> + + + + + +<% + } +%> +
  Property Key     Property Value
  XML :   <%=vo.toPrettyJson(false)%>
+ + \ No newline at end of file diff --git a/WebContent/mgr/svcmessages.jsp b/WebContent/mgr/svcmessages.jsp new file mode 100644 index 0000000..ad273d0 --- /dev/null +++ b/WebContent/mgr/svcmessages.jsp @@ -0,0 +1,354 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.message.EAIMessage"%> +<%@ page import="com.eactive.eai.common.message.ServiceMessage"%> +<%@ page import="com.eactive.eai.common.message.EAIMessageManager"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + + EAIMessageManager manager = EAIMessageManager.getInstance(); + String[] alls = manager.getAllEAISvcCd(); + String action = request.getParameter("actionType"); + String eaiSvcCd = checkNull(request.getParameter("id")); + + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + + if(eaiSvcCd.length() > 0){ + selectedKey = eaiSvcCd; + } + + List listVo = null; + + if(selectedKey!=null) { + listVo = manager.getEAIMessage(selectedKey).getSvcMsgs(); + } +%> + + + + + + EAI ServiceMessage Manager + + + + +

+ EAI ServiceMessage Configuration

+

+
+ + + + + + + + +
EAI서비스코드  +
+ + + +
+ + + + + +<% + if(listVo != null) { + int size = listVo.size(); + for(int i=0; i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% + if(sm.getRefMsgIDs() == null || sm.getRefMsgIDs().length <= 0) { +%> + +<% + } + else { +%> + + +<% + } +%> + + + + + + +<% + if(sm.getCondPerRtgInfo() == null || sm.getCondPerRtgInfo().size() <= 0) { +%> + +<% + } + else { +%> + + +<% + } +%> + + +<% + } + + } + +%> +
  내용  
 Field[<%= i %>]  
 서비스처리순서 :   
  수동인터페이스유형 :   +   +
  수동업무시스템명 :   
  수동시스템ID :   
  수동시스템서비스코드 :   
  수동시스템인터페이스유형 :   
  FailOver여부 :   +   +
  변환유무 :   +   +
  변환메시지ID :   
  기본응답메시지비교값 :   
  기본응답변환유무 :   +   +
  기본응답변환메시지ID :   
  오류응답메시지비교값 :   
  오류응답변환유무 :   +   +
  오류응답변환메시지ID :   
  다음서비스처리순서 :   
  Outbound라우팅명 :   
  타임아웃값 :   
  보상서비스처리코드 :   
  추가삭제 여부 :   
  헤더제어구분코드 - [01/02]삭제추가/추가삭제 :   
  참고클래스명 :   
  타이머참고메시지ID :   
참조메시지IDS  0건 입니다.    <%=sm.getRefMsgIDs().length%>  건  
조건부라우팅정보테이블  0건 입니다.    <%=sm.getCondPerRtgInfo().size()%>  건  
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/svcmonitor.jsp b/WebContent/mgr/svcmonitor.jsp new file mode 100644 index 0000000..210c093 --- /dev/null +++ b/WebContent/mgr/svcmonitor.jsp @@ -0,0 +1,310 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.message.EAIMessage"%> +<%@ page import="com.eactive.eai.common.message.ServiceMessage"%> +<%@ page import="com.eactive.eai.common.message.EAIMessageManager"%> +<%@ page import="com.eactive.eai.common.monitor.EAIServiceMonitor"%> +<%@ page import="com.eactive.eai.common.monitor.MonitorVO"%> +<%@ page import="java.util.HashMap"%> + +<% + String actionMessage = ""; + EAIServiceMonitor monitor = EAIServiceMonitor.getInstance(); + String[] voKey = monitor.getAllMonitorVOKey(); + String action = request.getParameter("actionType"); + MonitorVO vo = null; + String[] pssCntKey = null; + String[] pssErrCntKey = null; + HashMap pssCnt = null; + HashMap pssCntInPeriod = null; + HashMap errPssCnt = null; + HashMap errPssCntInPeriod = null; + + String selectedSvcCds = request.getParameter("svcCds"); + if(selectedSvcCds == null && voKey.length>=1) { + selectedSvcCds = voKey[0]; + } + + if(selectedSvcCds!=null) { + vo = monitor.getMonitorVO(selectedSvcCds); + if("RESET".equals(action)) { + vo.reset(); + } + pssCntKey = vo.getAllPssCntKey(); + pssCnt = vo.getPssCnt(); + pssCntInPeriod = vo.getPssCntInPeriod(); + errPssCnt = vo.getErrPssCnt(); + errPssCntInPeriod = vo.getErrPssCntInPeriod(); + + } + + if("ALLRESET".equalsIgnoreCase(action)){ + monitor.resetAll(); + } + else if("RESET_TOLIST".equalsIgnoreCase(action)){ + actionMessage = monitor.resetErrorList(); + } +%> + + + +Service ID/Log Sequence 별 통계 Monitor + + + +

Service ID/Log Sequence 별 통계 데이터
+<% if(actionMessage != null && actionMessage.length() > 0) { %> +Action result : <%= actionMessage %>
+<% } %> +
+

+
+ + + + + + + + +
+ + + + + +
EAI Service Message ID :   
+
+
+ +<% + if(pssCntKey != null && pssCntKey.length >0){ + if(vo != null) { + pssErrCntKey = vo.getAllErrPssCntKey(); + int pssCntKeyLength = pssCntKey.length; + int pssErrCntKeyLength = pssErrCntKey.length; +%> + + + + + + + + + + + + <% + long[] verTotal = new long[pssErrCntKeyLength]; + long[] verInPeriodTotal = new long[pssErrCntKeyLength]; + for(int i=0;i + + + <% + } + %> + + + + <% + for(int i=0;i + + + + <% + } + + double avgOfprocessTime = 0; + double psvAvgOfProcessTime = 0; + + if("AA".equalsIgnoreCase(vo.getIfType())){ + if(Long.parseLong(pssCnt.get(pssCntKey[1]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[1]).toString()); + } + if(Long.parseLong(pssCnt.get(pssCntKey[3]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[3]).toString()); + } + } + else{ + + if(Long.parseLong(pssCnt.get(pssCntKey[3]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[3]).toString()); + } + } + if(Long.parseLong(pssCnt.get(pssCntKey[2]).toString()) > 0 && vo.getPsvSumOfPssTime() > 0 ){ + psvAvgOfProcessTime = vo.getPsvSumOfPssTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[2]).toString()); + + } + System.out.println("vo.getPsvSumOfPssTime() : "+ vo.getPsvSumOfPssTime()); + %> + + + + + + + + + <% + for(int i=0;i + + <% + } + %> + + + + + <% + for(int i=0;i + + <% + + } + %> + + + + + + + + + + + + + + + + <% + + for(int i=0;i + + + <% + } + %> + + + + <% + for(int i=0;i + + + + <% + } + + double avgOfprocessTimeInPeriod = 0; + double psvAvgOfProcessTimeInPeriod = 0; + + if("AA".equalsIgnoreCase(vo.getIfType())){ + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[1]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[1]).toString()); + } + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()); + } + } + else{ + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()); + } + } + + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[2]).toString()) >0 && vo.getPsvSumOfPssTimeInPeriod() > 0){ + psvAvgOfProcessTimeInPeriod = vo.getPsvSumOfPssTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[2]).toString()); + } + + %> + + + + + + + + + <% + for(int i=0;i + + + + <% + } + %> + + + + + + <% + for(int i=0;i + + <% + + } + %> + + + <% + } + } else{ + %> +
   일일 통계
구분Log Sequence 별 처리 누적EAI 시스템 평균 처리시간(초)수동 시스템 평균 처리시간(초)
<%=pssErrCntKey[i]%>
정상    
에러 
합계
   최근시간 통계
구분Log Sequence 별 처리 누적EAI 시스템 평균 처리시간(초)수동 시스템 평균 처리시간(초)
<%=pssErrCntKey[i]%>
정상    
에러 
합계
+해당 서비스 ID에 대한 거래 내역이 없습니다. <% + } + %>
+ + diff --git a/WebContent/mgr/svcmonitorbwk.jsp b/WebContent/mgr/svcmonitorbwk.jsp new file mode 100644 index 0000000..149c1ff --- /dev/null +++ b/WebContent/mgr/svcmonitorbwk.jsp @@ -0,0 +1,407 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.message.EAIMessage"%> +<%@ page import="com.eactive.eai.common.message.ServiceMessage"%> +<%@ page import="com.eactive.eai.common.message.EAIMessageManager"%> +<%@ page import="com.eactive.eai.common.monitor.EAIServiceMonitor"%> +<%@ page import="com.eactive.eai.common.monitor.MonitorVO"%> +<%@ page import="java.util.HashMap"%> + +<% + + EAIServiceMonitor monitor = EAIServiceMonitor.getInstance(); + String[] voKey = monitor.getAllBwkClsKey(); + String action = request.getParameter("actionType"); + + String[] pssCntKey = null; + String[] pssErrCntKey = null; + HashMap pssCnt = null; + HashMap pssCntInPeriod = null; + HashMap errPssCnt = null; + HashMap errPssCntInPeriod = null; + HashMap voByBwk = null; + + long[] verTotalByBwk = null;; + long[] verTotalInPeriodByBwk = null; + double sumOfprocessTimeByBwk = 0; + double psvSumOfProcessTimeByBwk = 0; + double sumOfprocessTimeInPeriodByBwk = 0; + double psvSumOfProcessTimeInPeriodByBwk = 0; + double avgOfprocessTimeByBwk = 0; + double psvAvgOfProcessTimeByBwk = 0; + double avgOfprocessTimeInPeriodByBwk = 0; + double psvAvgOfProcessTimeInPeriodByBwk = 0; + + int countEaiSvcCd = 0; + int countEaiSvcCdInPeriod = 0; + + String selectedBwkCls = request.getParameter("bwkCls"); + if(selectedBwkCls == null && voKey.length>=1){ + selectedBwkCls = voKey[0]; + } + + if(selectedBwkCls!=null) { + voByBwk = monitor.getBwkCls(selectedBwkCls); + } + +%> + + + + + 업무구분 코드/Log Sequence 별 통계 Monitor + + + + +

+ 업무구분 코드/Log Sequence 별 통계 데이터

+

+
+ + + + + + +
+ + + + + +
  +
+

+ + +<% + + if(voByBwk != null){ + + Iterator it = voByBwk.keySet().iterator(); + + String[] keys = new String[voByBwk.size()]; + for(int i = 0; it.hasNext(); i++){ + keys[i] = (String)it.next(); + } + Arrays.sort(keys); + %> + + + + + <% + + for(int j = 0; j< keys.length; j++){ + MonitorVO vo = (MonitorVO)voByBwk.get(keys[j]); + pssCntKey = vo.getAllPssCntKey(); + pssCnt = vo.getPssCnt(); + errPssCnt = vo.getErrPssCnt(); + + pssErrCntKey = vo.getAllErrPssCntKey(); + + //verTotalByBwk = new long[pssCntKey.length]; + //verTotalInPeriodByBwk = new long[pssCntKey.length]; + + verTotalByBwk = new long[pssErrCntKey.length]; + verTotalInPeriodByBwk = new long[pssErrCntKey.length]; + + if(pssCntKey != null && pssCntKey.length >0){ + countEaiSvcCd ++; + int pssCntKeyLength = pssCntKey.length; + int pssErrCntKeyLength = pssErrCntKey.length; +%> + + + + + + + + + + + + + + + <% + + + long[] verTotal = new long[pssErrCntKeyLength]; + + for(int i=0;i + + + <% + } + %> + + + + <% + for(int i=0;i + + + + <% + } + + double avgOfprocessTime = 0; + double psvAvgOfProcessTime = 0; + + if("AA".equalsIgnoreCase(vo.getIfType())){ + if(Long.parseLong(pssCnt.get(pssCntKey[1]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[1]).toString()); + + sumOfprocessTimeByBwk = sumOfprocessTimeByBwk + avgOfprocessTime; + avgOfprocessTimeByBwk = sumOfprocessTimeByBwk / countEaiSvcCd; + } + if(Long.parseLong(pssCnt.get(pssCntKey[3]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[3]).toString()); + + sumOfprocessTimeByBwk = sumOfprocessTimeByBwk + avgOfprocessTime; + avgOfprocessTimeByBwk = sumOfprocessTimeByBwk / countEaiSvcCd; + } + + } + else{ + + if(Long.parseLong(pssCnt.get(pssCntKey[3]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[3]).toString()); + } + + sumOfprocessTimeByBwk = sumOfprocessTimeByBwk + avgOfprocessTime; + avgOfprocessTimeByBwk = sumOfprocessTimeByBwk / countEaiSvcCd; + } + if(Long.parseLong(pssCnt.get(pssCntKey[2]).toString()) > 0 && vo.getPsvSumOfPssTime() > 0 ){ + psvAvgOfProcessTime = vo.getPsvSumOfPssTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[2]).toString()); + + psvSumOfProcessTimeByBwk = psvSumOfProcessTimeByBwk + psvAvgOfProcessTime; + psvAvgOfProcessTimeByBwk = psvSumOfProcessTimeByBwk / countEaiSvcCd; + } + %> + + + + + + + + <% + for(int i=0;i + + + + <% + } + %> + + + + + + <% + + for(int i=0;i + + <% + + } + %> + +<% + } + } +%> + + + <% + for(int i=0;i + + <% + + } + %> + + + +
   일일 통계
 EAI Service Code <%=keys[j]%>
구분Log Sequence 별 처리 누적 EAI 시스템 평균 처리시간(초) 수동 시스템 평균 처리시간(초)
<%=pssErrCntKey[i]%>
정상    +    
에러 
합계
 합계    
+
+ + + + + +<% + for(int j = 0; j< keys.length; j++){ + MonitorVO vo = (MonitorVO)voByBwk.get(keys[j]); + pssCntKey = vo.getAllPssCntKey(); + pssCntInPeriod = vo.getPssCntInPeriod(); + errPssCntInPeriod = vo.getErrPssCntInPeriod(); + + pssErrCntKey = vo.getAllErrPssCntKey(); + + if(pssCntKey != null && pssCntKey.length >0){ + countEaiSvcCdInPeriod++; + int pssCntKeyLength = pssCntKey.length; + int pssErrCntKeyLength = pssErrCntKey.length; +%> + + + + + + + + + + + + + + + + <% + long[] verInPeriodTotal = new long[pssErrCntKeyLength]; + + for(int i=0;i + + + <% + } + %> + + + + <% + for(int i=0;i + + + + <% + } + + double avgOfprocessTimeInPeriod = 0; + double psvAvgOfProcessTimeInPeriod = 0; + + if("AA".equalsIgnoreCase(vo.getIfType())){ + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[1]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[1]).toString()); + sumOfprocessTimeInPeriodByBwk = sumOfprocessTimeInPeriodByBwk + avgOfprocessTimeInPeriod; + avgOfprocessTimeInPeriodByBwk = sumOfprocessTimeInPeriodByBwk / countEaiSvcCdInPeriod; + } + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()); + sumOfprocessTimeInPeriodByBwk = sumOfprocessTimeInPeriodByBwk + avgOfprocessTimeInPeriod; + avgOfprocessTimeInPeriodByBwk = sumOfprocessTimeInPeriodByBwk / countEaiSvcCdInPeriod; + } + + } + else{ + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()); + + sumOfprocessTimeInPeriodByBwk = sumOfprocessTimeInPeriodByBwk + avgOfprocessTimeInPeriod; + avgOfprocessTimeInPeriodByBwk = sumOfprocessTimeInPeriodByBwk / countEaiSvcCdInPeriod; + } + } + + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[2]).toString()) >0 && vo.getPsvSumOfPssTimeInPeriod() > 0){ + psvAvgOfProcessTimeInPeriod = vo.getPsvSumOfPssTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[2]).toString()); + + psvSumOfProcessTimeInPeriodByBwk = psvSumOfProcessTimeInPeriodByBwk + psvAvgOfProcessTimeInPeriod; + psvAvgOfProcessTimeInPeriodByBwk = psvSumOfProcessTimeInPeriodByBwk / countEaiSvcCdInPeriod; + } + + %> + + + + + + + + + <% + for(int i=0;i + + + + <% + } + %> + + + + + + <% + for(int i=0;i + + <% + + } + %> + + + <% + } + } +%> + + + <% + for(int i=0;i + + <% + + } + %> + + + +
   최근시간 통계
   EAI Service Code <%=keys[j]%>
구분Log Sequence 별 처리 누적 EAI 시스템 평균 처리시간(초) 수동 시스템 평균 처리시간(초)
<%=pssErrCntKey[i]%>
정상      
에러 
합계
 합계    
+<% +}else{ + %> + + 해당 업무 구분에 대한 거래 내역이 없습니다. + <% + } + %> + +
+ + \ No newline at end of file diff --git a/WebContent/mgr/testcall.jsp b/WebContent/mgr/testcall.jsp new file mode 100644 index 0000000..a86e12d --- /dev/null +++ b/WebContent/mgr/testcall.jsp @@ -0,0 +1,158 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.adapter.AdapterVO"%> +<%@ page import="com.eactive.eai.agent.command.Command"%> +<%@ page import="com.eactive.eai.agent.testcall.TestCallCommand"%> +<%@ page import="com.eactive.eai.agent.AgentUtil"%> +<%@ page import="com.eactive.eai.common.property.PropManager"%> +<%@ page import="com.eactive.eai.common.testcall.TestCall"%> +<%@ page import="com.eactive.eai.common.testcall.TestCallManager"%> + +<% + TestCallManager manager = TestCallManager.getInstance(); + ArrayList names = new ArrayList(); + String action = request.getParameter("actionType"); + String period = request.getParameter("period"); + Properties prop = new Properties(); + + Iterator it = manager.getAllAdapterNames(); + while(it.hasNext()) { + names.add(it.next()); + } + Collections.sort(names); + + if(period == null|| period.length()<=0){ + + PropManager pmanager = PropManager.getInstance(); + long temp = 1000*60*10; + try { + temp = Long.parseLong(pmanager.getProperty(manager.PROP_GROUP, manager.PROP_PERIOD)); + + } catch(Exception e) {} + + period = ""+temp; + } + String run = ""; + + if("UPDATE".equals(action)) { + prop.setProperty("PERIOD", period); + Command command = new TestCallCommand(); + command.setArgs(prop); + AgentUtil.broadcast(command); + } + if("START".equals(action)){ + run = "START"; + + prop.setProperty("RUN",run); + Command command = new TestCallCommand(); + command.setArgs(prop); + AgentUtil.broadcast(command); + } + if("STOP".equals(action)){ + run = "STOP"; + + prop.setProperty("RUN",run); + Command command = new TestCallCommand(); + command.setArgs(prop); + AgentUtil.broadcast(command); + } + + String status = ""; + + if(manager.isStarted()) + status = "시작됨"; + else + status = "종료됨"; +%> + + + + + TestCall Manager + + + + +

+ TestCall Configuration

+

+
+ + + + + + + + + + + + +
+ + + + + + +
  +
+
+ + + + + +

+ + + + + +<% + if(names != null || names.size() > 0 ) { + int length = names.size(); + + for(int i=0; i + + + + + + + + + + + <% + } +} +%> +
  항목     내용
  Adapter Name :   
  Adapter 상태 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/transRuleReload.jsp b/WebContent/mgr/transRuleReload.jsp new file mode 100644 index 0000000..ab02334 --- /dev/null +++ b/WebContent/mgr/transRuleReload.jsp @@ -0,0 +1,103 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.transformer.engine.TransformEngine"%> + +<% + + String action = request.getParameter("actionType"); + TransformEngine engine = TransformEngine.getInstance(); + + String status = ""; + + if("START".equals(action)){ + engine.start(); + + } + if("STOP".equals(action)){ + engine.stop(); + } + + if(engine.isStarted()) + status = "시작됨"; + else + status = "종료됨"; +%> + + + + + TransRuleReload Manager + + + + +

+ TransRuleReload Configuration

+

+
+ + + + + + + + + + + + + <% + if ("시작됨".equals(status)){ + %> + + + + + + + <% + } else { + %> + + + + + + <% + } + %> + + + + + + + + + + + + + +
  항목    설명  
현재상태 :   
상태변경 버튼 :   
버튼설명 :   TransformEngine 에서 clearEngine()을 실행합니다.
+ +
버튼설명 :   &TransformEngine 에서 initEngine()을 실행합니다.
실행Manager :   LayoutTypeManager
 FunctionManager
 LayoutManager
 TransformManager

+ +
+ + \ No newline at end of file diff --git a/WebContent/mgr/transformer/Transform.jsp b/WebContent/mgr/transformer/Transform.jsp new file mode 100644 index 0000000..2c27a5e --- /dev/null +++ b/WebContent/mgr/transformer/Transform.jsp @@ -0,0 +1,214 @@ +<%-- +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.transformer.layout.Layout"%> +<%@ page import="com.eactive.eai.transformer.transform.Transform"%> +<%@ page import="com.eactive.eai.transformer.transform.TransformItem"%> +<%@ page import="com.eactive.eai.transformer.transform.TransformManager"%> +<%@ page import="com.eactive.eai.transformer.util.TransformKeys"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } + +%> + +<% + TransformManager manager = TransformManager.getManager(); + String key[] = manager.getAllTransformName(); + + String selected = request.getParameter("transformName"); + if(selected == null && key.length>=1) { + selected = key[0]; + } + + Transform transform = null; + ArrayList itemList = new ArrayList(); + Layout target = null; + Iterator it = null; + + if(selected!=null) { + transform = manager.getTransform(selected); + target = transform.getTargetLayout(); + itemList = (ArrayList) transform.getTransformItemList(); + it = transform.getSourceLayoutNames(); + } + int sourceCount = transform.getSourceLayoutCount(); + String sourceName = ""; + for (int i=0; i < sourceCount; i++) { + if ("".equals(sourceName)) + sourceName = (String)it.next(); + else + sourceName = sourceName+" , " + (String)it.next(); + } + +%> + + + + Transform 변환규칙 Manager + + + + +

+ Transform 변환규칙 Configuration

+

+
+ + + + + + +
+ + + + + +
  +
+

+ + + + + + +<% + if(transform != null ){ + +%> + + + + + + + + + + +<% +} else { +%> + + + + +<% +} +%> +
  변환규칙정보  
  변환규칙명 :   <%=transform.getName()%>
  변환규칙설명 :   <%=checkNull(transform.getDescription())%>
  요청하신 변환규칙 정보가 없습니다.  
+ +
+ + + + +<% +if (target != null || it.hasNext()) { + +%> + + + + + + + + + +<% + +} else { +%> + + + + +<% +} +%> + +
  변환소스결과레이아웃 정보  
  소스레이아웃(2개이상일경우 콤마(,)로 구분)    결과 레이아웃  
 <%=sourceName%> <%=target.getName()%>
  요청하신 변환소스결과레이아웃 정보가 없습니다.  
+ +
+ + + + +<% +if (itemList != null && itemList.size() > 0) { + int nCount = 0; + String[] aBgColor = {"#ccccff" , "#e9e1fd"}; + for (int i = 0; i < itemList.size(); i++) { + TransformItem item = (TransformItem) itemList.get(i); +%> + + + + + + + + + + + + + + + + + + + +<% + nCount++; + } +} else { +%> + + + + +<% +} +%> + +
  변환아이템 정보  
  변환항목일련번호 :   <%=item.getSeqNo()%>
  변환결과항목경로명 :   <%=item.getResultItemPath()%>
  변환명령명 :   <%=item.getInstruction()%>
  변환항목기본값 :   <%=checkNull(item.getDefaultValue())%>
  요청하신 변환규칙 아이템 정보가 없습니다.  
+
+ + +--%> \ No newline at end of file diff --git a/WebContent/mgr/transformer/TransformFunc.jsp b/WebContent/mgr/transformer/TransformFunc.jsp new file mode 100644 index 0000000..7c64062 --- /dev/null +++ b/WebContent/mgr/transformer/TransformFunc.jsp @@ -0,0 +1,186 @@ + +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.transformer.function.FunctionDefinition"%> +<%@ page import="com.eactive.eai.transformer.function.FunctionManager"%> +<%@ page import="com.eactive.eai.transformer.function.ParameterDefinition"%> +<%@ page import="com.eactive.eai.transformer.util.TransformKeys"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } + +%> + +<% + FunctionManager manager = FunctionManager.getInstance(); + String[] alls = manager.getAllFunctionNames(); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + + FunctionDefinition vo = null; + ArrayList paramList = new ArrayList(); + + if(selectedKey!=null) { + vo = manager.getFunctionDefinition(selectedKey); + paramList = (ArrayList) vo.getParameterList(); + } + +%> + + + + + + Transform 변환함수 Manager + + + + +

+ 변환함수 관리

+

+
+ + + + + + + + + +
변환함수명 :   +

+ + + + + + +<% + if(vo != null ){ + +%> + + + + + + + + + + + + + + + + + + + + + + +<% +} else { +%> + + + + +<% +} +%> +
  변환함수정보  
  변환함수명 :   <%=vo.getName()%>
  변환함수설명 :   <%=vo.getDescription()%>
  변환함수반환유형 :   <%=TransformKeys.getType(vo.getReturnTypeId())%>
  변환함수클래스명 :   <%=vo.getFunctionClass()%>
  변환함수유형 :   <%=TransformKeys.getFunctionType(vo.getFunctionTypeId())%>
  요청하신 변환함수 정보가 없습니다.  
+
+ + + + +<% +if (paramList != null && paramList.size() > 0) { + + int nCount = 0; + String[] aBgColor = {"#ccccff", "#e9e1fd"}; + for (int i = 0; i < paramList.size(); i++) { + ParameterDefinition param = (ParameterDefinition) paramList.get(i); +%> + + + + + + + + + + + + + + + + + + +<% + nCount++; + } +} else { +%> + + + + +<% +} +%> + +
  LayoutItem 정보  
  변환함수파라미터일련번호 :   <%=param.getSeqNo()%>
  변환함수파라미터명 :   <%=param.getName()%>
  변환함수파라미터설명 :   <%=param.getDescription()%>
  변환함수파라미터유형 :   <%=TransformKeys.getType(param.getTypeId())%>
  요청하신 변환함수 파라메터 정보가 없습니다.  
+
+ + diff --git a/WebContent/mgr/transformer/layout.jsp b/WebContent/mgr/transformer/layout.jsp new file mode 100644 index 0000000..7173606 --- /dev/null +++ b/WebContent/mgr/transformer/layout.jsp @@ -0,0 +1,218 @@ +<%-- +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.transformer.layout.Layout"%> +<%@ page import="com.eactive.eai.transformer.layout.LayoutItem"%> +<%@ page import="com.eactive.eai.transformer.layout.LayoutManager"%> +<%@ page import="com.eactive.eai.transformer.util.TransformKeys"%> +<%@ page import="java.util.HashMap"%> +<%@ taglib uri="netui-tags-databinding.tld" prefix="netui-compat-data"%> +<%@ taglib uri="netui-tags-html.tld" prefix="netui-compat"%> +<%@ taglib uri="netui-tags-template.tld" prefix="netui-compat-template"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } + + StringBuffer html = new StringBuffer(); + + private void makeItem(LayoutItem item) + { + makeHTML(item); + try{ + if (!item.isField() && (item.getChildCount() != 0)) { + for (int i = 0; i < item.getChildCount(); i++) { + if (item.getChild(i).getIndex() == -1) { + makeItem(item.getChild(i)); + } + } + } + }catch (Exception e) { + e.printStackTrace(); + System.out.println("LayoutEdit.jsp error"); + } + } + + private void makeHTML(LayoutItem item) { + + if(item.isMessage()) + html.append(""); + else if (item.isGroup()) + html.append(""); + else + html.append(""); + + html.append(" "+item.getSeqNo()+""); + html.append("  "+checkNull(item.getName())+""); + html.append(" "+TransformKeys.getLoutItemNodePtrnID(item.getNodeTypeId())+""); + html.append(" "+TransformKeys.getType(item.getItemTypeId())+""); + html.append(" "+checkNull(item.getRefInfo())+" "); + html.append(" "+checkNull(item.getOccType())+""); + html.append(" "+item.getOccMax()+""); + html.append(" "+item.getOccMin()+""); + html.append(" "); + + } +%> + +<% + + + LayoutManager manager = LayoutManager.getManager(); + String key[] = manager.getAllLayoutName(); + + String selected = request.getParameter("layoutNames"); + if(selected == null && key.length>=1) { + selected = key[0]; + } + + Layout layout = null; + + if(selected!=null) { + layout = manager.getLayoutByName(selected); + } + + LayoutItem root = null; + if (layout != null) + root = layout.getRootItem(); + + String str = ""; + if (root != null ){ + makeItem(root); + str = html.toString(); + html = new StringBuffer(); + } + +%> + + + + + + Transform Layout Manager + + + + +

+ Transform Layout Configuration

+

+
+ + + + + + + + +
+ + + + + +
  +
+

+ + + + + + +<% + if(layout != null ){ + +%> + + + + + + + + + + + + + + +<% +} else { +%> + + + + +<% +} +%> +
  Layout정보  
  레이아웃명 :   <%=layout.getName()%>
  레이아웃유형명 :   <%=layout.getLayoutType().getName()%>
  레이아웃설명 :   <%=layout.getDescription()%>
  요청하신 Layout 정보가 없습니다.  
+
+ + + + + + + + + + + + + + + + + + <%=str%> +
일련번호레이아웃항목명노드타입항목유형참조정보발생유형최대발생최소발생
+   + LayoutItem 정보  
+
+ + +--%> \ No newline at end of file diff --git a/WebContent/mgr/transformer/layoutItem.jsp b/WebContent/mgr/transformer/layoutItem.jsp new file mode 100644 index 0000000..522e404 --- /dev/null +++ b/WebContent/mgr/transformer/layoutItem.jsp @@ -0,0 +1,211 @@ +<%-- +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.transformer.layout.Layout"%> +<%@ page import="com.eactive.eai.transformer.layout.LayoutItem"%> +<%@ page import="com.eactive.eai.transformer.layout.LayoutManager"%> +<%@ page import="com.eactive.eai.transformer.util.TransformKeys"%> +<%@ page import="java.util.HashMap"%> +<%@ taglib uri="netui-tags-databinding.tld" prefix="netui-compat-data"%> +<%@ taglib uri="netui-tags-html.tld" prefix="netui-compat"%> +<%@ taglib uri="netui-tags-template.tld" prefix="netui-compat-template"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } + +%> + +<% + String layoutName = (String)request.getParameter("layoutName"); + String itemName = (String)request.getParameter("itemName"); + + LayoutManager manager = LayoutManager.getManager(); + Layout layout = manager.getLayoutByName(layoutName); + LayoutItem item = null; + + if(layout != null ) { + layout.updateItemNameMap(); + item = layout.getItemByPath(itemName); + } else { + System.out.println("layoutItem.jsp ] layout is null - " +layoutName); + } + if(item == null ) { + System.out.println("layoutItem.jsp ] layoutItem is null - " +itemName); + } + +%> + + + + + + Transform LayoutItem Manager + + + + +

+ Transform LayoutItem Configuration

+

+
+ + + + + + + +
+ +

+ + + + + + +<% + if(layout != null ){ + +%> + + + + + + + + + + + + + + +<% +} else { +%> + + + + +<% +} +%> +
  Layout정보  
  레이아웃명 :   <%=layout.getName()%>
  레이아웃유형명 :   <%=layout.getLayoutType().getName()%>
  레이아웃설명 :   <%=layout.getDescription()%>
  요청하신 Layout 정보가 없습니다.  
+
+ + + + +<% +if (item != null ) { +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% +} else { +%> + + + + +<% +} +%> + +
  LayoutItem 정보  
  레이아웃항목일련번호 :   <%=item.getSeqNo()%>
  레이아웃항목명 :   <%=item.getName()%>
  부모레이아웃항목 :   <%=item.getParent().getName()%>
  레이아웃항목설명 :   <%=item.getDescription()%>
  레이아웃항목노드유형 :   <%=TransformKeys.getLoutItemNodePtrnID(item.getNodeTypeId())%>
  레이아웃항목유형명 :   <%=TransformKeys.getType(item.getItemTypeId())%>
  레이아웃항목경로명 :   <%=item.getPath()%>
  레이아웃항목길이수 :   <%=item.getLength()%>
  레이아웃항목참조정보 :   <%=item.getRefInfo()%>
  레이아웃항목참조정보2 :   <%=item.getRefOcc()%>
  레이아웃항목발생유형구분코드 :   <%=item.getOccType()%>
  레이아웃항목최대발생건수 :   <%=item.getOccMax()%>
  레이아웃항목최소발생건수 :   <%=item.getOccMin()%>
  레이아웃항목기본값 :   <%=item.getDefaultValue()%>
  레이아웃항목마스킹여부 :   <%=item.getMask()%>
  요청하신 LayoutItem 정보가 없습니다.  
+
+ + +--%> \ No newline at end of file diff --git a/WebContent/mgr/transformer/layoutType.jsp b/WebContent/mgr/transformer/layoutType.jsp new file mode 100644 index 0000000..3f2ff4a --- /dev/null +++ b/WebContent/mgr/transformer/layoutType.jsp @@ -0,0 +1,149 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.transformer.layout.LayoutType"%> +<%@ page import="com.eactive.eai.transformer.layout.LayoutTypeManager"%> +<%@ page import="com.eactive.eai.transformer.util.TransformKeys"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } + +%> + +<% + LayoutTypeManager manager = LayoutTypeManager.getInstance(); + String [] alls = manager.getAllLayoutTypeName(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + LayoutType vo = null; + + if(selectedKey!=null) { + vo = manager.getLayoutType(selectedKey); + } + +%> + + + + + + Transform LayoutType Manager + + + + +

+ 레이아웃 유형 관리

+

+
+ + + + + + + + + + + + + +
레이아웃유형명 :    +
 

+ + + + + + +<% + if(vo != null ){ + +%> + + + + + + + + + + + + + + +<% +} else { +%> + + + + +<% +} +%> +
  LayoutType정보  
  레이아웃유형명 :   <%=vo.getName()%>
  레이아웃유형설명 :   <%=vo.getDescription()%>
  메시지레이아웃생성클래스 :   <%=vo.getGenClass()%>
  요청하신 LayoutType 정보가 없습니다.  
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/useDateControl.jsp b/WebContent/mgr/useDateControl.jsp new file mode 100644 index 0000000..ad077a0 --- /dev/null +++ b/WebContent/mgr/useDateControl.jsp @@ -0,0 +1,77 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.useDate.UseDateControlManager"%> +<%@ page import="com.eactive.eai.common.useDate.UseDateControlVO"%> + +<% + UseDateControlManager manager = UseDateControlManager.getInstance(); + String[] names = manager.getAllKeys(); + String selectedName = request.getParameter("name"); + if(selectedName == null && names.length>0) selectedName = names[0]; + UseDateControlVO vo = manager.get(selectedName); +%> + + + + Use Date Control Manager + + + + +

+ Use Date Control Configuration

+

+
+ +<% + if(selectedName!=null) { +%> + + + + + <% + if (vo != null){ + %> + + + + + + + + + + + + + + <% + } + %> +<% } else { %> + +<% } %> +
인터페이스명 :    +
인터페이스명 :   
시작일자 :   
종료일자 :   
+ + + + +
+ +

+
+ + \ No newline at end of file diff --git a/WebContent/mgr/viewThreadList.jsp b/WebContent/mgr/viewThreadList.jsp new file mode 100644 index 0000000..02acfac --- /dev/null +++ b/WebContent/mgr/viewThreadList.jsp @@ -0,0 +1,115 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> + +<%! + private ThreadGroup getRootThreadGroup() { + ThreadGroup group = Thread.currentThread().getThreadGroup(); + ThreadGroup parent = null; + while(true) { + parent = group.getParent(); + if(parent==null) return group; + + group = parent; + } + } + + private ThreadGroup findThreadGroup(ThreadGroup parent, String path) { + if(path.startsWith("/")) { + path = path.substring(1); + } + + return null; + } + + +%> + +<% + String threadGroupName = request.getParameter("ThreadGroupName"); + + ThreadGroup root = getRootThreadGroup(); + if(threadGroupName==null) threadGroupName=root.getName(); + + ThreadGroup[] children = new ThreadGroup[root.activeGroupCount()]; + root.enumerate(children, true); + + ThreadGroup current = null; + for(int i=0;i + + + + CurrentThread List + + + +

+ 쓰레드 전체 리스트 보기 +

+ + + + + + + +
+ Thread Group List (총: <%=children.length%>개) + + + + + + + + +<% + for(int i=0;i + + + + +<% + } +%> +
NoThreadGroup Name
root <%=root%>
<%=(i+1)%> <%=children[i].getName()%>
+
+
+ Thread List [<%=current.getName()%>] (총: <%=threads.length%>개) + + + + + + + + +<% + for(int i=0;i + + + + + + + + +<% + } +%> +
NoThread NameisAliveisDaemonisInterruptedactiveCount
<%=(i+1)%> <%=threads[i].getName()%> <%=threads[i].isAlive()%> <%=threads[i].isDaemon()%> <%=threads[i].isInterrupted()%> <%=threads[i].activeCount()%>
+
+ + \ No newline at end of file From 7002ec503546ef95bcf2b01dd209acd56f06c5e1 Mon Sep 17 00:00:00 2001 From: "Yunsam.Eo" Date: Fri, 7 Nov 2025 17:51:13 +0900 Subject: [PATCH 10/50] =?UTF-8?q?Controller=EB=B0=A9=EC=8B=9D=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EC=9B=90=EB=B3=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/applicationContext-jpa.xml | 2 +- WebContent/WEB-INF/web.xml | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/WebContent/WEB-INF/applicationContext-jpa.xml b/WebContent/WEB-INF/applicationContext-jpa.xml index 8eb127d..8da5bda 100644 --- a/WebContent/WEB-INF/applicationContext-jpa.xml +++ b/WebContent/WEB-INF/applicationContext-jpa.xml @@ -63,7 +63,7 @@ validate true false - ${hibernate.dialect:org.hibernate.dialect.PostgreSQL10Dialect} + ${hibernate.dialect:org.hibernate.dialect.Oracle12cDialect} 100 100 false diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml index 6661aad..9072ae0 100644 --- a/WebContent/WEB-INF/web.xml +++ b/WebContent/WEB-INF/web.xml @@ -71,6 +71,7 @@ + + + default + weblogic.servlet.FileServlet + + + default + /static/* + + authserver @@ -60,17 +70,17 @@ - - - - - - - - - - - + + + RestApiDynamicInAdapter + com.eactive.eai.adapter.http.dynamic.RestApiAdapterMain + 2 + + + RestApiDynamicInAdapter + /API/* + /api/* + default @@ -70,17 +70,17 @@ - - - RestApiDynamicInAdapter - com.eactive.eai.adapter.http.dynamic.RestApiAdapterMain - 2 - - - RestApiDynamicInAdapter - /API/* - /api/* - + + + + + + + + + + + + none diff --git a/WebContent/agent/host/adapter_socket2_agent1.jsp b/WebContent/agent/host/adapter_socket2_agent1.jsp new file mode 100644 index 0000000..6eac161 --- /dev/null +++ b/WebContent/agent/host/adapter_socket2_agent1.jsp @@ -0,0 +1,114 @@ + +<%@ page contentType="text/xml; charset=utf-8"%> +<%@ page import="com.eactive.eai.adapter.socket2.config.MonitoringUtil"%> +<%@ page import="java.util.*,com.eactive.eai.common.util.Logger" %> + + + + + + + + + + + + + + + + + + +<%! + static Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT); +%> + +<% + // + // Socket2 status info + + + String eaiSvrInstNm = request.getParameter("eaiSvrInstNm"); + String adapterGroupName = request.getParameter("adapterGroupName"); + + if (eaiSvrInstNm == null) + eaiSvrInstNm = ""; + + if (adapterGroupName == null) + adapterGroupName = ""; + + String stateColor = ""; + String stateText = ""; + + String startColor = ""; + String startText = ""; + String startStop = ""; + + + String[][] arrList = null ; + try { + if(adapterGroupName.length() > 0) { + arrList = MonitoringUtil.adapterStatus(adapterGroupName); + } + else { + arrList = MonitoringUtil.adapterList1(); + } + } catch ( Exception e ) { + if (logger.isError()){ + logger.error(e.toString()); + } + } + + // ϵ arrList null ƴϸ鼭 迭̰ 0 Exception ߻ + // ʵ ϱ . (2008-06-30) + if( arrList == null || arrList.length == 0 ) { +%> + + <%=eaiSvrInstNm%> + + + + + + + + + + + + + +<% + + } else { + int col = arrList[0].length ; + int row = arrList.length ; + + for( int i = 0 ; i < row ; i++ ) { + out.println(""); + out.println("" + eaiSvrInstNm + ""); + for( int j = 0 ; j < col ; j++ ) { + if(j == 2) { + out.println(""); + } else { + out.println("" + arrList[i][j] + ""); + } + } + + // ׼ + if(arrList[i] != null && arrList[i].length > 4 ) { + if( "STARTED".equals(arrList[i][7]) || "STARTING".equals(arrList[i][7])) { + startStop = "03" ; // stop + } else { + startStop = "01" ; // start + } + } + + out.println(""+ startStop +""); + out.println(""); + } + } +%> + + diff --git a/WebContent/agent/host/adapter_socket2_agent2.jsp b/WebContent/agent/host/adapter_socket2_agent2.jsp new file mode 100644 index 0000000..6daf110 --- /dev/null +++ b/WebContent/agent/host/adapter_socket2_agent2.jsp @@ -0,0 +1,81 @@ + +<%@ page contentType="text/xml; charset=utf-8"%> +<%@ page import="com.eactive.eai.adapter.socket2.config.MonitoringUtil"%> +<%@ page import="java.util.*,com.eactive.eai.common.util.Logger" %> + + + + + + + + + + + + + + + + +<%! + static Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT); +%> +<% + // + // Socket2 connection info + + String eaiSvrInstNm = request.getParameter("eaiSvrInstNm"); + + if (eaiSvrInstNm == null) + eaiSvrInstNm = ""; + + String stateColor = ""; + String stateText = ""; + + String startColor = ""; + String startText = ""; + String startStop = ""; + + String[][] arrList = null ; + try { + arrList = MonitoringUtil.adapterList2(); + } catch ( Exception e ) { + if (logger.isError()){ + logger.error(e.toString()); + } + } + + // ϵ arrList null ƴϸ鼭 迭̰ 0 Exception ߻ + // ʵ ϱ . (2008-06-30) + if( arrList == null || arrList.length == 0 ) { +%> + + <%=eaiSvrInstNm%> + + + + + + + + + +<% + + } else { + int col = arrList[0].length ; + int row = arrList.length ; + for( int i = 0 ; i < row ; i++ ) { + out.println(""); + out.println("" + eaiSvrInstNm + ""); + + for( int j = 0 ; j < col ; j++ ) { + out.println("" + arrList[i][j] + ""); + } + out.println(""); + } + } +%> + + \ No newline at end of file diff --git a/WebContent/agent/host/adapter_socket2_startstop.jsp b/WebContent/agent/host/adapter_socket2_startstop.jsp new file mode 100644 index 0000000..6d7b74e --- /dev/null +++ b/WebContent/agent/host/adapter_socket2_startstop.jsp @@ -0,0 +1,54 @@ +<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> +<%@ page import="com.eactive.eai.adapter.socket2.config.MonitoringUtil"%> +<%@ page import="com.eactive.eai.common.util.CharsetDecoderUtil" %> +<%@ page import="java.util.*,com.eactive.eai.common.util.Logger" %> +<%! + static Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT); +%> +<% + // + // Socket2 adapter start/stop command + + String adapterGroupName = request.getParameter("adapterGroupName"); + String adapterName = request.getParameter("adapterName"); + String cmd = request.getParameter("cmd"); + + if( adapterGroupName == null ) { + adapterGroupName = "" ; + } + + if( adapterName == null ) { + adapterName = "" ; + } + + if( cmd == null ) { + cmd = "" ; + } + + + String retMsg = null ; + try { + if( cmd.equals("start") ) { + MonitoringUtil.adapterStart(adapterGroupName, adapterName); + retMsg = "true" ; + } else if( cmd.equals("stop") ) { + MonitoringUtil.adapterStop(adapterGroupName, adapterName); + retMsg = "true" ; + } else { + retMsg = "Unknown command error :" + cmd ; + } + } catch ( Exception e ) { + if (logger.isError()){ + logger.error("MonitoringUtil.adapterStart|adapterStop(" + adapterGroupName + ", " + adapterName + ")" ); + } + //e.printStackTrace(new java.io.PrintWriter(out)); + retMsg = "false" ; + } + + if( retMsg == null ) + retMsg = "" ; + + + + out.println( CharsetDecoderUtil.toKor(retMsg) ); +%> diff --git a/WebContent/mgr/JMSPurgeMan.jsp b/WebContent/mgr/JMSPurgeMan.jsp new file mode 100644 index 0000000..e0ccc83 --- /dev/null +++ b/WebContent/mgr/JMSPurgeMan.jsp @@ -0,0 +1,407 @@ +<%@ page import="java.util.*"%> +<%@ page import="com.eactive.eai.common.message.*,java.text.SimpleDateFormat"%> +<%@ page import="javax.jms.*,com.eactive.eai.flowcontrol.jms.*,javax.naming.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%! +public final static String JMS_FACTORY = "com.eactive.eai.common.FlowRouterConnectionFactory"; + +public ArrayList displayQueue(String queueName, String mSelector, int maxCount) throws Exception { + + ArrayList al = new ArrayList(); + + InitialContext ctx = ctx = new InitialContext(); + + QueueConnectionFactory qconFactory = null; + QueueConnection qcon = null; + QueueSession qsession = null; + QueueBrowser qbrowser = null; + javax.jms.Queue queue = null; + + int count = 0; + try { + java.text.DateFormat DATE_FORMAT = DATE_FORMAT = java.text.DateFormat.getDateTimeInstance( + java.text.DateFormat.SHORT, java.text.DateFormat.SHORT); + if (DATE_FORMAT instanceof java.text.SimpleDateFormat) + ((java.text.SimpleDateFormat) DATE_FORMAT) + .applyPattern("yy/MM/dd kk:mm:ss"); + + qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY); + qcon = qconFactory.createQueueConnection(); + + qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); + queue = (javax.jms.Queue) ctx.lookup(queueName); + + if(mSelector != null && mSelector.length() > 0) { + qbrowser = qsession.createBrowser(queue, mSelector); + } + else { + qbrowser = qsession.createBrowser(queue); + } + qcon.start(); + + Enumeration e = qbrowser.getEnumeration(); + Message m = null; + + if (! e.hasMoreElements()) { + System.out.println("There are no messages on this queue. - " + queueName); + } + else { + System.out.println(queueName + " - Queued JMS Messages: "+DATE_FORMAT.format(new java.util.Date(System + .currentTimeMillis()))); + + while (e.hasMoreElements()) { + m = (Message) e.nextElement(); + count++; + System.out.println("get Message " + count ); + + /* + System.out.println("Message ID " + m.getJMSMessageID() + + " delivered " + new Date(m.getJMSTimestamp()) + + " to " + m.getJMSDestination()); + System.out.print("\tExpires "); + + if (m.getJMSExpiration() > 0) { + System.out.println( new Date( m.getJMSExpiration())); + } + else { + System.out.println("never"); + } + + System.out.println("\tPriority " + m.getJMSPriority()); + System.out.println("\tMode " + ( + m.getJMSDeliveryMode() == DeliveryMode.PERSISTENT ? + "PERSISTENT" : "NON_PERSISTENT")); + System.out.println("\tCorrelation ID " + m.getJMSCorrelationID()); + System.out.println("\tReply to " + m.getJMSReplyTo()); + System.out.println("\tMessage type " + m.getJMSType()); + System.out.println("\tMessage BizCode " + m.getStringProperty("BizCode")); + + if (m instanceof TextMessage) { + System.out.println("\tTextMessage \"" + + ((TextMessage)m).getText() + "\""); + } + */ + + if(count > maxCount) { + break; + } + else { + if(m instanceof ObjectMessage) { + al.add(m); + } + } + } + } + } + catch( Exception e ) { + //e.printStackTrace(); + } + finally { + try { + if(qbrowser != null) qbrowser.close(); + if(qsession != null) qsession.close(); + if(qcon != null) qcon.close(); + } + catch(Exception ex) {} + } + return al; +} + +public ArrayList purgeQueue(String queueName, String mSelector, int purgeSize, boolean isLogging) throws Exception { + + ArrayList al = new ArrayList(); + + InitialContext ctx = new InitialContext(); + + QueueConnectionFactory qconFactory = null; + QueueConnection qcon = null; + QueueSession qsession = null; + QueueReceiver qreceiver = null; + javax.jms.Queue queue = null; + + long sTime = System.currentTimeMillis(); + + long cTime = 0; + + int purgeCount = 0; + + try { + java.text.DateFormat DATE_FORMAT = DATE_FORMAT = java.text.DateFormat.getDateTimeInstance( + java.text.DateFormat.SHORT, java.text.DateFormat.SHORT); + if (DATE_FORMAT instanceof java.text.SimpleDateFormat) + ((java.text.SimpleDateFormat) DATE_FORMAT) + .applyPattern("yy/MM/dd kk:mm:ss"); + + qconFactory = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY); + qcon = qconFactory.createQueueConnection(); + + qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); + queue = (javax.jms.Queue) ctx.lookup(queueName); + + if(mSelector != null && mSelector.length() > 0) { + qreceiver = qsession.createReceiver(queue, mSelector); + } + else { + qreceiver = qsession.createReceiver(queue); + } + qcon.start(); + + Message m = null; + + System.out.println(">> "+queueName + " - Queued JMS Messages: "+DATE_FORMAT.format(new java.util.Date(System + .currentTimeMillis()))); + cTime = System.currentTimeMillis() - sTime; + sTime = System.currentTimeMillis(); + + for(int i=0; i> No more Message in Queue - " + queueName); + System.out.println(">> Stop Purge."); + break; + } + + purgeCount++; + + System.out.println("\n>> purge "+(i+1)); + + if(isLogging) { + /* + System.out.println("Message ID " + m.getJMSMessageID() + + " delivered " + new Date(m.getJMSTimestamp()) + + " to " + m.getJMSDestination()); + System.out.print("\tExpires "); + + if (m.getJMSExpiration() > 0) { + System.out.println( new Date( m.getJMSExpiration())); + } + else { + System.out.println("never"); + } + + System.out.println("\tPriority " + m.getJMSPriority()); + System.out.println("\tMode " + ( + m.getJMSDeliveryMode() == DeliveryMode.PERSISTENT ? + "PERSISTENT" : "NON_PERSISTENT")); + System.out.println("\tCorrelation ID " + m.getJMSCorrelationID()); + System.out.println("\tReply to " + m.getJMSReplyTo()); + System.out.println("\tMessage type " + m.getJMSType()); + System.out.println("\tMessage BizCode " + m.getStringProperty("BizCode")); + + if (m instanceof TextMessage) { + System.out.println("\tTextMessage \"" + + ((TextMessage)m).getText() + "\""); + } + */ + if(m instanceof ObjectMessage) { + al.add(m); + } + } + } + System.out.println("----------------------------------------------------------------"); + System.out.println(">> Purge "+purgeCount+" messages completed : connect time("+cTime+") ms, purge time (" + + (System.currentTimeMillis() - sTime) +") ms"); + + System.out.println("----------------------------------------------------------------"); + + return al; + } + + catch( Exception e ) { + throw e; + } + finally { + try { + if(qreceiver != null) qreceiver.close(); + if(qsession != null) qsession.close(); + if(qcon != null) qcon.close(); + } + catch(Exception ex) {} + } +}%> +<% + ArrayList al = null; + String queueName = request.getParameter("queueName"); + String maxCount = request.getParameter("maxCount"); + String fromTime = request.getParameter("fromTime"); + String toTime = request.getParameter("toTime"); + + + String selector = request.getParameter("selector"); + + String actionType = request.getParameter("actionType"); + + String[][] monitorDataTotal = null; + String[][] monitorData = null; + + String timeSelector = ""; + String mSelector = ""; + if( (fromTime != null && fromTime.length() == 14) && (toTime != null && toTime.length() == 14)) { + SimpleDateFormat SDF_YYYYMMDDHHMMSS_NO_MARK = new SimpleDateFormat( "yyyyMMddHHmmss"); + Date fDate= SDF_YYYYMMDDHHMMSS_NO_MARK.parse(fromTime); + Date tDate= SDF_YYYYMMDDHHMMSS_NO_MARK.parse(toTime); + Calendar calendar = new GregorianCalendar(TimeZone.getTimeZone("GMT+09:00"),Locale.KOREA); + calendar.setTime (fDate); + Long ftimeMili = calendar.getTimeInMillis(); + + calendar.setTime (tDate); + Long ttimeMili = calendar.getTimeInMillis(); + + timeSelector = "JMSTimestamp BETWEEN " + ftimeMili + " AND " + ttimeMili ; + + if(selector != null && selector.trim().length() > 0) { + mSelector = selector + " AND " + timeSelector; + } + else { + mSelector = timeSelector; + } + } + + FCQueueReceiverManager man = FCQueueReceiverManager.getInstance(); + System.out.println("actionType = " + actionType); + System.out.println("queueName = " + queueName); + System.out.println("maxCount = " + maxCount); + System.out.println("selector = " + selector); + System.out.println("fromTime = " + fromTime); + System.out.println("toTime = " + toTime); + System.out.println("mSelector = " + mSelector); + + String errorMsg = null; + + try { + if("DISPLAY".equals(actionType)) { + System.out.println("DISPLAY : queueName = " + queueName); + int mCount = Integer.parseInt(maxCount); + al = displayQueue(queueName, mSelector, mCount); + } + else if("PURGE".equals(actionType)) { + System.out.println("PURGE : queueName = " + queueName); + int mCount = Integer.parseInt(maxCount); + al = purgeQueue(queueName, mSelector, mCount, true); + } + else { + System.out.println("Unhandled Action " + actionType); + } + + + } catch(Exception e) { + errorMsg = e.getMessage(); + } + +%> + + + + FC Queue Purger + + + + +

+ FC Queue Receiver Manager +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+<% + if(errorMsg != null) { +%> +Error : <%= errorMsg %> +<% + } +%> +
* Queue Name" >
* Message Count" >
Selector" >
Selector Time(yyyyMMddHHmmss) + " > + " > +
Selector keys( EAIBWKCLS, EAISVCCD, OSIDINSTCD )
+ + +

+ + + + + + + +<% + + if(al == null || al.size() == 0) { +%> + + + +<% + } + else { + try { + for(int i=0; i + + + + + + +<% + + } + } + } catch(Exception e) { + out.println(e.getMessage()); + } + } +%> +
JMS MsgIDJMS deliveredBwkClsEAISvcCd
No Message in Queue 
<%= om.getJMSMessageID() %> <%= new Date(om.getJMSTimestamp()) %> <%= msg.getBwkCls() %> <%= msg.getEAISvcCd() %> 

+ +
+ + \ No newline at end of file diff --git a/WebContent/mgr/JMSReceiverMan.jsp b/WebContent/mgr/JMSReceiverMan.jsp new file mode 100644 index 0000000..10b435b --- /dev/null +++ b/WebContent/mgr/JMSReceiverMan.jsp @@ -0,0 +1,245 @@ +<%@ page import="javax.jms.*,com.eactive.eai.flowcontrol.jms.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<% + String receiverName = request.getParameter("receiverName"); + String queueName = request.getParameter("queueName"); + String errorQueueName = request.getParameter("errorQueueName"); + String receiverCount = request.getParameter("receiverCount"); + String delayMs = request.getParameter("delayMs"); + String retryCnt = request.getParameter("retryCnt"); + String selector = request.getParameter("selector"); + String descr = request.getParameter("descr"); + + String sreceiverName = request.getParameter("s_receiverName"); + String actionType = request.getParameter("actionType"); + + String[][] monitorDataTotal = null; + String[][] monitorData = null; + + FCQueueReceiverManager man = FCQueueReceiverManager.getInstance(); + System.out.println("actionType = " + actionType); + + + System.out.println("sreceiverName = " + sreceiverName); + + String errorMsg = null; + + String[] receiverNames = null; + + try { + if("START".equals(actionType)) { + System.out.println("START : receiverName = " + receiverName); + int ireceiverCount = Integer.parseInt(receiverCount); + int idelayMs = Integer.parseInt(delayMs); + int iretryCnt = Integer.parseInt(retryCnt); + FCQueueReceiverVO vo = new FCQueueReceiverVO(); + vo.setReceiverName(receiverName); + vo.setQueueName(queueName); + vo.setErrorQueueName(errorQueueName); + vo.setReceiverCount(ireceiverCount); + vo.setErrorDelayTimeMs(idelayMs); + vo.setRetryCount(iretryCnt); + vo.setMessageSelector(selector); + vo.setDescription(descr); + + man.setFCQueueReceiver(vo); + } + else if("STOP".equals(actionType)) { + System.out.println("STOP : receiverName = " + sreceiverName); + man.removeFCQueueReceiver(sreceiverName); + } + else if("STATUS".equals(actionType)) { + System.out.println("STATUS : receiverName = " + sreceiverName); + monitorDataTotal = man.getMonitorData(); + monitorData = man.getMonitorData(sreceiverName); + FCQueueReceiverVO vo = man.getFCQueueReceiver(sreceiverName); + receiverName = vo.getReceiverName(); + queueName = vo.getQueueName(); + errorQueueName = vo.getErrorQueueName(); + receiverCount = "" + vo.getReceiverCount(); + delayMs = "" + vo.getErrorDelayTimeMs(); + retryCnt = "" + vo.getRetryCount(); + selector = vo.getMessageSelector(); + descr = vo.getDescription(); + } + else if("RESET".equals(actionType)) { + System.out.println("RESET : receiverName = " + sreceiverName); + man.resetCount(sreceiverName); + + } + else { + System.out.println("Unhandled Action " + actionType); + } + + System.out.println("receiverName = " + receiverName); + System.out.println("queueName = " + queueName); + System.out.println("errorQueueName= " + errorQueueName); + System.out.println("receiverCount = " + receiverCount); + System.out.println("delayMs = " + delayMs); + System.out.println("retryCnt = " + retryCnt); + System.out.println("selector = " + selector); + System.out.println("descr = " + descr); + + } catch(Exception e) { + errorMsg = e.getMessage(); + //e.printStackTrace(); + } + + try { + receiverNames = man.getAllReceiverNames(); + } catch(Exception e) { + errorMsg = e.getMessage(); + //e.printStackTrace(); + } +%> + + + + FC Queue Receiver Manager + + + + +

+ FC Queue Receiver Manager +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+<% + if(errorMsg != null) { +%> +Error : <%= errorMsg %> +<% + } +%> +
* Receiver Name" >
* Queue Name" >
* Error Queue Name" >
* Queue Thread Count" >
* Error Delay Time(ms)" >
* Retry Count" >
Selector" >
Selector keys( EAIBWKCLS, EAISVCCD, OSIDINSTCD )
Description" >
+ + + + + + + +

+ + + + + + +<% + if(monitorDataTotal != null) { + for(int i=0; i + + + + + +<% + } + } +%> +
Receiver NameMSG COUNTSUCCESS
<%= monitorDataTotal[i][0] %> <%= monitorDataTotal[i][1] %> <%= monitorDataTotal[i][2] %> 

+ Detail : <%= sreceiverName %>
+ STATUS : 0 -Wait, 1-Runnung, 2- Retry
+ + + + + + + +<% + if(monitorData != null) { + for(int i=0; i + + + + + + +<% + } + } +%> +
Receiver NameMSG COUNTSUCCESSSTATUS
<%= monitorData[i][0] %> <%= monitorData[i][1] %> <%= monitorData[i][2] %> <%= monitorData[i][3] %> 
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/_condperrtginfo.jsp b/WebContent/mgr/_condperrtginfo.jsp new file mode 100644 index 0000000..541ff4d --- /dev/null +++ b/WebContent/mgr/_condperrtginfo.jsp @@ -0,0 +1,14 @@ +<%@ page language="java" contentType="text/html;charset=utf-8"%> + + + + EAI 조건부 라우팅 정보 테이블 + + + +

+ EAI 조건부 라우팅 정보 테이블 페이지 입니다.
+ 프로퍼티 정보 출력/수정 페이지 작성 필요합니다. +

+ + \ No newline at end of file diff --git a/WebContent/mgr/_refmsgid.jsp b/WebContent/mgr/_refmsgid.jsp new file mode 100644 index 0000000..98f8f28 --- /dev/null +++ b/WebContent/mgr/_refmsgid.jsp @@ -0,0 +1,14 @@ +<%@ page language="java" contentType="text/html;charset=utf-8"%> + + + + EAI 참고 메시지 ID + + + +

+ EAI 참고 메시지 ID 페이지 입니다.
+ 프로퍼티 정보 출력/수정 페이지 작성 필요합니다. +

+ + \ No newline at end of file diff --git a/WebContent/mgr/adapter.jsp b/WebContent/mgr/adapter.jsp new file mode 100644 index 0000000..c854495 --- /dev/null +++ b/WebContent/mgr/adapter.jsp @@ -0,0 +1,126 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.adapter.AdapterGroupVO"%> +<%@ page import="com.eactive.eai.adapter.AdapterManager"%> +<%@ page import="com.eactive.eai.adapter.AdapterVO"%> + +<% + String flag = ""; + + AdapterManager manager = AdapterManager.getInstance(); + List grpList = manager.getAllAdapterGroupNames(); + + String selectedName = request.getParameter("groupName"); + String selectedadp = request.getParameter("adpName"); + if (selectedName == null && grpList.size() > 0) + selectedName = (String)grpList.get(0); + + AdapterGroupVO grpVO = manager.getAdapterGroupVO(selectedName); + String[] adpNames = grpVO.getAdapterNames(); + + if (selectedadp == null && adpNames.length > 0) + selectedadp = adpNames[0]; + + AdapterVO aVO = manager.getAdapterVO(selectedName,selectedadp ); + + + if ("S".equals(request.getParameter("flag"))) { + grpVO = manager.getAdapterGroupVO(selectedName); + adpNames = grpVO.getAdapterNames(); + selectedadp = adpNames[0]; + aVO = grpVO.getAdapterVO(selectedadp); + } + + if (selectedName != null && selectedadp != null) { + aVO = manager.getAdapterVO(selectedName, selectedadp); + } + +%> + + + + + Adpater Informations + + + + +

+ 어댑터 정보

+

+
+ + + + + + + + + + +
어댑터 그룹명 :   +
어댑터 이름 :   +

+ + <% + if (aVO != null) { + %> + + + + + + + + + + + + + + + + + + + + + + + + + + + <% + } + %> +
  어뎁터업무 이름 :   
  리스너클래스명 :   
  프라퍼티 그룹명 :   
  테스터클래스명 :   
  어뎁터 상태 :   
  AdapterVO :  <%=aVO.toString()%>
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/adaptergrp.jsp b/WebContent/mgr/adaptergrp.jsp new file mode 100644 index 0000000..c504a6e --- /dev/null +++ b/WebContent/mgr/adaptergrp.jsp @@ -0,0 +1,184 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.adapter.AdapterGroupVO"%> +<%@ page import="com.eactive.eai.adapter.AdapterManager"%> +<%@ page import="com.eactive.eai.adapter.AdapterVO"%> + +<% + AdapterManager manager = AdapterManager.getInstance(); + List alls = manager.getAllAdapterGroupNames(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if (selectedKey == null && alls.size() > 1) { + selectedKey = (String)alls.get(0); + } + + AdapterGroupVO vo = null; + + if (selectedKey != null) { + vo = manager.getAdapterGroupVO(selectedKey); + } + +%> + + + + + Adpater Informations + + + + +

+ 어댑터 그룹정보

+

+ +
+ + + + + + + + + + +
어댑터그룹명 :    +
 

+
+<% + if (vo != null) { +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  어댑터 그룹명 :   
  업무구분코드 :   
  표준/비표준 :   
  어댑터 사용구분 :   
  송수신 로그여부 :   
  IN/OUT 구분 :   
  어뎁터 유형 :   
  메시지타입 :   
  참조 클래스명 :   
  KESA F/W 사용여부 :   
  특정 LU 사용여부 :   
  대외기관코드
(표준전문셋팅) :  
 
  어댑터 기관코드
(대외기관명) :  
 
  업체코드 데이터
(업무데이터 추출 룰) :  
 
  TAS 어댑터 여부 :   
  어댑터 별명 :   
  AdapterGroupVO.toString() :  <%=vo.toString()%>

+ + + + + + + + + <% + if (vo != null) { + Iterator adtIt = vo.getAdapters(); + while(adtIt.hasNext()) { + AdapterVO adtVO = (AdapterVO)adtIt.next(); + %> + + + + + + + + + +<% + } + } +%> +<% + } +%> + +
 어뎁터업무 이름 리스너클래스명 프라퍼티 그룹명 테스터클래스명 어댑터 정보
+ + + \ No newline at end of file diff --git a/WebContent/mgr/b2badaptermap.jsp b/WebContent/mgr/b2badaptermap.jsp new file mode 100644 index 0000000..788e085 --- /dev/null +++ b/WebContent/mgr/b2badaptermap.jsp @@ -0,0 +1,165 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.b2badaptermapping.B2BAdapterMapManager"%> +<%@ page import="com.eactive.eai.common.b2badaptermapping.*"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + + B2BAdapterMapManager manager = B2BAdapterMapManager.getInstance(); + String action = request.getParameter("actionType"); + String[] alls = manager.getAllKeyNames(); + + String selectedKey = request.getParameter("selectedKey"); + + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + //manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + B2BAdapterMapVO vo = null; + + if(selectedKey!=null) { + vo = manager.getB2BAdapterMap(selectedKey); + } + +%> + + + + + + + B2BAdapterMapManager + + + + +

+ 라우팅 특정포트 매핑 관리

+

+
+ + + + + + + + + + + + + +
EAI 서비스 코드 :    +
 

+ + + + + + + +<% + if(vo != null ){ + +%> + + + + + + + + + +<% + String[] fkeys = vo.getAllKeyNames(); + for(int i=0; i< fkeys.length; i++) { + B2BAdapterMapFldVO fld = vo.getB2BAdapterMapFld(fkeys[i]); +%> + + + + + + + + + + + + + + + + + + + + + +<% + } +} +%> +
  내용  
  EAI서버인스턴스명 :   
  EAI서비스코드 :   
MAP FIELD : (<%=fkeys[i]%>)  
  기관코드 :   
 세부업무구분명 :   
  어뎁터업무그룹명 :   
  어뎁터업무이름 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/b2bextract.jsp b/WebContent/mgr/b2bextract.jsp new file mode 100644 index 0000000..3294142 --- /dev/null +++ b/WebContent/mgr/b2bextract.jsp @@ -0,0 +1,153 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.b2bextractor.B2BExtractManager"%> +<%@ page import="com.eactive.eai.common.b2bextractor.B2BExtractVO"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + B2BExtractManager manager = B2BExtractManager.getInstance(); + String[] alls = manager.getAllKeyNames(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + int seq = 1; + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + // 마지막 제거 + manager.reload(selectedKey.substring(0,selectedKey.length()-1)); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + B2BExtractVO vo = null; + if(selectedKey!=null) { + vo = manager.getB2BExtract(selectedKey); + } + +%> + + + + + + + B2BExtractManager + + + + +

+ 라우팅 필드추출 정보 관리

+

+
+ + + + + + + + + + + + + + + + + + + +
IF서비스코드+IF서비스처리번호 :    +
IF서비스코드 :   
IF서비스처리번호 :   
+
+ + + + + + + +<% + if(vo != null ){ + +%> + + + + + + + + + + + + + + + + + + +<% +} +%> +
  내용  
  IF서비스코드 :   
  IF서비스 처리번호 :   
  기관코드추출 CLASS :   
  어댑터라우팅추출 CLASS :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/b2bservice.jsp b/WebContent/mgr/b2bservice.jsp new file mode 100644 index 0000000..8a40543 --- /dev/null +++ b/WebContent/mgr/b2bservice.jsp @@ -0,0 +1,250 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.b2bservice.B2BServiceManager"%> +<%@ page import="com.eactive.eai.common.b2bservice.B2BServiceVO"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + + B2BServiceManager manager = B2BServiceManager.getInstance(); + String action = request.getParameter("actionType"); + String [] alls = manager.getAllKeys(); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + // 마지막 제거 + manager.reload(selectedKey.substring(0,selectedKey.length()-1)); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + B2BServiceVO vo = null; + if(selectedKey!=null) { + vo = manager.getB2BServiceVO(selectedKey); + } + +%> + + + + + + + B2BServiceManager + + + + +

+ 라우팅 B2B기관 정보 관리

+

+
+ + + + + + + + + + + + + + + + + + + +
기관코드 + 서비스처리순서 :   +
기관코드 :    
서비스처리번호 :    
+
+ + + + + + +<% + if(vo != null ){ + +%> + + + + + + + + + + + + + + + + + +<%-- + + + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% +} +%> +
  내용  
 기관코드 :   
 서비스처리순서 :   
  수동인터페이스유형 :    +
  수동업무시스템명 :   
  수동시스템ID :   
  수동시스템서비스코드 :   
  수동시스템인터페이스유형 :   
  FailOver여부 :    +
  변환유무 :    +
  변환메시지ID :   
  기본응답메시지비교값 :   
  기본응답변환유무 :   
  기본응답변환메시지ID :   
  오류응답메시지비교값 :   
  오류응답변환유무 :   
  오류응답변환메시지ID :   
  다음서비스처리순서 :   
  Outbound라우팅명 :   
  타임아웃값 :   
  보상서비스처리코드 :   
  추가삭제여부 :   
  헤더제어구분코드 :   
  참고클래스명 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/bizkey.jsp b/WebContent/mgr/bizkey.jsp new file mode 100644 index 0000000..36184e0 --- /dev/null +++ b/WebContent/mgr/bizkey.jsp @@ -0,0 +1,151 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.bizkey.BizKeyFldVO"%> +<%@ page import="com.eactive.eai.common.bizkey.BizKeyManager"%> +<%@ page import="com.eactive.eai.common.bizkey.BizKeyVO"%> + +<% + BizKeyManager manager = BizKeyManager.getInstance(); + String[] alls = manager.getAllKeyNames(); + String action = request.getParameter("actionType"); + + + String selectedKey = request.getParameter("selectedKey"); + + if(selectedKey == null && alls.length > 1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + //마지막 TR 을 빼고 처리 해야됨 + manager.reload(selectedKey.substring(0, selectedKey.length()-2), selectedKey.substring(selectedKey.length()-2)); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + + BizKeyVO vo = null; + if(selectedKey != null) { + vo = manager.getBizKey(selectedKey); + } +%> + + + + BizKey Manager + + + + +

+ 로그조회키 관리

+

+
+ + + + + + + + + + + + + +
로그조회키 :    +
 
+
+ + + + + +<% + if(vo != null) { +%> + + + + + + + + + + <% + int fldSize = vo.getBizKeyFldLength(); + for(int i=0; i + + + + + + + + + + + + +<% + } + } +%> +
  Property Key     Property Value
  EAI서비스코드 :   
  추출구분 :   + <% + int exrClassLength = EAITable.EXR_CLASS_TYPES.length; + String exrClassTypeName = ""; + for(int i=0; i  +
 FldPrcssNo[<%= vo.getBizKeyFld(i).getColPssSeq() %>]  
  메시지유형 :    +
  업무필드명 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/businessday.jsp b/WebContent/mgr/businessday.jsp new file mode 100644 index 0000000..2793a14 --- /dev/null +++ b/WebContent/mgr/businessday.jsp @@ -0,0 +1,41 @@ +<%@ page import="java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.kbstar.eai.common.businessday.*"%> + +<% + BusinessDayManager manager = BusinessDayManager.getInstance(); + Map messages = manager.getAllBusinessDays(); +%> + + + 일자전환 변경대상 정보 + + + +

+ 일자전환 변경대상 정보

+

+
+ + + + + +<% + Iterator it = messages.keySet().iterator(); + for(int i=0;it.hasNext();i++) { + BusinessDayVO vo = (BusinessDayVO)messages.get((String)it.next()); +%> + + + + +<% } %> +
EAI 서비스코드전문유효일자
<%= vo.getEAISvcName() %><%= vo.getTelgmValdYmd() %>
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/c2rservice.jsp b/WebContent/mgr/c2rservice.jsp new file mode 100644 index 0000000..42bba32 --- /dev/null +++ b/WebContent/mgr/c2rservice.jsp @@ -0,0 +1,222 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.c2rservice.C2RServiceManager"%> +<%@ page import="com.eactive.eai.common.c2rservice.C2RServiceVO"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + + String action = request.getParameter("actionType"); + + C2RServiceManager manager = C2RServiceManager.getInstance(); + String key[] = manager.getAllKeys(); + + String selectedKey = request.getParameter("selectKeys"); + int seq = 1; + if(selectedKey == null && key.length>0) { + selectedKey = key[0]; + } + + C2RServiceVO sm = null; + + if(selectedKey!=null) { + sm = manager.getC2RServiceVO(selectedKey); + } + +%> + + + + + + + C2RServiceManager + + + + +

+ C2RService Configuration

+

+
+ + + + + + + +
+ + + + + +
  +
+

+ + + + + + + +<% + if(sm != null ){ + +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% +} +%> +
  내용  
 기관코드 :   
 서비스처리순서 :   
  수동인터페이스유형 :    +
  수동업무시스템명 :   
  수동시스템ID :   
  수동시스템서비스코드 :   
  수동시스템인터페이스유형 :   
  FailOver여부 :    +
  변환유무 :    +
  변환메시지ID :   
  기본응답메시지비교값 :   
  기본응답변환유무 :   
  기본응답변환메시지ID :   
  오류응답메시지비교값 :   
  오류응답변환유무 :   
  오류응답변환메시지ID :   
  다음서비스처리순서 :   
  Outbound라우팅명 :   
  타임아웃값 :   
  보상서비스처리코드 :   
  추가삭제여부 :   
  헤더제어구분코드 :   
  참고클래스명 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/currentTx.jsp b/WebContent/mgr/currentTx.jsp new file mode 100644 index 0000000..450c568 --- /dev/null +++ b/WebContent/mgr/currentTx.jsp @@ -0,0 +1,76 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.adapter.AdapterGroupVO"%> +<%@ page import="com.eactive.eai.adapter.AdapterManager"%> +<%@ page import="com.eactive.eai.adapter.Keys"%> + + +<%@ page import="com.eactive.eai.inbound.processor.RequestProcessor"%> + +<% + AdapterManager manager = AdapterManager.getInstance(); + List all = manager.getAllAdapterGroupNames(); + + String flag = request.getParameter("flag"); + if(flag!=null && flag.equals("reset")) { + RequestProcessor.resetCount(); + } + + +%> + + + + + 어댑터 별 진행 서비스 수 + + + + +

+ RequestProcessor 처리 현황 +

+
+ + + + + + + + + + + + +
현재수신 건수에러건수초기화
<%= RequestProcessor.rcvCount()%><%= RequestProcessor.errCount()%>
+
+
+

+ 어댑터 별 진행 서비스 수 +

+ + + + + + + <% + for(int i=0;i + + + + + + <% }%> +
이름상태진행건수
<%=g.getName()%><%=g.isStarted()%><%=g.currentTx()%>
+ + + \ No newline at end of file diff --git a/WebContent/mgr/currentWeb.jsp b/WebContent/mgr/currentWeb.jsp new file mode 100644 index 0000000..2aed23f --- /dev/null +++ b/WebContent/mgr/currentWeb.jsp @@ -0,0 +1,17 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=UTF-8"%> +<%@ page import="com.eactive.eai.common.web.FrontFilter"%> + + + + Currrnet Tx in Web Application + + + +

+ Currrnet Tx in Web Application +

+ + + + \ No newline at end of file diff --git a/WebContent/mgr/eaimessage.jsp b/WebContent/mgr/eaimessage.jsp new file mode 100644 index 0000000..5454675 --- /dev/null +++ b/WebContent/mgr/eaimessage.jsp @@ -0,0 +1,366 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.message.EAIMessage"%> +<%@ page import="com.eactive.eai.common.message.ServiceMessage"%> +<%@ page import="com.eactive.eai.common.message.EAIMessageManager"%> + +<% + EAIMessageManager manager = EAIMessageManager.getInstance(); + String[] alls = manager.getAllEAISvcCd(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + + EAIMessage vo = null; + + if(selectedKey!=null) { + vo = manager.getEAIMessage(selectedKey); + } + + +%> + + + + + EAIMessage Manager + + + + +

+ EAI 서비스 코드관리

+

+
+ + + + + + + + + + + + + +
EAI서비스코드   +
 

+ + + + +<% + if(vo != null) { +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% + if(vo.getSvcMsgs().size()<=0) { +%> + +<% + } + else { +%> + +<% + } +%> + + + + <% + } +%> +
  내용  
  EAI서비스코드 :   
  EAI서버인스턴스명 :   
  서비스시간유무 :   +   +
  서비스동시사용 :   +   +
  서비스처리유형 :   +   +
  Flow Control라우팅명 :   
  통합유형 :   +   +
  기동서비스구분 :   +   +
  서비스처리순서 :   
  로그처리일련번호 :   
  서비스전열로그여부 :   +   +
  업무구분 :   
  표준메시지사용구분 :   +   +
  기동시스템인터페이스유형 :   
  레이어메시지ID :   
  서버로그레벨 :   +   +
  서비스로그레벨 :   +   +
  오류EAI서비스명 :   
  오류요청변환ID명 :   
  오류요청에러필드명 :   
  오류응답변환ID명 :   
  오류응답에러필드명 :   
  EAI서비스 설명 :   
  EAI서버구분코드 :   
  그룹사코드 :   
  거래처리구분 :   
  사용여부 :   
  서비스처리정보리스트 :    0건 입니다.    <%=vo.getSvcMsgs().size()%>  건  
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/eaiserver.jsp b/WebContent/mgr/eaiserver.jsp new file mode 100644 index 0000000..6ff096e --- /dev/null +++ b/WebContent/mgr/eaiserver.jsp @@ -0,0 +1,106 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.server.EAIServerManager"%> +<%@ page import="com.eactive.eai.common.server.EAIServerVO"%> + +<% + EAIServerManager manager = EAIServerManager.getInstance(); + String[] alls = manager.getAllEaiSvrInstNm(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + + EAIServerVO vo = null; + + if(selectedKey!=null) { + vo = manager.getEAIServer(selectedKey); + } +%> + + + + + EAIServer Manager + + + + +

+ 서버 관리

+

+
+ + + + + + + + + + +
EAI Server 인스턴스명 :    +
 

+ + + + +<% + if(vo != null) { +%> + + + + + + + + + + + + + + + + + + + + + + + + + + <% + } +%> +
  내용  
  서버 인스턴스명 :   
  서버 아이피 :   
  서버 포트 :   
  장애극복서버명 :   
  호스트명 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/errorcode.jsp b/WebContent/mgr/errorcode.jsp new file mode 100644 index 0000000..c5a8e60 --- /dev/null +++ b/WebContent/mgr/errorcode.jsp @@ -0,0 +1,111 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.errorcode.ErrorCodeManager"%> +<%@ page import="com.eactive.eai.common.errorcode.ErrorCodeVO"%> + +<% + ErrorCodeManager manager = ErrorCodeManager.getInstance(); + String[] alls = manager.getAllCodes(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + ErrorCodeVO vo = null; + + if(selectedKey != null){ + vo = manager.getMessageVO(selectedKey); + } + + +%> + + + + Error Code Message Manager + + + + +

+ 오류메시지 관리

+

+
+ + + + + + + + + + + + + + +
  +
 

+ + + + +<% if(vo!=null) { %> + + + + + + + + + + + + +<% } else { %> + +<% } %> +
  내용  
오류메시지 코드 :   
오류메시지 :   
조치사항 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/firstAccountInfo.jsp b/WebContent/mgr/firstAccountInfo.jsp new file mode 100644 index 0000000..cff9a77 --- /dev/null +++ b/WebContent/mgr/firstAccountInfo.jsp @@ -0,0 +1,48 @@ +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="java.io.*, java.util.*"%> +<%@ page import="com.eactive.eai.agent.firstaccount.ShareMemory" %> +<% + ShareMemory sm = ShareMemory.getInstance(); + String accNum = sm.getAccoutName(); + String [] accNumArr = accNum.split(","); +%> + + + + FirstAccount Info + + + + +

+ FirstAccount Info

+

+
+ + + + + +
FirstAccount :<%=accNum %>
+
+ + + + + + <% + for(int i=0; i + + + + + <% + } + %> + +
  ¼ø¹ø     ¸ñ·Ï
[ <%=i %> ] :   <%=accNumArr[i] %>
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/inflowAdapter.jsp b/WebContent/mgr/inflowAdapter.jsp new file mode 100644 index 0000000..26a9029 --- /dev/null +++ b/WebContent/mgr/inflowAdapter.jsp @@ -0,0 +1,81 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.inflow.InflowControlManager"%> +<%@ page import="com.eactive.eai.common.inflow.InflowTargetVO"%> + +<% + InflowControlManager manager = InflowControlManager.getInstance(); + String[] names = manager.getAdapterAllKeys(); + String selectedName = request.getParameter("name"); + if(selectedName == null && names.length>0) selectedName = names[0]; + InflowTargetVO vo = manager.getAdapterInflow(selectedName); +%> + + + + Inflow Adapter Manager + + + + +

+ Infow Adapter Configuration

+

+
+ +<% + if(selectedName!=null) { +%> + + + + + <% + if (vo != null){ + %> + + + + + + + + + + + + + + + + + + <% + } + %> +<% } else { %> + +<% } %> +
어댑터명 :    +
선택된 어댑터명 :   
초당 임계치 :   
추가 임계치 :   
추가 임계치 TimeUnit :   
+ + + + +
+ +

+
+ + \ No newline at end of file diff --git a/WebContent/mgr/inflowInterface.jsp b/WebContent/mgr/inflowInterface.jsp new file mode 100644 index 0000000..42fae72 --- /dev/null +++ b/WebContent/mgr/inflowInterface.jsp @@ -0,0 +1,81 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.inflow.InflowControlManager"%> +<%@ page import="com.eactive.eai.common.inflow.InflowTargetVO"%> + +<% + InflowControlManager manager = InflowControlManager.getInstance(); + String[] names = manager.getInterfaceAllKeys(); + String selectedName = request.getParameter("name"); + if(selectedName == null && names.length>0) selectedName = names[0]; + InflowTargetVO vo = manager.getInterfaceInflow(selectedName); +%> + + + + Inflow Interface Manager + + + + +

+ Infow Interface Configuration

+

+
+ +<% + if(selectedName!=null) { +%> + + + + + <% + if (vo != null){ + %> + + + + + + + + + + + + + + + + + + <% + } + %> +<% } else { %> + +<% } %> +
인터페이스명 :    +
선택된 인터페이스명 :   
초당 임계치 :   
추가 임계치 :   
추가 임계치 TimeUnit :   
+ + + + +
+ +

+
+ + \ No newline at end of file diff --git a/WebContent/mgr/kbmessage.jsp b/WebContent/mgr/kbmessage.jsp new file mode 100644 index 0000000..8643068 --- /dev/null +++ b/WebContent/mgr/kbmessage.jsp @@ -0,0 +1,228 @@ +<%-- <%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.agent.AgentUtil"%> +<%@ page import="com.eactive.eai.agent.command.Command"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.kbstar.eai.common.kbmessage.*"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + KBMessageManager manager = KBMessageManager.getInstance(); + String[] alls = manager.getAllKBMessageKeys(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + KBMessage vo = null; + + if(selectedKey != null){ + vo = manager.getKBMessage(selectedKey); + } + + +%> + + + + + EAI KBMessage Manager + + + + +

+ EAI KB내부표준 메시지 관리

+

+
+ + + + + + + + + + + + +
업무 서비스 키 :    +
 
+
+
+ + + + + +<% + if(vo != null) { +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% + } +%> +
  Property Key     Property Value
  업무 서비스 키 :    
  CICS트랜코드 :    
  전문요청구분코드 : (S-요청 /R-응답)   
  그룹회사코드 :    
  수신거래코드 :    
  처리결과수신거래코드 :    
  화면번호 :    
  대외기관코드 :    
  내외부구분코드 : (1-내부/2-외부)   
  원거래복원여부 : (0-불필요/1-필요)   
  복합거래요청구분코드 : (' '-없음/T-다중전송/A-다중조합)   
  시스템운영환경구분코드 : (O-운영/S-테스트,스테이징/D-개발/R-DR)   
  취소구분코드 : (1-정상/3-정정취소/4-정정/5-취소)   
  EAI거래코드   
  EAI내외부구분코드   
  채널구분코드   
  채널세부업무구분코드   
  매체구분코드   
  거래부점코드   
  사용자 직원번호   
  은행코드   
+ + --%> \ No newline at end of file diff --git a/WebContent/mgr/kbmsgparser.jsp b/WebContent/mgr/kbmsgparser.jsp new file mode 100644 index 0000000..689a69e --- /dev/null +++ b/WebContent/mgr/kbmsgparser.jsp @@ -0,0 +1,68 @@ +<%-- <%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.kbstar.eai.common.kbmessage.*,com.kbstar.eai.common.kbmessage.parser.*"%> +<% + String action = request.getParameter("Convert"); + String kbmessagetext = ""; + String fixeddata = ""; + String xmldata = ""; + String errorMsg = ""; + + if("Convert".equals(action)) { + try { + kbmessagetext = request.getParameter("kbmessagetext"); + //KBMessage kbMsg = KBMessageUtil.convert(kbmessagetext.getBytes(), false); + KBMessageParser parser = KBMessageParserFactory.createPaserFactory(KBMessageParserType.ASC.toString()); + KBMessage kbMsg = parser.convert(kbmessagetext.getBytes()); + fixeddata = kbMsg.toString(); + xmldata = kbMsg.toXMLString(); + } + catch(Exception e) { + errorMsg = e.getMessage(); + } + } +%> + + + + KBMessage Util + + + + +

+ Message Parser

+

+
+ + + + +<% if(errorMsg != null && errorMsg.length() > 0) { %> + + + +<% } %> +
+ +
<%= errorMsg %>
+ + + + + + + + + + + + + +
 KBMessage 전문 
 전문파싱 
 XML 전문 
+
+ --%> \ No newline at end of file diff --git a/WebContent/mgr/lifecycle.jsp b/WebContent/mgr/lifecycle.jsp new file mode 100644 index 0000000..d85f169 --- /dev/null +++ b/WebContent/mgr/lifecycle.jsp @@ -0,0 +1,138 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.lifecycle.Lifecycle"%> +<%@ page import="com.eactive.eai.common.lifecycle.LifecycleManager"%> +<%@ page import="com.eactive.eai.common.lifecycle.LifecycleVO"%> +<%@ page import="java.util.HashMap"%> +<%@ page import="com.eactive.eai.common.util.* "%> +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + + LifecycleManager manager = ApplicationContextProvider.getContext().getBean(LifecycleManager.class); + String action = request.getParameter("actionType"); + + List lists = manager.getLifecycleVOList(); + + String[] alls = new String[lists.size()]; + + for(int i=0; i< alls.length; i++){ + alls[i] = ((LifecycleVO)lists.get(i)).getLifecycleClass(); + } + + String selectedKey = request.getParameter("selectedKey"); + + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + + LifecycleVO vo = null; + + if(selectedKey!=null) { + for(int i=0; i < alls.length; i++){ + String lifeC = ((LifecycleVO)lists.get(i)).getLifecycleClass(); + if(selectedKey.equals(lifeC)){ + vo = (LifecycleVO)lists.get(i); + } + } + } + +%> + + + + + + LifeCycle Manager + + + + +

+ 라이프사이클 관리

+

+
+ + + + + + + + + + + +
라이프사이클 클래스명 :   +

+ + + + + + + +<% + if(vo != null ){ + +%> + + + + + + + + + + + + + +<% +} +%> +
  내용  
  라이프사이클 클래스명 :   
  로딩순서 :   
  라이프사이클 구분코드 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/messagekey.jsp b/WebContent/mgr/messagekey.jsp new file mode 100644 index 0000000..e5960d9 --- /dev/null +++ b/WebContent/mgr/messagekey.jsp @@ -0,0 +1,185 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.messagekey.*"%> + +<% + MessageKeyManager manager = MessageKeyManager.getInstance(); + String[] alls = manager.getAllKeyNames(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + //I를 "," 로 분리 해야됨 + manager.reload(selectedKey.substring(0,selectedKey.length()-1),selectedKey.substring(selectedKey.length()-1) ); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + + MessageKeyVO vo = null; + if(selectedKey != null){ + vo = manager.getMessageKey(selectedKey); + } + String voName = (String)vo.getName(); + String adptName = voName.substring(0, voName.length()-1); + String exrTp = voName.substring(voName.length()-1); + +%> + + + + MessageKey Manager + + + + +

+ 메세지키 관리

+

+
+ + + + + + + + + + + + + + + + + +
어댑터명 + 기능구분 :    +
어댑터명 :    
기능구분 :    
+
+ + + + +<% + if(vo != null) { +%> + + + + + + + + + + + + + <% + int groupSize = vo.getAlMsgGroups().size(); + for(int g=0; g + + + +<% + MessageKeyGroupVO group = vo.getMessageKeyGroup(g); + int fldSize = group.getMessageKeyFldLength(); + for(int i=0; i + + + + + + + + + + + + + + + + + + + + + + + + + +<% + } + } + } +%> + +
  내용  
  어댑터명 :    
  메시지유형 :     + +
  기능구분 :     +
 Group[<%= g %>]  
 Field[<%= i %>]  
  업무필드명 :    
  클래스명 :    
  필드시작위치 :    
  필드길이 :    
  정상값 :    
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/newsvcmonitor.jsp b/WebContent/mgr/newsvcmonitor.jsp new file mode 100644 index 0000000..2093e5c --- /dev/null +++ b/WebContent/mgr/newsvcmonitor.jsp @@ -0,0 +1,304 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.message.EAIMessage"%> +<%@ page import="com.eactive.eai.common.message.ServiceMessage"%> +<%@ page import="com.eactive.eai.common.message.EAIMessageManager"%> +<%@ page import="com.eactive.eai.common.monitor.EAIServiceMonitor"%> +<%@ page import="com.eactive.eai.common.monitor.MonitorVO"%> +<%@ page import="java.util.HashMap"%> + +<% + + EAIServiceMonitor monitor = EAIServiceMonitor.getInstance(); + String[] voKey = monitor.getAllMonitorVOKey(); + String action = request.getParameter("actionType"); + MonitorVO vo = null; + String[] pssCntKey = null; + String[] pssErrCntKey = null; + HashMap pssCnt = null; + HashMap pssCntInPeriod = null; + HashMap errPssCnt = null; + HashMap errPssCntInPeriod = null; + + String selectedSvcCds = request.getParameter("svcCds"); + if(selectedSvcCds == null && voKey.length>=1){ + selectedSvcCds = voKey[0]; + } + + if(selectedSvcCds!=null) { + vo = monitor.getMonitorVO(selectedSvcCds); + if("RESET".equals(action)) { + vo.reset(); + } + pssCntKey = vo.getAllPssCntKey(); + pssCnt = vo.getPssCnt(); + pssCntInPeriod = vo.getPssCntInPeriod(); + errPssCnt = vo.getErrPssCnt(); + errPssCntInPeriod = vo.getErrPssCntInPeriod(); + + pssErrCntKey = vo.getAllErrPssCntKey(); + + } + + if("ALLRESET".equalsIgnoreCase(action)){ + monitor.resetAll(); + } +%> + + + + + Service ID/Log Sequence 별 통계 Monitor + + + + +

+ Service ID/Log Sequence 별 통계 데이터

+

+
+ + + + + + + + +
+ + + + + +
  +
+
+ + + +

+ + +<% + if(pssCntKey != null && pssCntKey.length >0){ + if(vo != null) { +%> + + + + + + + + + + + + <% + int pssCntKeyLength = pssCntKey.length; + int pssErrCntKeyLength = pssErrCntKey.length; + + long[] verTotal = new long[pssErrCntKeyLength]; + long[] verInPeriodTotal = new long[pssErrCntKeyLength]; + for(int i=0;i + + + <% + } + %> + + + + <% + for(int i=0;i + + + + <% + } + double avgOfprocessTime = 0; + double psvAvgOfProcessTime = 0; + + if("AA".equalsIgnoreCase(vo.getIfType())){ + if(Long.parseLong(pssCnt.get(pssCntKey[1]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[1]).toString()); + } + if(Long.parseLong(pssCnt.get(pssCntKey[3]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[3]).toString()); + } + } + else{ + + if(Long.parseLong(pssCnt.get(pssCntKey[3]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[3]).toString()); + } + } + if(Long.parseLong(pssCnt.get(pssCntKey[2]).toString()) > 0 && vo.getPsvSumOfPssTime() > 0 ){ + psvAvgOfProcessTime = vo.getPsvSumOfPssTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[2]).toString()); + } + %> + + + + + + + + <% + + for(int i=0;i + + + + <% + } + %> + + + + + + <% + for(int i=0;i + + <% + + } + %> + + + + + + + + + + + + + + + + <% + + for(int i=0;i + + + <% + } + %> + + + + <% + for(int i=0;i + + + + <% + } + + double avgOfprocessTimeInPeriod = 0; + double psvAvgOfProcessTimeInPeriod = 0; + + if("AA".equalsIgnoreCase(vo.getIfType())){ + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[1]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[1]).toString()); + } + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()); + } + } + else{ + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()); + } + } + + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[2]).toString()) >0 && vo.getPsvSumOfPssTimeInPeriod() > 0){ + psvAvgOfProcessTimeInPeriod = vo.getPsvSumOfPssTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[2]).toString()); + } + + %> + + + + + + + + <% + for(int i=0;i + + + + <% + } + %> + + + + + + <% + for(int i=0;i + + <% + + } + %> + + + <% + } + }else{ + %> +
   일일 통계
구분Log Sequence 별 처리 누적 EAI 시스템 평균 처리시간(초) 수동 시스템 평균 처리시간(초)
<%=pssErrCntKey[i]%>
  처리 건수 :      +    
  에러 발생 건수 
  Log Sequence 별 합계 :  
   최근시간 통계
구분Log Sequence 별 처리 누적 EAI 시스템 평균 처리시간(초) 수동 시스템 평균 처리시간(초)
<%=pssErrCntKey[i]%>
처리 건수 :      +    
  에러 발생 건수 
  Log Sequence 별 합계 :  
+ 해당 서비스 ID에 대한 거래 내역이 없습니다. + <% + } + %> + +
+ + \ No newline at end of file diff --git a/WebContent/mgr/property.jsp b/WebContent/mgr/property.jsp new file mode 100644 index 0000000..6416820 --- /dev/null +++ b/WebContent/mgr/property.jsp @@ -0,0 +1,109 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.property.PropGroupVO"%> +<%@ page import="com.eactive.eai.common.property.PropManager"%> + +<% + PropManager manager = PropManager.getInstance(); + String[] alls = manager.getAllPropGroupNames(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + + PropGroupVO vo = null; + + String[] keys = null; + if(selectedKey!=null) { + vo = manager.getPropGroupVO(selectedKey); + keys = vo.keys(); + } +%> + + + + Property Manager + + + + +

+ 프라퍼티 관리

+

+
+ + + + + + + + + + + + + +
프라퍼티 그룹 :    +
 
+
+ + + + + + <% + if(vo!=null) { + for (int i=0; i + + + + + <% + } + } + %> +
  Property Key     Property Value
  <%=keys[i]%> :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/refmsgid.jsp b/WebContent/mgr/refmsgid.jsp new file mode 100644 index 0000000..cdf2062 --- /dev/null +++ b/WebContent/mgr/refmsgid.jsp @@ -0,0 +1,144 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.message.EAIMessage"%> +<%@ page import="com.eactive.eai.common.message.ServiceMessage"%> +<%@ page import="com.eactive.eai.common.message.EAIMessageManager"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + + String action = request.getParameter("actionType"); + String seq = request.getParameter("actionSeq"); + String eAISvcCd = checkNull(request.getParameter("id")); + + EAIMessageManager manager = EAIMessageManager.getInstance(); + String[] eaiSvcCds = manager.getAllEAISvcCd(); + + String selectedSvcCds = request.getParameter("svcCds"); + if(selectedSvcCds == null && eaiSvcCds.length>=1) { + selectedSvcCds = eaiSvcCds[0]; + } + if(eAISvcCd.length() > 0) + selectedSvcCds = eAISvcCd; + + EAIMessage eAIMsg = new EAIMessage(); + List svcMsg = new ArrayList(); + + + if(selectedSvcCds!=null) { + System.out.println("selectedSvcCds : "+ selectedSvcCds); + eAIMsg = manager.getEAIMessage(selectedSvcCds); + svcMsg = eAIMsg.getSvcMsgs(); + } + +%> + + + + + + EAI RefMessageIds Manager + + + + +

+ EAI RefMessageIDs Configuration

+

+
+ + + + + + + + +
EAI 서비스코드   +

+ + + + + +<% + if(svcMsg != null) { + int size = svcMsg.size(); + for(int i=0; i + + + + + + + + + +<% + if(refmsgid != null && refmsgid.length >0){ + for(int j=0; j + + + + + + + + +<% + } + } + } +} + +%> +
  내용  
+ +
 SvcPssSeq[<%= i+1 %>]  
  RefMsgIDSeq :   
  RefMsgID :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/restrictInfo.jsp b/WebContent/mgr/restrictInfo.jsp new file mode 100644 index 0000000..d3978e4 --- /dev/null +++ b/WebContent/mgr/restrictInfo.jsp @@ -0,0 +1,89 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.restrict.*"%> + +<% + RestrictInfoManager manager = RestrictInfoManager.getInstance(); + + String action = request.getParameter("actionType"); + if("RELOAD".equals(action)) { + System.out.println("restrictInfo.jap - RELOAD called"); + manager.reload(); + } + + String[] names = manager.getAllCodes(); + Map messages = manager.getAllRestrictInfos(); + String selectedName = request.getParameter("code"); + if(selectedName == null && names.length>1) selectedName = names[0]; + +%> + + + + RestrictInfoManager + + + + +

+ RestrictInfo

+

+
+ + +<% if(selectedName!=null) { %> + + + + + + + + + + + + + + + + + + + + + + + + +<% } else { %> + +<% } %> +
  +
 
 
 
 
 
+ + + + +
+ +

+
+ + \ No newline at end of file diff --git a/WebContent/mgr/routing.jsp b/WebContent/mgr/routing.jsp new file mode 100644 index 0000000..8527f2c --- /dev/null +++ b/WebContent/mgr/routing.jsp @@ -0,0 +1,120 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.routing.RoutingManager"%> +<%@ page import="com.eactive.eai.common.routing.RoutingVO"%> + +<% + RoutingManager manager = RoutingManager.getInstance(); + String[] alls = manager.getAllRoutingNames(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + RoutingVO vo = null; + + if(selectedKey != null){ + vo = manager.getRoutingVO(selectedKey); + } +%> + + + + + Routing Manager + + + + +

+ 라우팅 관리

+

+
+ + + + + + + + + + + + + +
라우팅명 :    +
 

+ + + + +<% + if(vo != null) { +%> + + + + + + + + + + + + + + + + + + + + + <% + } +%> +
  내용  
  라우팅명 :   
  동기 라우팅 URI :   
  비동기 라우팅 URI :   
  레이어구분코드 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/stdmessage.jsp b/WebContent/mgr/stdmessage.jsp new file mode 100644 index 0000000..3ff9e38 --- /dev/null +++ b/WebContent/mgr/stdmessage.jsp @@ -0,0 +1,129 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.agent.AgentUtil"%> +<%@ page import="com.eactive.eai.agent.command.Command"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.stdmessage.*"%> +<%@ page import="com.eactive.eai.common.server.EAIServerManager"%> +<%@ page import="java.util.HashMap"%> +<%@ page import="com.eactive.eai.message.StandardMessage"%> +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + STDMessageManager manager = STDMessageManager.getInstance(); + String[] alls = manager.getAllSTDMessageKeys(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + StandardMessage vo = null; + + if(selectedKey != null) { + vo = manager.getSTDMessage(selectedKey); + } +%> + + + + + EAI STDMessage Manager + + + + +

+ EAI 내부표준 메시지 관리

+

+
+ + + + + + + + + + + + +
업무 서비스 키 :    +
 
+
+
+ + + + + +<% + if(vo != null) { +%> + + + + + +<% + } +%> +
  Property Key     Property Value
  XML :   <%=vo.toPrettyJson(false)%>
+ + \ No newline at end of file diff --git a/WebContent/mgr/svcmessages.jsp b/WebContent/mgr/svcmessages.jsp new file mode 100644 index 0000000..ad273d0 --- /dev/null +++ b/WebContent/mgr/svcmessages.jsp @@ -0,0 +1,354 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.message.EAIMessage"%> +<%@ page import="com.eactive.eai.common.message.ServiceMessage"%> +<%@ page import="com.eactive.eai.common.message.EAIMessageManager"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } +%> +<% + + EAIMessageManager manager = EAIMessageManager.getInstance(); + String[] alls = manager.getAllEAISvcCd(); + String action = request.getParameter("actionType"); + String eaiSvcCd = checkNull(request.getParameter("id")); + + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + + if(eaiSvcCd.length() > 0){ + selectedKey = eaiSvcCd; + } + + List listVo = null; + + if(selectedKey!=null) { + listVo = manager.getEAIMessage(selectedKey).getSvcMsgs(); + } +%> + + + + + + EAI ServiceMessage Manager + + + + +

+ EAI ServiceMessage Configuration

+

+
+ + + + + + + + +
EAI서비스코드  +
+ + + +
+ + + + + +<% + if(listVo != null) { + int size = listVo.size(); + for(int i=0; i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% + if(sm.getRefMsgIDs() == null || sm.getRefMsgIDs().length <= 0) { +%> + +<% + } + else { +%> + + +<% + } +%> + + + + + + +<% + if(sm.getCondPerRtgInfo() == null || sm.getCondPerRtgInfo().size() <= 0) { +%> + +<% + } + else { +%> + + +<% + } +%> + + +<% + } + + } + +%> +
  내용  
 Field[<%= i %>]  
 서비스처리순서 :   
  수동인터페이스유형 :   +   +
  수동업무시스템명 :   
  수동시스템ID :   
  수동시스템서비스코드 :   
  수동시스템인터페이스유형 :   
  FailOver여부 :   +   +
  변환유무 :   +   +
  변환메시지ID :   
  기본응답메시지비교값 :   
  기본응답변환유무 :   +   +
  기본응답변환메시지ID :   
  오류응답메시지비교값 :   
  오류응답변환유무 :   +   +
  오류응답변환메시지ID :   
  다음서비스처리순서 :   
  Outbound라우팅명 :   
  타임아웃값 :   
  보상서비스처리코드 :   
  추가삭제 여부 :   
  헤더제어구분코드 - [01/02]삭제추가/추가삭제 :   
  참고클래스명 :   
  타이머참고메시지ID :   
참조메시지IDS  0건 입니다.    <%=sm.getRefMsgIDs().length%>  건  
조건부라우팅정보테이블  0건 입니다.    <%=sm.getCondPerRtgInfo().size()%>  건  
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/svcmonitor.jsp b/WebContent/mgr/svcmonitor.jsp new file mode 100644 index 0000000..210c093 --- /dev/null +++ b/WebContent/mgr/svcmonitor.jsp @@ -0,0 +1,310 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.message.EAIMessage"%> +<%@ page import="com.eactive.eai.common.message.ServiceMessage"%> +<%@ page import="com.eactive.eai.common.message.EAIMessageManager"%> +<%@ page import="com.eactive.eai.common.monitor.EAIServiceMonitor"%> +<%@ page import="com.eactive.eai.common.monitor.MonitorVO"%> +<%@ page import="java.util.HashMap"%> + +<% + String actionMessage = ""; + EAIServiceMonitor monitor = EAIServiceMonitor.getInstance(); + String[] voKey = monitor.getAllMonitorVOKey(); + String action = request.getParameter("actionType"); + MonitorVO vo = null; + String[] pssCntKey = null; + String[] pssErrCntKey = null; + HashMap pssCnt = null; + HashMap pssCntInPeriod = null; + HashMap errPssCnt = null; + HashMap errPssCntInPeriod = null; + + String selectedSvcCds = request.getParameter("svcCds"); + if(selectedSvcCds == null && voKey.length>=1) { + selectedSvcCds = voKey[0]; + } + + if(selectedSvcCds!=null) { + vo = monitor.getMonitorVO(selectedSvcCds); + if("RESET".equals(action)) { + vo.reset(); + } + pssCntKey = vo.getAllPssCntKey(); + pssCnt = vo.getPssCnt(); + pssCntInPeriod = vo.getPssCntInPeriod(); + errPssCnt = vo.getErrPssCnt(); + errPssCntInPeriod = vo.getErrPssCntInPeriod(); + + } + + if("ALLRESET".equalsIgnoreCase(action)){ + monitor.resetAll(); + } + else if("RESET_TOLIST".equalsIgnoreCase(action)){ + actionMessage = monitor.resetErrorList(); + } +%> + + + +Service ID/Log Sequence 별 통계 Monitor + + + +

Service ID/Log Sequence 별 통계 데이터
+<% if(actionMessage != null && actionMessage.length() > 0) { %> +Action result : <%= actionMessage %>
+<% } %> +
+

+
+ + + + + + + + +
+ + + + + +
EAI Service Message ID :   
+
+
+ +<% + if(pssCntKey != null && pssCntKey.length >0){ + if(vo != null) { + pssErrCntKey = vo.getAllErrPssCntKey(); + int pssCntKeyLength = pssCntKey.length; + int pssErrCntKeyLength = pssErrCntKey.length; +%> + + + + + + + + + + + + <% + long[] verTotal = new long[pssErrCntKeyLength]; + long[] verInPeriodTotal = new long[pssErrCntKeyLength]; + for(int i=0;i + + + <% + } + %> + + + + <% + for(int i=0;i + + + + <% + } + + double avgOfprocessTime = 0; + double psvAvgOfProcessTime = 0; + + if("AA".equalsIgnoreCase(vo.getIfType())){ + if(Long.parseLong(pssCnt.get(pssCntKey[1]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[1]).toString()); + } + if(Long.parseLong(pssCnt.get(pssCntKey[3]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[3]).toString()); + } + } + else{ + + if(Long.parseLong(pssCnt.get(pssCntKey[3]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[3]).toString()); + } + } + if(Long.parseLong(pssCnt.get(pssCntKey[2]).toString()) > 0 && vo.getPsvSumOfPssTime() > 0 ){ + psvAvgOfProcessTime = vo.getPsvSumOfPssTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[2]).toString()); + + } + System.out.println("vo.getPsvSumOfPssTime() : "+ vo.getPsvSumOfPssTime()); + %> + + + + + + + + + <% + for(int i=0;i + + <% + } + %> + + + + + <% + for(int i=0;i + + <% + + } + %> + + + + + + + + + + + + + + + + <% + + for(int i=0;i + + + <% + } + %> + + + + <% + for(int i=0;i + + + + <% + } + + double avgOfprocessTimeInPeriod = 0; + double psvAvgOfProcessTimeInPeriod = 0; + + if("AA".equalsIgnoreCase(vo.getIfType())){ + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[1]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[1]).toString()); + } + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()); + } + } + else{ + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()); + } + } + + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[2]).toString()) >0 && vo.getPsvSumOfPssTimeInPeriod() > 0){ + psvAvgOfProcessTimeInPeriod = vo.getPsvSumOfPssTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[2]).toString()); + } + + %> + + + + + + + + + <% + for(int i=0;i + + + + <% + } + %> + + + + + + <% + for(int i=0;i + + <% + + } + %> + + + <% + } + } else{ + %> +
   일일 통계
구분Log Sequence 별 처리 누적EAI 시스템 평균 처리시간(초)수동 시스템 평균 처리시간(초)
<%=pssErrCntKey[i]%>
정상    
에러 
합계
   최근시간 통계
구분Log Sequence 별 처리 누적EAI 시스템 평균 처리시간(초)수동 시스템 평균 처리시간(초)
<%=pssErrCntKey[i]%>
정상    
에러 
합계
+해당 서비스 ID에 대한 거래 내역이 없습니다. <% + } + %>
+ + diff --git a/WebContent/mgr/svcmonitorbwk.jsp b/WebContent/mgr/svcmonitorbwk.jsp new file mode 100644 index 0000000..149c1ff --- /dev/null +++ b/WebContent/mgr/svcmonitorbwk.jsp @@ -0,0 +1,407 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.EAITable"%> +<%@ page import="com.eactive.eai.common.message.EAIMessage"%> +<%@ page import="com.eactive.eai.common.message.ServiceMessage"%> +<%@ page import="com.eactive.eai.common.message.EAIMessageManager"%> +<%@ page import="com.eactive.eai.common.monitor.EAIServiceMonitor"%> +<%@ page import="com.eactive.eai.common.monitor.MonitorVO"%> +<%@ page import="java.util.HashMap"%> + +<% + + EAIServiceMonitor monitor = EAIServiceMonitor.getInstance(); + String[] voKey = monitor.getAllBwkClsKey(); + String action = request.getParameter("actionType"); + + String[] pssCntKey = null; + String[] pssErrCntKey = null; + HashMap pssCnt = null; + HashMap pssCntInPeriod = null; + HashMap errPssCnt = null; + HashMap errPssCntInPeriod = null; + HashMap voByBwk = null; + + long[] verTotalByBwk = null;; + long[] verTotalInPeriodByBwk = null; + double sumOfprocessTimeByBwk = 0; + double psvSumOfProcessTimeByBwk = 0; + double sumOfprocessTimeInPeriodByBwk = 0; + double psvSumOfProcessTimeInPeriodByBwk = 0; + double avgOfprocessTimeByBwk = 0; + double psvAvgOfProcessTimeByBwk = 0; + double avgOfprocessTimeInPeriodByBwk = 0; + double psvAvgOfProcessTimeInPeriodByBwk = 0; + + int countEaiSvcCd = 0; + int countEaiSvcCdInPeriod = 0; + + String selectedBwkCls = request.getParameter("bwkCls"); + if(selectedBwkCls == null && voKey.length>=1){ + selectedBwkCls = voKey[0]; + } + + if(selectedBwkCls!=null) { + voByBwk = monitor.getBwkCls(selectedBwkCls); + } + +%> + + + + + 업무구분 코드/Log Sequence 별 통계 Monitor + + + + +

+ 업무구분 코드/Log Sequence 별 통계 데이터

+

+
+ + + + + + +
+ + + + + +
  +
+

+ + +<% + + if(voByBwk != null){ + + Iterator it = voByBwk.keySet().iterator(); + + String[] keys = new String[voByBwk.size()]; + for(int i = 0; it.hasNext(); i++){ + keys[i] = (String)it.next(); + } + Arrays.sort(keys); + %> + + + + + <% + + for(int j = 0; j< keys.length; j++){ + MonitorVO vo = (MonitorVO)voByBwk.get(keys[j]); + pssCntKey = vo.getAllPssCntKey(); + pssCnt = vo.getPssCnt(); + errPssCnt = vo.getErrPssCnt(); + + pssErrCntKey = vo.getAllErrPssCntKey(); + + //verTotalByBwk = new long[pssCntKey.length]; + //verTotalInPeriodByBwk = new long[pssCntKey.length]; + + verTotalByBwk = new long[pssErrCntKey.length]; + verTotalInPeriodByBwk = new long[pssErrCntKey.length]; + + if(pssCntKey != null && pssCntKey.length >0){ + countEaiSvcCd ++; + int pssCntKeyLength = pssCntKey.length; + int pssErrCntKeyLength = pssErrCntKey.length; +%> + + + + + + + + + + + + + + + <% + + + long[] verTotal = new long[pssErrCntKeyLength]; + + for(int i=0;i + + + <% + } + %> + + + + <% + for(int i=0;i + + + + <% + } + + double avgOfprocessTime = 0; + double psvAvgOfProcessTime = 0; + + if("AA".equalsIgnoreCase(vo.getIfType())){ + if(Long.parseLong(pssCnt.get(pssCntKey[1]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[1]).toString()); + + sumOfprocessTimeByBwk = sumOfprocessTimeByBwk + avgOfprocessTime; + avgOfprocessTimeByBwk = sumOfprocessTimeByBwk / countEaiSvcCd; + } + if(Long.parseLong(pssCnt.get(pssCntKey[3]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[3]).toString()); + + sumOfprocessTimeByBwk = sumOfprocessTimeByBwk + avgOfprocessTime; + avgOfprocessTimeByBwk = sumOfprocessTimeByBwk / countEaiSvcCd; + } + + } + else{ + + if(Long.parseLong(pssCnt.get(pssCntKey[3]).toString()) >0 && vo.getSumOfprocessTime() > 0 ){ + avgOfprocessTime = vo.getSumOfprocessTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[3]).toString()); + } + + sumOfprocessTimeByBwk = sumOfprocessTimeByBwk + avgOfprocessTime; + avgOfprocessTimeByBwk = sumOfprocessTimeByBwk / countEaiSvcCd; + } + if(Long.parseLong(pssCnt.get(pssCntKey[2]).toString()) > 0 && vo.getPsvSumOfPssTime() > 0 ){ + psvAvgOfProcessTime = vo.getPsvSumOfPssTime()/1000/Long.parseLong(pssCnt.get(pssCntKey[2]).toString()); + + psvSumOfProcessTimeByBwk = psvSumOfProcessTimeByBwk + psvAvgOfProcessTime; + psvAvgOfProcessTimeByBwk = psvSumOfProcessTimeByBwk / countEaiSvcCd; + } + %> + + + + + + + + <% + for(int i=0;i + + + + <% + } + %> + + + + + + <% + + for(int i=0;i + + <% + + } + %> + +<% + } + } +%> + + + <% + for(int i=0;i + + <% + + } + %> + + + +
   일일 통계
 EAI Service Code <%=keys[j]%>
구분Log Sequence 별 처리 누적 EAI 시스템 평균 처리시간(초) 수동 시스템 평균 처리시간(초)
<%=pssErrCntKey[i]%>
정상    +    
에러 
합계
 합계    
+
+ + + + + +<% + for(int j = 0; j< keys.length; j++){ + MonitorVO vo = (MonitorVO)voByBwk.get(keys[j]); + pssCntKey = vo.getAllPssCntKey(); + pssCntInPeriod = vo.getPssCntInPeriod(); + errPssCntInPeriod = vo.getErrPssCntInPeriod(); + + pssErrCntKey = vo.getAllErrPssCntKey(); + + if(pssCntKey != null && pssCntKey.length >0){ + countEaiSvcCdInPeriod++; + int pssCntKeyLength = pssCntKey.length; + int pssErrCntKeyLength = pssErrCntKey.length; +%> + + + + + + + + + + + + + + + + <% + long[] verInPeriodTotal = new long[pssErrCntKeyLength]; + + for(int i=0;i + + + <% + } + %> + + + + <% + for(int i=0;i + + + + <% + } + + double avgOfprocessTimeInPeriod = 0; + double psvAvgOfProcessTimeInPeriod = 0; + + if("AA".equalsIgnoreCase(vo.getIfType())){ + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[1]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[1]).toString()); + sumOfprocessTimeInPeriodByBwk = sumOfprocessTimeInPeriodByBwk + avgOfprocessTimeInPeriod; + avgOfprocessTimeInPeriodByBwk = sumOfprocessTimeInPeriodByBwk / countEaiSvcCdInPeriod; + } + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()); + sumOfprocessTimeInPeriodByBwk = sumOfprocessTimeInPeriodByBwk + avgOfprocessTimeInPeriod; + avgOfprocessTimeInPeriodByBwk = sumOfprocessTimeInPeriodByBwk / countEaiSvcCdInPeriod; + } + + } + else{ + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()) >0 && vo.getSumOfProcessTimeInPeriod() > 0){ + avgOfprocessTimeInPeriod = vo.getSumOfProcessTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[3]).toString()); + + sumOfprocessTimeInPeriodByBwk = sumOfprocessTimeInPeriodByBwk + avgOfprocessTimeInPeriod; + avgOfprocessTimeInPeriodByBwk = sumOfprocessTimeInPeriodByBwk / countEaiSvcCdInPeriod; + } + } + + if(Long.parseLong(pssCntInPeriod.get(pssCntKey[2]).toString()) >0 && vo.getPsvSumOfPssTimeInPeriod() > 0){ + psvAvgOfProcessTimeInPeriod = vo.getPsvSumOfPssTimeInPeriod()/1000/Long.parseLong(pssCntInPeriod.get(pssCntKey[2]).toString()); + + psvSumOfProcessTimeInPeriodByBwk = psvSumOfProcessTimeInPeriodByBwk + psvAvgOfProcessTimeInPeriod; + psvAvgOfProcessTimeInPeriodByBwk = psvSumOfProcessTimeInPeriodByBwk / countEaiSvcCdInPeriod; + } + + %> + + + + + + + + + <% + for(int i=0;i + + + + <% + } + %> + + + + + + <% + for(int i=0;i + + <% + + } + %> + + + <% + } + } +%> + + + <% + for(int i=0;i + + <% + + } + %> + + + +
   최근시간 통계
   EAI Service Code <%=keys[j]%>
구분Log Sequence 별 처리 누적 EAI 시스템 평균 처리시간(초) 수동 시스템 평균 처리시간(초)
<%=pssErrCntKey[i]%>
정상      
에러 
합계
 합계    
+<% +}else{ + %> + + 해당 업무 구분에 대한 거래 내역이 없습니다. + <% + } + %> + +
+ + \ No newline at end of file diff --git a/WebContent/mgr/testcall.jsp b/WebContent/mgr/testcall.jsp new file mode 100644 index 0000000..a86e12d --- /dev/null +++ b/WebContent/mgr/testcall.jsp @@ -0,0 +1,158 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.adapter.AdapterVO"%> +<%@ page import="com.eactive.eai.agent.command.Command"%> +<%@ page import="com.eactive.eai.agent.testcall.TestCallCommand"%> +<%@ page import="com.eactive.eai.agent.AgentUtil"%> +<%@ page import="com.eactive.eai.common.property.PropManager"%> +<%@ page import="com.eactive.eai.common.testcall.TestCall"%> +<%@ page import="com.eactive.eai.common.testcall.TestCallManager"%> + +<% + TestCallManager manager = TestCallManager.getInstance(); + ArrayList names = new ArrayList(); + String action = request.getParameter("actionType"); + String period = request.getParameter("period"); + Properties prop = new Properties(); + + Iterator it = manager.getAllAdapterNames(); + while(it.hasNext()) { + names.add(it.next()); + } + Collections.sort(names); + + if(period == null|| period.length()<=0){ + + PropManager pmanager = PropManager.getInstance(); + long temp = 1000*60*10; + try { + temp = Long.parseLong(pmanager.getProperty(manager.PROP_GROUP, manager.PROP_PERIOD)); + + } catch(Exception e) {} + + period = ""+temp; + } + String run = ""; + + if("UPDATE".equals(action)) { + prop.setProperty("PERIOD", period); + Command command = new TestCallCommand(); + command.setArgs(prop); + AgentUtil.broadcast(command); + } + if("START".equals(action)){ + run = "START"; + + prop.setProperty("RUN",run); + Command command = new TestCallCommand(); + command.setArgs(prop); + AgentUtil.broadcast(command); + } + if("STOP".equals(action)){ + run = "STOP"; + + prop.setProperty("RUN",run); + Command command = new TestCallCommand(); + command.setArgs(prop); + AgentUtil.broadcast(command); + } + + String status = ""; + + if(manager.isStarted()) + status = "시작됨"; + else + status = "종료됨"; +%> + + + + + TestCall Manager + + + + +

+ TestCall Configuration

+

+
+ + + + + + + + + + + + +
+ + + + + + +
  +
+
+ + + + + +

+ + + + + +<% + if(names != null || names.size() > 0 ) { + int length = names.size(); + + for(int i=0; i + + + + + + + + + + + <% + } +} +%> +
  항목     내용
  Adapter Name :   
  Adapter 상태 :   
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/transRuleReload.jsp b/WebContent/mgr/transRuleReload.jsp new file mode 100644 index 0000000..ab02334 --- /dev/null +++ b/WebContent/mgr/transRuleReload.jsp @@ -0,0 +1,103 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.transformer.engine.TransformEngine"%> + +<% + + String action = request.getParameter("actionType"); + TransformEngine engine = TransformEngine.getInstance(); + + String status = ""; + + if("START".equals(action)){ + engine.start(); + + } + if("STOP".equals(action)){ + engine.stop(); + } + + if(engine.isStarted()) + status = "시작됨"; + else + status = "종료됨"; +%> + + + + + TransRuleReload Manager + + + + +

+ TransRuleReload Configuration

+

+
+ + + + + + + + + + + + + <% + if ("시작됨".equals(status)){ + %> + + + + + + + <% + } else { + %> + + + + + + <% + } + %> + + + + + + + + + + + + + +
  항목    설명  
현재상태 :   
상태변경 버튼 :   
버튼설명 :   TransformEngine 에서 clearEngine()을 실행합니다.
+ +
버튼설명 :   &TransformEngine 에서 initEngine()을 실행합니다.
실행Manager :   LayoutTypeManager
 FunctionManager
 LayoutManager
 TransformManager

+ +
+ + \ No newline at end of file diff --git a/WebContent/mgr/transformer/Transform.jsp b/WebContent/mgr/transformer/Transform.jsp new file mode 100644 index 0000000..2c27a5e --- /dev/null +++ b/WebContent/mgr/transformer/Transform.jsp @@ -0,0 +1,214 @@ +<%-- +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.transformer.layout.Layout"%> +<%@ page import="com.eactive.eai.transformer.transform.Transform"%> +<%@ page import="com.eactive.eai.transformer.transform.TransformItem"%> +<%@ page import="com.eactive.eai.transformer.transform.TransformManager"%> +<%@ page import="com.eactive.eai.transformer.util.TransformKeys"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } + +%> + +<% + TransformManager manager = TransformManager.getManager(); + String key[] = manager.getAllTransformName(); + + String selected = request.getParameter("transformName"); + if(selected == null && key.length>=1) { + selected = key[0]; + } + + Transform transform = null; + ArrayList itemList = new ArrayList(); + Layout target = null; + Iterator it = null; + + if(selected!=null) { + transform = manager.getTransform(selected); + target = transform.getTargetLayout(); + itemList = (ArrayList) transform.getTransformItemList(); + it = transform.getSourceLayoutNames(); + } + int sourceCount = transform.getSourceLayoutCount(); + String sourceName = ""; + for (int i=0; i < sourceCount; i++) { + if ("".equals(sourceName)) + sourceName = (String)it.next(); + else + sourceName = sourceName+" , " + (String)it.next(); + } + +%> + + + + Transform 변환규칙 Manager + + + + +

+ Transform 변환규칙 Configuration

+

+
+ + + + + + +
+ + + + + +
  +
+

+ + + + + + +<% + if(transform != null ){ + +%> + + + + + + + + + + +<% +} else { +%> + + + + +<% +} +%> +
  변환규칙정보  
  변환규칙명 :   <%=transform.getName()%>
  변환규칙설명 :   <%=checkNull(transform.getDescription())%>
  요청하신 변환규칙 정보가 없습니다.  
+ +
+ + + + +<% +if (target != null || it.hasNext()) { + +%> + + + + + + + + + +<% + +} else { +%> + + + + +<% +} +%> + +
  변환소스결과레이아웃 정보  
  소스레이아웃(2개이상일경우 콤마(,)로 구분)    결과 레이아웃  
 <%=sourceName%> <%=target.getName()%>
  요청하신 변환소스결과레이아웃 정보가 없습니다.  
+ +
+ + + + +<% +if (itemList != null && itemList.size() > 0) { + int nCount = 0; + String[] aBgColor = {"#ccccff" , "#e9e1fd"}; + for (int i = 0; i < itemList.size(); i++) { + TransformItem item = (TransformItem) itemList.get(i); +%> + + + + + + + + + + + + + + + + + + + +<% + nCount++; + } +} else { +%> + + + + +<% +} +%> + +
  변환아이템 정보  
  변환항목일련번호 :   <%=item.getSeqNo()%>
  변환결과항목경로명 :   <%=item.getResultItemPath()%>
  변환명령명 :   <%=item.getInstruction()%>
  변환항목기본값 :   <%=checkNull(item.getDefaultValue())%>
  요청하신 변환규칙 아이템 정보가 없습니다.  
+
+ + +--%> \ No newline at end of file diff --git a/WebContent/mgr/transformer/TransformFunc.jsp b/WebContent/mgr/transformer/TransformFunc.jsp new file mode 100644 index 0000000..7c64062 --- /dev/null +++ b/WebContent/mgr/transformer/TransformFunc.jsp @@ -0,0 +1,186 @@ + +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.transformer.function.FunctionDefinition"%> +<%@ page import="com.eactive.eai.transformer.function.FunctionManager"%> +<%@ page import="com.eactive.eai.transformer.function.ParameterDefinition"%> +<%@ page import="com.eactive.eai.transformer.util.TransformKeys"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } + +%> + +<% + FunctionManager manager = FunctionManager.getInstance(); + String[] alls = manager.getAllFunctionNames(); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + + FunctionDefinition vo = null; + ArrayList paramList = new ArrayList(); + + if(selectedKey!=null) { + vo = manager.getFunctionDefinition(selectedKey); + paramList = (ArrayList) vo.getParameterList(); + } + +%> + + + + + + Transform 변환함수 Manager + + + + +

+ 변환함수 관리

+

+
+ + + + + + + + + +
변환함수명 :   +

+ + + + + + +<% + if(vo != null ){ + +%> + + + + + + + + + + + + + + + + + + + + + + +<% +} else { +%> + + + + +<% +} +%> +
  변환함수정보  
  변환함수명 :   <%=vo.getName()%>
  변환함수설명 :   <%=vo.getDescription()%>
  변환함수반환유형 :   <%=TransformKeys.getType(vo.getReturnTypeId())%>
  변환함수클래스명 :   <%=vo.getFunctionClass()%>
  변환함수유형 :   <%=TransformKeys.getFunctionType(vo.getFunctionTypeId())%>
  요청하신 변환함수 정보가 없습니다.  
+
+ + + + +<% +if (paramList != null && paramList.size() > 0) { + + int nCount = 0; + String[] aBgColor = {"#ccccff", "#e9e1fd"}; + for (int i = 0; i < paramList.size(); i++) { + ParameterDefinition param = (ParameterDefinition) paramList.get(i); +%> + + + + + + + + + + + + + + + + + + +<% + nCount++; + } +} else { +%> + + + + +<% +} +%> + +
  LayoutItem 정보  
  변환함수파라미터일련번호 :   <%=param.getSeqNo()%>
  변환함수파라미터명 :   <%=param.getName()%>
  변환함수파라미터설명 :   <%=param.getDescription()%>
  변환함수파라미터유형 :   <%=TransformKeys.getType(param.getTypeId())%>
  요청하신 변환함수 파라메터 정보가 없습니다.  
+
+ + diff --git a/WebContent/mgr/transformer/layout.jsp b/WebContent/mgr/transformer/layout.jsp new file mode 100644 index 0000000..7173606 --- /dev/null +++ b/WebContent/mgr/transformer/layout.jsp @@ -0,0 +1,218 @@ +<%-- +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.transformer.layout.Layout"%> +<%@ page import="com.eactive.eai.transformer.layout.LayoutItem"%> +<%@ page import="com.eactive.eai.transformer.layout.LayoutManager"%> +<%@ page import="com.eactive.eai.transformer.util.TransformKeys"%> +<%@ page import="java.util.HashMap"%> +<%@ taglib uri="netui-tags-databinding.tld" prefix="netui-compat-data"%> +<%@ taglib uri="netui-tags-html.tld" prefix="netui-compat"%> +<%@ taglib uri="netui-tags-template.tld" prefix="netui-compat-template"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } + + StringBuffer html = new StringBuffer(); + + private void makeItem(LayoutItem item) + { + makeHTML(item); + try{ + if (!item.isField() && (item.getChildCount() != 0)) { + for (int i = 0; i < item.getChildCount(); i++) { + if (item.getChild(i).getIndex() == -1) { + makeItem(item.getChild(i)); + } + } + } + }catch (Exception e) { + e.printStackTrace(); + System.out.println("LayoutEdit.jsp error"); + } + } + + private void makeHTML(LayoutItem item) { + + if(item.isMessage()) + html.append(""); + else if (item.isGroup()) + html.append(""); + else + html.append(""); + + html.append(" "+item.getSeqNo()+""); + html.append("  "+checkNull(item.getName())+""); + html.append(" "+TransformKeys.getLoutItemNodePtrnID(item.getNodeTypeId())+""); + html.append(" "+TransformKeys.getType(item.getItemTypeId())+""); + html.append(" "+checkNull(item.getRefInfo())+" "); + html.append(" "+checkNull(item.getOccType())+""); + html.append(" "+item.getOccMax()+""); + html.append(" "+item.getOccMin()+""); + html.append(" "); + + } +%> + +<% + + + LayoutManager manager = LayoutManager.getManager(); + String key[] = manager.getAllLayoutName(); + + String selected = request.getParameter("layoutNames"); + if(selected == null && key.length>=1) { + selected = key[0]; + } + + Layout layout = null; + + if(selected!=null) { + layout = manager.getLayoutByName(selected); + } + + LayoutItem root = null; + if (layout != null) + root = layout.getRootItem(); + + String str = ""; + if (root != null ){ + makeItem(root); + str = html.toString(); + html = new StringBuffer(); + } + +%> + + + + + + Transform Layout Manager + + + + +

+ Transform Layout Configuration

+

+
+ + + + + + + + +
+ + + + + +
  +
+

+ + + + + + +<% + if(layout != null ){ + +%> + + + + + + + + + + + + + + +<% +} else { +%> + + + + +<% +} +%> +
  Layout정보  
  레이아웃명 :   <%=layout.getName()%>
  레이아웃유형명 :   <%=layout.getLayoutType().getName()%>
  레이아웃설명 :   <%=layout.getDescription()%>
  요청하신 Layout 정보가 없습니다.  
+
+ + + + + + + + + + + + + + + + + + <%=str%> +
일련번호레이아웃항목명노드타입항목유형참조정보발생유형최대발생최소발생
+   + LayoutItem 정보  
+
+ + +--%> \ No newline at end of file diff --git a/WebContent/mgr/transformer/layoutItem.jsp b/WebContent/mgr/transformer/layoutItem.jsp new file mode 100644 index 0000000..522e404 --- /dev/null +++ b/WebContent/mgr/transformer/layoutItem.jsp @@ -0,0 +1,211 @@ +<%-- +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.transformer.layout.Layout"%> +<%@ page import="com.eactive.eai.transformer.layout.LayoutItem"%> +<%@ page import="com.eactive.eai.transformer.layout.LayoutManager"%> +<%@ page import="com.eactive.eai.transformer.util.TransformKeys"%> +<%@ page import="java.util.HashMap"%> +<%@ taglib uri="netui-tags-databinding.tld" prefix="netui-compat-data"%> +<%@ taglib uri="netui-tags-html.tld" prefix="netui-compat"%> +<%@ taglib uri="netui-tags-template.tld" prefix="netui-compat-template"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } + +%> + +<% + String layoutName = (String)request.getParameter("layoutName"); + String itemName = (String)request.getParameter("itemName"); + + LayoutManager manager = LayoutManager.getManager(); + Layout layout = manager.getLayoutByName(layoutName); + LayoutItem item = null; + + if(layout != null ) { + layout.updateItemNameMap(); + item = layout.getItemByPath(itemName); + } else { + System.out.println("layoutItem.jsp ] layout is null - " +layoutName); + } + if(item == null ) { + System.out.println("layoutItem.jsp ] layoutItem is null - " +itemName); + } + +%> + + + + + + Transform LayoutItem Manager + + + + +

+ Transform LayoutItem Configuration

+

+
+ + + + + + + +
+ +

+ + + + + + +<% + if(layout != null ){ + +%> + + + + + + + + + + + + + + +<% +} else { +%> + + + + +<% +} +%> +
  Layout정보  
  레이아웃명 :   <%=layout.getName()%>
  레이아웃유형명 :   <%=layout.getLayoutType().getName()%>
  레이아웃설명 :   <%=layout.getDescription()%>
  요청하신 Layout 정보가 없습니다.  
+
+ + + + +<% +if (item != null ) { +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% +} else { +%> + + + + +<% +} +%> + +
  LayoutItem 정보  
  레이아웃항목일련번호 :   <%=item.getSeqNo()%>
  레이아웃항목명 :   <%=item.getName()%>
  부모레이아웃항목 :   <%=item.getParent().getName()%>
  레이아웃항목설명 :   <%=item.getDescription()%>
  레이아웃항목노드유형 :   <%=TransformKeys.getLoutItemNodePtrnID(item.getNodeTypeId())%>
  레이아웃항목유형명 :   <%=TransformKeys.getType(item.getItemTypeId())%>
  레이아웃항목경로명 :   <%=item.getPath()%>
  레이아웃항목길이수 :   <%=item.getLength()%>
  레이아웃항목참조정보 :   <%=item.getRefInfo()%>
  레이아웃항목참조정보2 :   <%=item.getRefOcc()%>
  레이아웃항목발생유형구분코드 :   <%=item.getOccType()%>
  레이아웃항목최대발생건수 :   <%=item.getOccMax()%>
  레이아웃항목최소발생건수 :   <%=item.getOccMin()%>
  레이아웃항목기본값 :   <%=item.getDefaultValue()%>
  레이아웃항목마스킹여부 :   <%=item.getMask()%>
  요청하신 LayoutItem 정보가 없습니다.  
+
+ + +--%> \ No newline at end of file diff --git a/WebContent/mgr/transformer/layoutType.jsp b/WebContent/mgr/transformer/layoutType.jsp new file mode 100644 index 0000000..3f2ff4a --- /dev/null +++ b/WebContent/mgr/transformer/layoutType.jsp @@ -0,0 +1,149 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.transformer.layout.LayoutType"%> +<%@ page import="com.eactive.eai.transformer.layout.LayoutTypeManager"%> +<%@ page import="com.eactive.eai.transformer.util.TransformKeys"%> +<%@ page import="java.util.HashMap"%> + +<%! + /** + *
+	* 문자열을 받아서 널이면 제로스트링을, 아니면 트림된 문자열을 리턴.
+	* 
+ * @param String 변환 대상 + * @return 'String' + */ + public static String checkNull( String str ) { + + String sResult = new String(); + if ( str == null ) { + sResult = ""; + } + else { + sResult = str.trim(); + } + return sResult; + } + +%> + +<% + LayoutTypeManager manager = LayoutTypeManager.getInstance(); + String [] alls = manager.getAllLayoutTypeName(); + String action = request.getParameter("actionType"); + + String selectedKey = request.getParameter("selectedKey"); + if(selectedKey == null && alls.length>=1) { + selectedKey = alls[0]; + } + if ("reload".equals(action)){ + manager.reload(selectedKey); + }else if ("reloadAll".equals(action)){ + manager.reload(); + }else { + ; + } + LayoutType vo = null; + + if(selectedKey!=null) { + vo = manager.getLayoutType(selectedKey); + } + +%> + + + + + + Transform LayoutType Manager + + + + +

+ 레이아웃 유형 관리

+

+
+ + + + + + + + + + + + + +
레이아웃유형명 :    +
 

+ + + + + + +<% + if(vo != null ){ + +%> + + + + + + + + + + + + + + +<% +} else { +%> + + + + +<% +} +%> +
  LayoutType정보  
  레이아웃유형명 :   <%=vo.getName()%>
  레이아웃유형설명 :   <%=vo.getDescription()%>
  메시지레이아웃생성클래스 :   <%=vo.getGenClass()%>
  요청하신 LayoutType 정보가 없습니다.  
+
+ + \ No newline at end of file diff --git a/WebContent/mgr/useDateControl.jsp b/WebContent/mgr/useDateControl.jsp new file mode 100644 index 0000000..ad077a0 --- /dev/null +++ b/WebContent/mgr/useDateControl.jsp @@ -0,0 +1,77 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> +<%@ page import="com.eactive.eai.common.useDate.UseDateControlManager"%> +<%@ page import="com.eactive.eai.common.useDate.UseDateControlVO"%> + +<% + UseDateControlManager manager = UseDateControlManager.getInstance(); + String[] names = manager.getAllKeys(); + String selectedName = request.getParameter("name"); + if(selectedName == null && names.length>0) selectedName = names[0]; + UseDateControlVO vo = manager.get(selectedName); +%> + + + + Use Date Control Manager + + + + +

+ Use Date Control Configuration

+

+
+ +<% + if(selectedName!=null) { +%> + + + + + <% + if (vo != null){ + %> + + + + + + + + + + + + + + <% + } + %> +<% } else { %> + +<% } %> +
인터페이스명 :    +
인터페이스명 :   
시작일자 :   
종료일자 :   
+ + + + +
+ +

+
+ + \ No newline at end of file diff --git a/WebContent/mgr/viewThreadList.jsp b/WebContent/mgr/viewThreadList.jsp new file mode 100644 index 0000000..02acfac --- /dev/null +++ b/WebContent/mgr/viewThreadList.jsp @@ -0,0 +1,115 @@ +<%@ page import="java.io.*, java.util.*"%> +<%@ page language="java" contentType="text/html;charset=utf-8"%> + +<%! + private ThreadGroup getRootThreadGroup() { + ThreadGroup group = Thread.currentThread().getThreadGroup(); + ThreadGroup parent = null; + while(true) { + parent = group.getParent(); + if(parent==null) return group; + + group = parent; + } + } + + private ThreadGroup findThreadGroup(ThreadGroup parent, String path) { + if(path.startsWith("/")) { + path = path.substring(1); + } + + return null; + } + + +%> + +<% + String threadGroupName = request.getParameter("ThreadGroupName"); + + ThreadGroup root = getRootThreadGroup(); + if(threadGroupName==null) threadGroupName=root.getName(); + + ThreadGroup[] children = new ThreadGroup[root.activeGroupCount()]; + root.enumerate(children, true); + + ThreadGroup current = null; + for(int i=0;i + + + + CurrentThread List + + + +

+ 쓰레드 전체 리스트 보기 +

+ + + + + + + +
+ Thread Group List (총: <%=children.length%>개) + + + + + + + + +<% + for(int i=0;i + + + + +<% + } +%> +
NoThreadGroup Name
root <%=root%>
<%=(i+1)%> <%=children[i].getName()%>
+
+
+ Thread List [<%=current.getName()%>] (총: <%=threads.length%>개) + + + + + + + + +<% + for(int i=0;i + + + + + + + + +<% + } +%> +
NoThread NameisAliveisDaemonisInterruptedactiveCount
<%=(i+1)%> <%=threads[i].getName()%> <%=threads[i].isAlive()%> <%=threads[i].isDaemon()%> <%=threads[i].isInterrupted()%> <%=threads[i].activeCount()%>
+
+ + \ No newline at end of file diff --git a/src/main/java/com/eactive/eai/adapter/service/ApiAdapterService.java b/src/main/java/com/eactive/eai/adapter/service/ApiAdapterService.java index 5a0df56..033083d 100644 --- a/src/main/java/com/eactive/eai/adapter/service/ApiAdapterService.java +++ b/src/main/java/com/eactive/eai/adapter/service/ApiAdapterService.java @@ -309,14 +309,14 @@ public class ApiAdapterService extends HttpAdapterServiceSupport { result = mapper.writeValueAsString(rootNode); } } - + // KJBank는 요청에 대한 응답 (Sync응답, Aync 에 대한 Ack응답) 에 대하여 암호화 하지 않는다. 무조건 안한다. 따라서 아래부분은 구현은 했지만 사용하지 않는다. //result = doPostEncryption(result, transactionProp); // jwhong Encrypt return result; } - // jwhong decrypt + // jwhong decrypt private String doPreDecryption(String eaiBody, Properties transactionProp, HttpServletRequest request) { String decryptAlgorithm = transactionProp.getProperty(ENCRYPT_ALGORITHM, ""); diff --git a/src/main/java/com/eactive/eai/authserver/config/AuthorizationServerConfig.java b/src/main/java/com/eactive/eai/authserver/config/AuthorizationServerConfig.java index 33be4d0..9bd1734 100644 --- a/src/main/java/com/eactive/eai/authserver/config/AuthorizationServerConfig.java +++ b/src/main/java/com/eactive/eai/authserver/config/AuthorizationServerConfig.java @@ -104,7 +104,7 @@ public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdap tokenType = vo.getProperty(PROP_TOKEN_TYPE, "JWT"); } - endpoints.pathMapping("/oauth/token", "/api/v1/oauth/token"); +// endpoints.pathMapping("/oauth/token", "/auth/oauth/v2/token") ; endpoints.authenticationManager(authenticationManager); endpoints.userDetailsService(userDetailsService); diff --git a/src/main/java/com/eactive/eai/authserver/config/OAuthRequestLoggingFilter.java b/src/main/java/com/eactive/eai/authserver/config/OAuthRequestLoggingFilter.java index 59278ca..efb0f18 100644 --- a/src/main/java/com/eactive/eai/authserver/config/OAuthRequestLoggingFilter.java +++ b/src/main/java/com/eactive/eai/authserver/config/OAuthRequestLoggingFilter.java @@ -1,5 +1,6 @@ package com.eactive.eai.authserver.config; +import org.apache.commons.lang3.StringUtils; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.context.SecurityContextHolder; @@ -12,7 +13,7 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Collection; -public class OAuthRequestLoggingFilter extends OncePerRequestFilter { +public class OAuthRequestLoggingFilter extends OncePerRequestFilter { @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) @@ -24,9 +25,10 @@ public class OAuthRequestLoggingFilter extends OncePerRequestFilter { data.setGrantType(request.getParameter("grant_type")); data.setScope(request.getParameter("scope")); data.setUsername(request.getParameter("username")); + data.setResource(request.getParameter("resource")); RequestContextData.ThreadLocalRequestContext.set(data); - + filterChain.doFilter(request, response); } finally { RequestContextData.ThreadLocalRequestContext.clear(); diff --git a/src/main/java/com/eactive/eai/authserver/config/RequestContextData.java b/src/main/java/com/eactive/eai/authserver/config/RequestContextData.java index 19815de..20a261a 100644 --- a/src/main/java/com/eactive/eai/authserver/config/RequestContextData.java +++ b/src/main/java/com/eactive/eai/authserver/config/RequestContextData.java @@ -3,12 +3,13 @@ package com.eactive.eai.authserver.config; import lombok.Data; @Data -public class RequestContextData { +public class RequestContextData { private String clientId; private String ipAddress; private String grantType; private String scope; private String username; + private String resource; // Getters and setters diff --git a/src/main/java/com/eactive/eai/authserver/custom/BearerTokenContoller.java b/src/main/java/com/eactive/eai/authserver/custom/BearerTokenContoller.java new file mode 100644 index 0000000..bda62ca --- /dev/null +++ b/src/main/java/com/eactive/eai/authserver/custom/BearerTokenContoller.java @@ -0,0 +1,125 @@ +package com.eactive.eai.authserver.custom; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import org.apache.commons.lang3.StringUtils; +import org.json.simple.JSONObject; +import org.springframework.http.ResponseEntity; +import org.springframework.security.oauth2.provider.ClientDetails; +import org.springframework.util.MultiValueMap; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.RestController; + +import com.eactive.eai.adapter.http.dynamic.filter.JwtAuthException; +import com.eactive.eai.authserver.service.OAuth2Manager; +import com.eactive.eai.common.util.Logger; + +@RestController +@RequestMapping("/auth/oauth/v2") +public class BearerTokenContoller { + + public static Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT); + private final BearerTokenService tokenService; + + public BearerTokenContoller(BearerTokenService tokenService) { + this.tokenService = tokenService; + } + + // 기본 CA Bearer Token 발급 + @PostMapping("/token") + public ResponseEntity issueCAToken(@RequestParam MultiValueMap req) throws JwtAuthException { + JSONObject resObject = new JSONObject(); + + try { + String clientId = req.getFirst("client_id"); // .get("client_id"); + String grantType = req.getFirst("grant_type"); + if (!StringUtils.equals(grantType, "client_credentials") ) { + throw new JwtAuthException("unsupported_grant_type", "Unsupported grant type"); + } + + ClientDetails clientDetails = OAuth2Manager.getInstance().getClientDeatilsStore().get(clientId); + if (clientDetails == null) { + throw new JwtAuthException("invalid_client", "Bad client credentials(not found)"); + } + + String tokenType = "Bearer"; + String clientSecret = req.getFirst("client_secret"); + String scopes = req.getFirst("scope"); + Long expiresIn = Long.valueOf(clientDetails.getAccessTokenValiditySeconds()); + + String[] reqScopeArr = org.springframework.util.StringUtils.tokenizeToStringArray(scopes, " "); + Set scopeSet = new HashSet(); + for (String scope : reqScopeArr) { + scopeSet.add(scope); + } + veryfyClient(clientDetails, clientSecret, scopeSet); + + String token = tokenService.generateCAToken(clientId, expiresIn, scopeSet); + + Map tokenMap = new HashMap<>(); + tokenMap.put("token_type", tokenType); + tokenMap.put("access_token", token); + tokenMap.put("expires_in", expiresIn); + tokenMap.put("scope", scopes); + // ... and so on for all key-value pairs + resObject.putAll(tokenMap); + + return ResponseEntity.ok(resObject); + } catch (JwtAuthException e) { + logger.error(e); + + JSONObject errorJson = new JSONObject(); + errorJson.put("error", e.getCode()); + errorJson.put("error_description", e.getMessage()); + resObject.putAll(errorJson); + return ResponseEntity.status(401).body(resObject); + } catch (Exception e) { + logger.error(e); + + JSONObject errorJson = new JSONObject(); + errorJson.put("error", "invalid_request"); + errorJson.put("error_description", e.getMessage()); + resObject.putAll(errorJson); + return ResponseEntity.status(500).body(resObject); + } + } + +// // 서비스용 Bearer Token 발급 +// @PostMapping("/service") +// public ResponseEntity issueFileToken(@RequestBody Map req) { +// String fileId = req.get("fileid"); +// +// String token = tokenService.generateFileToken(fileId); +// +// Map tokenMap = new HashMap<>(); +// tokenMap.put("token_type", "Bearer"); +// tokenMap.put("file_token", token); +// tokenMap.put("expires_in", "599"); +// tokenMap.put("expires_on", "1575593514"); +// tokenMap.put("resource", fileId); +// +// return ResponseEntity.ok(tokenMap); +// } + private void veryfyClient(ClientDetails clientDetails, String clientSecret, Set scopeSet) throws JwtAuthException { + if (!StringUtils.equals(clientDetails.getClientSecret(), clientSecret)) { + throw new JwtAuthException("invalid_client", "Bad client credentials(client_secret is empty or not match)"); + } + + if (scopeSet.isEmpty()) { + throw new JwtAuthException("invalid_client", "Bad client credentials(Scope is empty)"); + } + + if (!clientDetails.getScope().containsAll(scopeSet)) { + throw new JwtAuthException("invalid_client", "Bad client credentials(Include unacceptable scope)"); + } + } +} + diff --git a/src/main/java/com/eactive/eai/authserver/custom/BearerTokenFilter.java b/src/main/java/com/eactive/eai/authserver/custom/BearerTokenFilter.java new file mode 100644 index 0000000..d993d30 --- /dev/null +++ b/src/main/java/com/eactive/eai/authserver/custom/BearerTokenFilter.java @@ -0,0 +1,85 @@ +package com.eactive.eai.authserver.custom; + +import java.io.IOException; +import java.util.Arrays; + +import javax.servlet.FilterChain; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.json.simple.JSONObject; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.stereotype.Component; +import org.springframework.web.filter.OncePerRequestFilter; + +import com.eactive.eai.adapter.http.dynamic.filter.JwtAuthException; +import com.eactive.eai.common.util.Logger; + +@Component +public class BearerTokenFilter extends OncePerRequestFilter{ + + public static Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT); + private final BearerTokenService tokenService; + + public static final String ERROR_AUTHENTICATION_FAIL = "E.AUTHENTICATION_FAIL"; + public static final String ERROR_AUTHORIZATION_FAIL = "E.AUTHORIZATION_FAIL"; + public static final String ERROR_TOKEN_EXPIRED = "E.TOKEN_EXPIRED"; + + public BearerTokenFilter(BearerTokenService tokenService) { + this.tokenService = tokenService; + } + + @Override + protected void doFilterInternal(HttpServletRequest request, + HttpServletResponse response, + FilterChain filterChain) throws IOException, ServletException { + JSONObject resObject = new JSONObject(); + + try { + String auth = request.getHeader("Authorization"); + + if (auth != null && auth.startsWith("Bearer ")) { + String token = auth.substring(7); + + String clientId = null; + String fileId = null; + + if (tokenService.validateCA(token)) { + clientId = tokenService.getClientIdFromCA(token); + } else { + throw new JwtAuthException(ERROR_AUTHENTICATION_FAIL, "Access token is invalid or expired"); + } + +// if (fileId != null) { +// UsernamePasswordAuthenticationToken authentication = +// new UsernamePasswordAuthenticationToken(fileId, null, Arrays.asList()); +// SecurityContextHolder.getContext().setAuthentication(authentication); +// } + } + + filterChain.doFilter(request, response); + } catch (JwtAuthException jae) { + logger.debug(jae.getMessage()); + + JSONObject errorJson = new JSONObject(); + errorJson.put("error", jae.getCode()); + errorJson.put("error_description", jae.getMessage()); + resObject.putAll(errorJson); + response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); // 401 설정 + response.setContentType("application/json;charset=UTF-8"); + response.getWriter().write(resObject.toJSONString()); + } catch (Exception e) { + logger.error(e.getMessage()); + JSONObject errorJson = new JSONObject(); + errorJson.put("error", "invalid_request"); + errorJson.put("error_description", e.getMessage()); + resObject.putAll(errorJson); + response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); // 500 설정 + response.setContentType("application/json;charset=UTF-8"); + response.getWriter().write(resObject.toJSONString()); + } + } +} + diff --git a/src/main/java/com/eactive/eai/authserver/custom/BearerTokenInfo.java b/src/main/java/com/eactive/eai/authserver/custom/BearerTokenInfo.java new file mode 100644 index 0000000..e5a37fb --- /dev/null +++ b/src/main/java/com/eactive/eai/authserver/custom/BearerTokenInfo.java @@ -0,0 +1,49 @@ +package com.eactive.eai.authserver.custom; + +import java.util.Set; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class BearerTokenInfo { + @JsonProperty("client_id") + private String clientId; + private Long expiresIn; + private Long expiresAt; + private Set scopeSet; + + public String getClientId() { + return clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public Long getExpiresIn() { + return expiresIn; + } + + public void setExpiresIn(Long expiresIn) { + this.expiresIn = expiresIn; + } + + public Long getExpiresAt() { + return expiresAt; + } + + public void setExpiresAt(Long expiresIn) { + this.expiresAt = System.currentTimeMillis() + (expiresIn * 1000); + } + + public Set getScopeSet() { + return scopeSet; + } + + public void setScopeSet(Set scopeSet) { + this.scopeSet = scopeSet; + } + + public boolean isExpired() { + return System.currentTimeMillis() > expiresAt; + } +} diff --git a/src/main/java/com/eactive/eai/authserver/custom/BearerTokenService.java b/src/main/java/com/eactive/eai/authserver/custom/BearerTokenService.java new file mode 100644 index 0000000..3b01368 --- /dev/null +++ b/src/main/java/com/eactive/eai/authserver/custom/BearerTokenService.java @@ -0,0 +1,97 @@ +package com.eactive.eai.authserver.custom; + +import java.security.SecureRandom; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.stream.Collectors; +import java.util.stream.IntStream; + +import org.springframework.stereotype.Service; + +@Service +public class BearerTokenService { + + // CA 토큰 저장소 + private final Map CATokenStore = new ConcurrentHashMap<>(); + + // File 토큰 저장소 + private final Map fileTokenStore = new ConcurrentHashMap<>(); + +// // FileTransfer 토큰 저장소 +// private final Map fileTransferTokenStore = new ConcurrentHashMap<>(); + + public String generateCAToken(String clientId, Long expiresIn, Set scopeSet) { + String token = UUID.randomUUID().toString(); + + BearerTokenInfo CATokenInfo = new BearerTokenInfo(); + CATokenInfo.setClientId(clientId); + CATokenInfo.setExpiresIn(expiresIn); + CATokenInfo.setExpiresAt(expiresIn); + CATokenInfo.setScopeSet(scopeSet); + + CATokenStore.put(token, CATokenInfo); + + return token; + } + + public String generateFileToken(String fileId) { + //String token = UUID.randomUUID().toString().replace("-", ""); + String token = generateTokenString(987); + fileTokenStore.put(token, fileId); + return token; + } + +// public String generateFileTransferToken(String fileId) { +// //String token = UUID.randomUUID().toString().replace("-", ""); +// String token = generateTokenString(654); +// fileTransferTokenStore.put(token, fileId); +// return token; +// } + + public boolean validateCA(String token) { + BearerTokenInfo CATokenInfo = CATokenStore.get(token); + if (CATokenInfo == null) return false; + + if (CATokenInfo.isExpired()) { + CATokenStore.remove(token); + return false; + } + return CATokenStore.containsKey(token); + } + + public boolean validateFile(String token) { + return fileTokenStore.containsKey(token); + } + +// public boolean validateFileTransfer(String token) { +// return fileTransferTokenStore.containsKey(token); +// } + + public String getClientIdFromCA(String token) { + BearerTokenInfo CATokenInfo = CATokenStore.get(token); + return CATokenInfo.getClientId(); + } + + public String getFileIdFromFile(String token) { + return fileTokenStore.get(token); + } + +// public String getFileIdFromFileTransfer(String token) { +// return fileTransferTokenStore.get(token); +// } + + private static final String CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + private static final SecureRandom secureRandom = new SecureRandom(); + + public static String generateTokenString(int length) { + // Java 8의 IntStream과 Collectors.joining을 사용한 효율적인 방법 + return IntStream.range(0, length) + .map(i -> secureRandom.nextInt(CHARACTERS.length())) + .mapToObj(CHARACTERS::charAt) + .map(String::valueOf) + .collect(Collectors.joining()); + } +} + diff --git a/src/main/java/com/eactive/eai/authserver/custom/KjbMGOAuth2AccessTokenRequest.java b/src/main/java/com/eactive/eai/authserver/custom/KjbMGOAuth2AccessTokenRequest.java new file mode 100644 index 0000000..dcd880b --- /dev/null +++ b/src/main/java/com/eactive/eai/authserver/custom/KjbMGOAuth2AccessTokenRequest.java @@ -0,0 +1,63 @@ +package com.eactive.eai.authserver.custom; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonProperty; + +@SuppressWarnings("serial") +public class KjbMGOAuth2AccessTokenRequest implements Serializable { + @JsonProperty("grant_type") + private String grantType; + @JsonProperty("client_id") + private String clientId; + @JsonProperty("client_secret") + private String clientSecret; + private String resource; + private String scope; + + public String getGrantType() { + return grantType; + } + + public void setGrantType(String grantType) { + this.grantType = grantType; + } + + public String getClientId() { + return clientId; + } + + public void setClientId(String clientId) { + this.clientId = clientId; + } + + public String getClientSecret() { + return clientSecret; + } + + public void setClientSecret(String clientSecret) { + this.clientSecret = clientSecret; + } + + public String getResource() { + return resource; + } + + public void setResource(String resource) { + this.resource = resource; + } + + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + + @Override + public String toString() { + return "KjbMGOAuth2AccessTokenRequest [grantType=" + grantType + ", clientId=" + clientId + ", clientSecret=" + + clientSecret + ", resource=" + resource + ", scope=" + scope + "]"; + } +} diff --git a/src/main/java/com/eactive/eai/authserver/custom/KjbMGOAuth2AccessTokenResponse.java b/src/main/java/com/eactive/eai/authserver/custom/KjbMGOAuth2AccessTokenResponse.java new file mode 100644 index 0000000..b99ffe1 --- /dev/null +++ b/src/main/java/com/eactive/eai/authserver/custom/KjbMGOAuth2AccessTokenResponse.java @@ -0,0 +1,105 @@ +package com.eactive.eai.authserver.custom; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonInclude.Include; + +@SuppressWarnings("serial") +@JsonInclude(Include.NON_NULL) +public class KjbMGOAuth2AccessTokenResponse implements Serializable { + private String responseCode; + private String responseMessage; + @JsonProperty("access_token") + private String accessToken; + @JsonProperty("refresh_token") + private String refreshToken; + @JsonProperty("token_type") + private String tokenType; + @JsonProperty("expires_in") + private Long expiresIn; + @JsonProperty("expires_on") + private Long expiresOn; + private String resource; + private String scope; + + public String getResponseCode() { + return responseCode; + } + + public void setResponseCode(String responseCode) { + this.responseCode = responseCode; + } + + public String getResponseMessage() { + return responseMessage; + } + + public void setResponseMessage(String responseMessage) { + this.responseMessage = responseMessage; + } + + public String getAccessToken() { + return accessToken; + } + + public void setAccessToken(String accessToken) { + this.accessToken = accessToken; + } + + public String getrefreshToken() { + return refreshToken; + } + + public void setrefreshToken(String refreshToken) { + this.refreshToken = refreshToken; + } + + public String getTokenType() { + return tokenType; + } + + public void setTokenType(String tokenType) { + this.tokenType = tokenType; + } + + public Long getExpiresIn() { + return expiresIn; + } + + public void setExpiresIn(Long expiresIn) { + this.expiresIn = expiresIn; + } + + public Long getExpiresOn() { + return expiresOn; + } + + public void setExpiresOn(Long expiresOn) { + this.expiresOn = expiresOn; + } + + public String getResource() { + return resource; + } + + public void setResource(String resource) { + this.resource = resource; + } + + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + + @Override + public String toString() { + return "KjbMGOAuth2AccessTokenResponse [responseCode=" + responseCode + ", responseMessage=" + responseMessage + + ", accessToken=" + accessToken + ", tokenType=" + tokenType + ", expiresIn=" + expiresIn + + ", refreshToken=" + refreshToken+ ", expiresOn=" + expiresOn+ ", resource=" + resource+ ", scope=" + scope + "]"; + } +} diff --git a/src/main/java/com/eactive/eai/authserver/custom/KjbMGOAuth2Controller.java b/src/main/java/com/eactive/eai/authserver/custom/KjbMGOAuth2Controller.java new file mode 100644 index 0000000..f08be14 --- /dev/null +++ b/src/main/java/com/eactive/eai/authserver/custom/KjbMGOAuth2Controller.java @@ -0,0 +1,288 @@ +package com.eactive.eai.authserver.custom; + +import java.nio.charset.StandardCharsets; +import java.security.KeyFactory; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.Principal; +import java.security.PublicKey; +import java.security.SecureRandom; +import java.security.Signature; +import java.security.spec.X509EncodedKeySpec; +import java.time.LocalDateTime; +import java.util.Base64; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Set; + +import javax.crypto.Cipher; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.math.NumberUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.oauth2.common.OAuth2AccessToken; +import org.springframework.security.oauth2.common.util.OAuth2Utils; +import org.springframework.security.oauth2.provider.ClientDetails; +import org.springframework.security.oauth2.provider.OAuth2Authentication; +import org.springframework.security.oauth2.provider.OAuth2Request; +import org.springframework.security.oauth2.provider.endpoint.TokenEndpoint; +import org.springframework.security.oauth2.provider.token.TokenEnhancer; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +import com.eactive.eai.adapter.http.dynamic.filter.JwtAuthException; +import com.eactive.eai.authserver.config.IssueLimitOAuth2Exception; +import com.eactive.eai.authserver.config.AuthorizationServerConfig; +import com.eactive.eai.authserver.config.RequestContextData; +import com.eactive.eai.authserver.dao.TokenIssuanceLogDAO; +import com.eactive.eai.authserver.service.OAuth2Manager; +import com.eactive.eai.authserver.util.BeanUtils; +import com.eactive.eai.authserver.vo.ClientVO; +import com.eactive.eai.common.dao.DAOException; +import com.eactive.eai.common.logger.EAIDBLogControl; +import com.eactive.eai.common.util.Logger; +import com.eactive.eai.common.util.UUID; +import com.eactive.eai.data.entity.onl.authserver.TokenIssuanceLog; + +@Controller +public class KjbMGOAuth2Controller { + public static Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT); + + private static final String HEADER_TRACEID = "traceId"; + + private static final String SERVICE_CODE_ACCESS_TOKEN = "00"; // 임시설정 + @Autowired + private TokenIssuanceLogDAO tokenIssuanceLogDAO; + + @RequestMapping(value = "/mapi/oauth2/token2", method = RequestMethod.POST, produces = "application/json; charset=\"UTF-8\"") + @ResponseBody + public KjbMGOAuth2AccessTokenResponse token(@RequestBody KjbMGOAuth2AccessTokenRequest tokenRequest, + HttpServletRequest request, HttpServletResponse response) { + if (logger.isDebug()) { + logger.debug(tokenRequest.toString()); + } + + KjbMGOAuth2AccessTokenResponse responseToken = new KjbMGOAuth2AccessTokenResponse(); + try { + if (!StringUtils.equals(tokenRequest.getGrantType(), "client_credentials")) { + throw new JwtAuthException( + String.format("%d%s%s", HttpStatus.BAD_REQUEST.value(), SERVICE_CODE_ACCESS_TOKEN, "02"), + "Invalid Mandatory Field {grantType}"); + } + + String grantType = tokenRequest.getGrantType(); + String clientId = tokenRequest.getClientId(); + String clientSecret = tokenRequest.getClientSecret(); + + String[] scopeArr = org.springframework.util.StringUtils.tokenizeToStringArray(tokenRequest.getScope(), " "); + Set scopeSet = new HashSet(); + for (String scope : scopeArr) { + scopeSet.add(scope); + } + + String[] resourceArr = org.springframework.util.StringUtils.tokenizeToStringArray(tokenRequest.getResource(), ","); + Set resourceSet = new HashSet(); + for (String resource : resourceArr) { + resourceSet.add(resource); + } + + ClientDetails clientDetails = OAuth2Manager.getInstance().getClientDeatilsStore().get(clientId); + verifyClient(clientDetails, clientId, scopeSet); + + String traceId = UUID.randomUUID().toString().replace("-", ""); + response.setHeader(HEADER_TRACEID, traceId); + + HashMap authorizationParameters = new HashMap(); + authorizationParameters.put(OAuth2Utils.GRANT_TYPE, grantType); + authorizationParameters.put(OAuth2Utils.CLIENT_ID, clientId); + authorizationParameters.put("client_secret", clientSecret); + + Set responseType = new HashSet(); + responseType.add(tokenRequest.getGrantType()); + + OAuth2Request authorizationRequest = new OAuth2Request(authorizationParameters, clientId, null, true, scopeSet, + resourceSet, "", responseType, null); + + Principal principal = new OAuth2Authentication(authorizationRequest, null); + ResponseEntity result = tokenEndpoint().postAccessToken(principal, + authorizationParameters); + OAuth2AccessToken token = result.getBody(); + if(StringUtils.isNotBlank(token.getTokenType()) && StringUtils.equalsIgnoreCase(token.getTokenType(), "bearer")) { + responseToken.setTokenType("Bearer"); + } else { responseToken.setTokenType(token.getTokenType()); } + responseToken.setAccessToken(token.getValue()); + responseToken.setExpiresIn(Long.valueOf(token.getExpiresIn())); + responseToken.setrefreshToken(""); + responseToken.setExpiresOn(System.currentTimeMillis() + (token.getExpiresIn() * 1000)); + responseToken.setScope(tokenRequest.getScope()); + responseToken.setResource(tokenRequest.getResource()); + } catch (JwtAuthException e) { + response.setStatus(NumberUtils.toInt(StringUtils.left(e.getCode(), 3), HttpStatus.UNAUTHORIZED.value())); + responseToken.setResponseCode(e.getCode()); + responseToken.setResponseMessage(e.getMessage()); + } catch (Exception e) { + logger.error(e.getMessage()); + response.setStatus(HttpStatus.UNAUTHORIZED.value()); + responseToken.setResponseCode( + String.format("%d%s%s", HttpStatus.UNAUTHORIZED.value(), SERVICE_CODE_ACCESS_TOKEN, "00")); + responseToken.setResponseMessage("Unauthorized. [Unknown]"); + } + + return responseToken; + } + + private void verifyClient(ClientDetails clientDetails, String clientId, Set scopeSet) + throws JwtAuthException { + + if (StringUtils.isBlank(clientId)) { + throw new JwtAuthException( + String.format("%d%s%s", HttpStatus.BAD_REQUEST.value(), SERVICE_CODE_ACCESS_TOKEN, "02"), + "Invalid Mandatory Field {client_id}"); + } + + + if (clientDetails == null) { + throw new JwtAuthException( + String.format("%d%s%s", HttpStatus.UNAUTHORIZED.value(), SERVICE_CODE_ACCESS_TOKEN, "00"), + "Unauthorized. [client not found]"); + } + + if (scopeSet.isEmpty()) { + throw new JwtAuthException( + String.format("%d%s%s", HttpStatus.BAD_REQUEST.value(), SERVICE_CODE_ACCESS_TOKEN, "02"), + "Invalid Mandatory Field {scope}"); + } + + if (!clientDetails.getScope().containsAll(scopeSet)) { + throw new JwtAuthException( + String.format("%d%s%s", HttpStatus.UNAUTHORIZED.value(), SERVICE_CODE_ACCESS_TOKEN, "00"), + "Unauthorized. [Bad client credentials(Include unacceptable scope)]"); + } + + } + + private TokenEndpoint tokenEndpoint() { + return BeanUtils.getBean("tokenEndpoint", TokenEndpoint.class); + } + + private class TokenIssuanceLogEnhancer implements TokenEnhancer { + @Override + public OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication) { + if (!EAIDBLogControl.isEnable()) { + logger.warn("DB logging is disabled. Skipping token issuance logging."); + return accessToken; + } + + String clientId = authentication.getOAuth2Request().getClientId(); + LocalDateTime startDateTime = LocalDateTime.now().minusHours(24); + + int recentTokenCount = tokenIssuanceLogDAO.findRecentLogsForRestrictionCount(clientId, startDateTime); + + try { + ClientVO clientVO = OAuth2Manager.getInstance().getClientInfo(clientId); + int dailyTokenLimit = clientVO.getDailyTokenLimit(); + if (dailyTokenLimit > 0 && recentTokenCount >= dailyTokenLimit) { + throw new IssueLimitOAuth2Exception("Token issuance limit exceeded for this client"); + } + + // JWT 변환 이후의 최종 토큰 값 로깅 + logTokenIssuance(true, false, "Token issued successfully", accessToken.getValue()); + } catch (DAOException e) { + logger.warn("cannot find clientVo - " + clientId); + } + return accessToken; + } + } + + private void logTokenIssuance(boolean isSuccess, boolean isRestrictionExempt, String resultMessage, String accessToken) { + try { + if (!EAIDBLogControl.isEnable()) { + logger.warn("DB logging is disabled. Skipping token issuance logging."); + return; + } + RequestContextData data = RequestContextData.ThreadLocalRequestContext.get(); + OAuth2Manager.getInstance(); + + TokenIssuanceLog log = new TokenIssuanceLog(); + String clientId = data.getClientId(); + log.setClientId(clientId); + + if(StringUtils.isNotBlank(clientId)) { + ClientVO clientVO = OAuth2Manager.getInstance().getClientInfo(clientId); + log.setAppName(clientVO.getClientName()); + log.setOrgId(clientVO.getOrgId()); + log.setOrgName(clientVO.getOrgName()); + } + + log.setGrantType(data.getGrantType()); + log.setScope(data.getScope()); + log.setIpAddress(data.getIpAddress()); + log.setSuccessYn(isSuccess ? "Y" : "N"); + log.setIssuanceDateTime(LocalDateTime.now()); + log.setRestrictionExemptYn(isRestrictionExempt ? "Y" : "N"); + log.setResultMessage(resultMessage); + log.setAccessToken(accessToken); // Add access token value to the log + + tokenIssuanceLogDAO.saveTokenIssuanceLog(log); + } catch (Throwable th) { + logger.error("Error while logging token issuance: " + th.getMessage(), th); + } + } + + public static void main(String[] args) throws Exception { + // First generate a public/private key pair + KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); + // generator.initialize(512, new SecureRandom()); + //generator.initialize(1024, new SecureRandom()); + generator.initialize(2048, new SecureRandom()); + KeyPair pair = generator.generateKeyPair(); + + // The private key can be used to sign (not encrypt!) a message. The public key + // holder can then verify the message. + + String message = "sSGJDwlJsel5WeXodzd3J3MQ20KYCZpL|2022-12-21T14:36:19+07:00"; + + // Let's sign our message + Signature privateSignature = Signature.getInstance("SHA256withRSA"); + privateSignature.initSign(pair.getPrivate()); + privateSignature.update(message.getBytes(StandardCharsets.UTF_8)); + System.out.println( + "private key=" + Base64.getEncoder().encodeToString(pair.getPrivate().getEncoded())); + + byte[] signature = privateSignature.sign(); + //System.out.println("signature=" + new String(signature, StandardCharsets.UTF_8)); + System.out.println("signature=" + Base64.getEncoder().encodeToString(signature)); + + // Let's check the signature + Signature publicSignature = Signature.getInstance("SHA256withRSA"); + publicSignature.initVerify(pair.getPublic()); + publicSignature.update(message.getBytes(StandardCharsets.UTF_8)); + boolean isCorrect = publicSignature.verify(signature); + System.out.println("public key=" + Base64.getEncoder().encodeToString(pair.getPublic().getEncoded())); + + System.out.println("Signature correct: " + isCorrect); + + // The public key can be used to encrypt a message, the private key can be used + // to decrypt it. + // Encrypt the message + Cipher encryptCipher = Cipher.getInstance("RSA"); + encryptCipher.init(Cipher.ENCRYPT_MODE, pair.getPublic()); + + byte[] cipherText = encryptCipher.doFinal(message.getBytes(StandardCharsets.UTF_8)); + + // Now decrypt it + Cipher decriptCipher = Cipher.getInstance("RSA"); + decriptCipher.init(Cipher.DECRYPT_MODE, pair.getPrivate()); + + String decipheredMessage = new String(decriptCipher.doFinal(cipherText), StandardCharsets.UTF_8); + + System.out.println(decipheredMessage); + } +} diff --git a/src/main/java/com/eactive/eai/authserver/custom/SecurityConfig.java b/src/main/java/com/eactive/eai/authserver/custom/SecurityConfig.java new file mode 100644 index 0000000..f2a6183 --- /dev/null +++ b/src/main/java/com/eactive/eai/authserver/custom/SecurityConfig.java @@ -0,0 +1,58 @@ +package com.eactive.eai.authserver.custom; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.web.SecurityFilterChain; +import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; +// +//@Configuration +//@EnableWebSecurity +//public class SecurityConfig { +// +// private final BearerTokenFilter tokenFilter; +// +// public SecurityConfig(BearerTokenFilter tokenFilter) { +// this.tokenFilter = tokenFilter; +// } +// +// @Bean +// public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { +// +// http +// .csrf().disable() +// .authorizeRequests() +// .antMatchers("/auth/token/**").permitAll() +// .anyRequest().authenticated() +// .and() +// .addFilterBefore(tokenFilter, UsernamePasswordAuthenticationFilter.class); +// +// return http.build(); +// } +//} +@Configuration +@EnableWebSecurity +public class SecurityConfig extends WebSecurityConfigurerAdapter { + + private final BearerTokenFilter tokenFilter; + + @Autowired + public SecurityConfig(BearerTokenFilter tokenFilter) { + this.tokenFilter = tokenFilter; + } + + @Override + protected void configure(HttpSecurity http) throws Exception { + + http + .csrf().disable() + .authorizeRequests() + .antMatchers("/auth/token/**").permitAll() + .anyRequest().authenticated() + .and() + .addFilterBefore(tokenFilter, UsernamePasswordAuthenticationFilter.class); + } +} \ No newline at end of file diff --git a/src/main/java/com/eactive/eai/custom/adapter/app/impl/JwtTokenCreator.java b/src/main/java/com/eactive/eai/custom/adapter/app/impl/JwtTokenCreator.java new file mode 100644 index 0000000..47a4ded --- /dev/null +++ b/src/main/java/com/eactive/eai/custom/adapter/app/impl/JwtTokenCreator.java @@ -0,0 +1,477 @@ +package com.eactive.eai.custom.adapter.app.impl; + +import java.text.ParseException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Properties; +import java.util.Set; + +import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang3.BooleanUtils; +import org.apache.commons.lang3.StringUtils; +//import org.codehaus.jackson.map.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.json.simple.JSONObject; +import org.json.simple.JSONValue; +import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.authority.SimpleGrantedAuthority; +import org.springframework.security.core.userdetails.User; +import org.springframework.security.oauth2.common.OAuth2AccessToken; +import org.springframework.security.oauth2.common.util.OAuth2Utils; +import org.springframework.security.oauth2.provider.ClientDetails; +import org.springframework.security.oauth2.provider.OAuth2Authentication; +import org.springframework.security.oauth2.provider.OAuth2Request; +import org.springframework.security.oauth2.provider.TokenRequest; +import org.springframework.security.oauth2.provider.token.DefaultTokenServices; +import org.springframework.security.oauth2.provider.token.TokenEnhancer; +import org.springframework.security.oauth2.provider.token.TokenEnhancerChain; +import org.springframework.security.oauth2.provider.token.TokenStore; +import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter; +import org.springframework.security.oauth2.provider.token.store.JwtTokenStore; + +import com.eactive.eai.adapter.app.BusinessApplication; +import com.eactive.eai.adapter.http.dynamic.filter.ApiAuthFilter; +import com.eactive.eai.adapter.http.dynamic.filter.JwtAuthException; +//import com.eactive.eai.adapter.http.dynamic.filter.JwtAuthFilter; +import com.eactive.eai.authserver.service.OAuth2Manager; +import com.eactive.eai.authserver.util.BeanUtils; +import com.eactive.eai.authserver.vo.ClientVO; +import com.eactive.eai.common.util.Logger; +//import com.nimbusds.jwt.SignedJWT; + +/** + * JWT 토큰을 발급한다.(인증은 요청시스템에서 수행하고 토큰만 발급) + * + * @author + * + */ +public class JwtTokenCreator implements BusinessApplication { + public static Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT); + + private static final boolean VERYFY_CLIENT_SECRET = true; + private static final String[] GRANT_TYPES = { "client_credentials", "authorization_code", "password", + "refresh_token" }; + + @SuppressWarnings("unchecked") + @Override + public Object executeApplication(Properties prop, Object messageBytes, Properties tempProp) throws Exception { + // 응답전문용 Json Object + JSONObject resObject = new JSONObject(); + + try { + if (messageBytes == null) { + throw new Exception("Message is null."); + } + + String message = new String((byte[]) messageBytes); + if (StringUtils.isBlank(message)) { + throw new Exception("Message is empty."); + } + + /** + * { + * "grant_type":"client_credentials", + * "client_id":"WNHZOadBfB9UCPPuq6YArKUW87elXmZX", + * "client_secret":"JhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9", + * "scope":"manage", + * "expires_in":3600, + * "resource_ids":"aaa, bbb", + * "authorities":"ROLE_ADM, ROLE_DEV", + * "user_name":"aaaaaaaaaaaaaa", + * "support_refresh_token_yn": "Y", + * "refresh_token_expires_in":86400, + * "refresh_token":"JhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOj~~", + * "iss":"AZABBB0000", + * "aud":"ZZAAAA0000" + * } + */ + boolean isVerifyClientSecret = VERYFY_CLIENT_SECRET; + // 요청전문 Json Object + JSONObject jsonObject = (JSONObject) JSONValue.parse(message); + + /* 2022.5.25. yseo + * 복합거래여부 확인, 복합거래의 경우 요청전문의 내용을 응답전문에 그대로 복사 + * 복합거래 : 토큰발급 이후 2차 처리를 위한 Outbound Adapter를 다시 호출하는 거래 + * 복합거래 대상 EAIServiceCD는 APP Adapter의 프로퍼티(SVC_CD)에 등록해서 관리. + */ + String svcCds = prop.getProperty("SVC_CD"); + String[] svcCdArr = org.springframework.util.StringUtils.tokenizeToStringArray(svcCds, ","); + Boolean isComplex = ArrayUtils.contains(svcCdArr, tempProp.getProperty("EAISvcCd"))?true:false; + if(isComplex) { + resObject = jsonObject; + } + logger.debug("1. isComplex : [" + isComplex + "]"); + + String grantType = (String) jsonObject.get(OAuth2Utils.GRANT_TYPE); + if (!ArrayUtils.contains(GRANT_TYPES, grantType)) { + throw new JwtAuthException("unsupported_grant_type", "Unsupported grant type"); + } + logger.debug("2. grantType : [" + grantType + "]"); + + String clientId = (String) jsonObject.get(OAuth2Utils.CLIENT_ID); + if (StringUtils.isBlank(clientId)) { + throw new JwtAuthException("invalid_client", "Bad client credentials(client_id is empty)"); + /* clientId에 허용된 grantType인지 확인 2022.05.23 yseo*/ + } else { + veryfyGrantType(clientId, grantType); + } + logger.debug("3. clientId : [" + clientId + "]"); + + /* grantType = "client_credentials" 이면 client_secret 체크 2022.05.23 yseo + * Mydata 관련해서는 무조건 체크해야함. + */ +// if (!StringUtils.equalsIgnoreCase(grantType, "client_credentials")) isVerifyClientSecret = false; + if (isVerifyClientSecret) { + String clientSecret = (String) jsonObject.get("client_secret"); + if (StringUtils.isBlank(clientSecret)) { + throw new JwtAuthException("invalid_client", "Bad client credentials(client_secret is empty)"); + } + veryfyClientSecret(clientId, clientSecret); + logger.debug("4. clientSecret : [" + clientSecret + "]"); + } + + Set scopeSet = assignScope((String) jsonObject.get(OAuth2Utils.SCOPE)); + if (scopeSet == null || scopeSet.size() == 0) { + if (!StringUtils.equals(grantType, "refresh_token")) { + throw new Exception("scope is empty."); + } + } + logger.debug("5. scopeSet : [" + scopeSet + "]"); + + Set resourceIdSet = assignResourceIds((String) jsonObject.get("resource")); + Set authoritiesSet = assignAuthorities((String) jsonObject.get("authorities")); + + String userName = (String) jsonObject.get("user_name"); + if (StringUtils.equals(grantType, "password") || StringUtils.equals(grantType, "authorization_code")) { + if (StringUtils.isBlank(userName)) { + throw new Exception("user_name is empty."); + } + } + logger.debug("6. userName : [" + userName + "]"); + + /* 요청정보에 expires_in(토큰유효기간) 값이 없는 경우, client정보에 등록된 유효기간 찾아 대체 2022.05.23 yseo*/ + String expIn = String.valueOf(jsonObject.get(OAuth2AccessToken.EXPIRES_IN)); + Long expiresIn = null; + if (StringUtils.isNumeric(expIn)) { + expiresIn = Long.parseLong(expIn); + } else if (StringUtils.isBlank(expIn) || StringUtils.equalsIgnoreCase("null", expIn)) { + expiresIn = assignDefaultExpiresIn(clientId, "expires_in"); + } else { + throw new Exception("expires_in is not numeric."); + } + logger.debug("7. expiresIn : [" + expIn + "]"); +// Long expiresIn = (Long) jsonObject.get(OAuth2AccessToken.EXPIRES_IN); +// if (expiresIn == null) { +// expiresIn = assignDefaultExpiresIn(clientId, "expires_in"); +// } + + boolean supportRefreshToken = BooleanUtils.toBoolean((String) jsonObject.getOrDefault("support_refresh_token_yn", "N")); + /* 요청정보에 refresh_token_expires_in(리프레시토큰유효기간) 값이 없는 경우, client정보에 등록된 유효기간 찾아 대체 2022.05.23 yseo*/ + String refreshExpIn = String.valueOf(jsonObject.get("refresh_token_expires_in")); + Long refreshTokenExpiresIn = null; + if (supportRefreshToken && StringUtils.isNumeric(refreshExpIn)) { + refreshTokenExpiresIn = Long.parseLong(refreshExpIn); + } else if (supportRefreshToken && (StringUtils.isBlank(refreshExpIn) || StringUtils.equalsIgnoreCase("null", refreshExpIn))) { + refreshTokenExpiresIn = assignDefaultExpiresIn(clientId, "refresh_token_expires_in"); + } else if (supportRefreshToken) { + throw new Exception("refresh_token_expires_in is not numeric."); + } + logger.debug("8. refreshTokenExpiresIn : [" + refreshExpIn + "]"); +// Long refreshTokenExpiresIn = (Long) jsonObject.get("refresh_token_expires_in"); +// if (supportRefreshToken && refreshTokenExpiresIn == null) { +// refreshTokenExpiresIn = assignDefaultExpiresIn(clientId, "refresh_token_expires_in"); +// } + + String refreshToken = (String) jsonObject.get("refresh_token"); + if (StringUtils.equals(grantType, "refresh_token") && StringUtils.isBlank(refreshToken)) { + throw new JwtAuthException("invalid_token", "refresh_token is empty."); + } + logger.debug("9. refreshToken : [" + refreshToken + "]"); + + String iss = (String) jsonObject.get("iss"); +// if (StringUtils.isBlank(iss)) { +// iss = assignDefaultStringValue(clientId, "iss"); +// } +// logger.debug("10. iss : [" + iss + "]"); +// + String aud = (String) jsonObject.get("aud"); +// if (StringUtils.isBlank(aud)) { +// aud = assignDefaultStringValue(clientId, "aud"); +// } +// logger.debug("11. aud : [" + aud + "]"); + + String tokenStr = createToken(grantType, clientId, scopeSet, resourceIdSet, authoritiesSet, userName, expiresIn, + supportRefreshToken, refreshTokenExpiresIn, refreshToken, iss, aud); +// logger.debug("#####created tokenStr==>"+tokenStr); + + //20211122 bearer -> Bearer로 변환철. mydata api준수 + JSONObject jsonObj = (JSONObject) JSONValue.parse(tokenStr); + String tokenType = (String)jsonObj.get("token_type"); + if(StringUtils.isNotBlank(tokenType) && StringUtils.equalsIgnoreCase(tokenType, "bearer")) { + jsonObj.put("token_type","Bearer"); + } + jsonObj.remove("jti"); + jsonObj.put("resource", (String) jsonObject.get("resource")); + if (StringUtils.equals(grantType, "password") || StringUtils.equals(grantType, "authorization_code")) { + jsonObj.put("refresh_token_expires_in", refreshTokenExpiresIn-1); + } + tokenStr = jsonObj.toJSONString(); + logger.debug("##### Bearer checked tokenStr==>"+tokenStr); + + // 복합거래의 경우 발급된 토큰정보를 "TOKEN_DATAGROUP" 그룹으로 추가 + if(isComplex) { + resObject.put("TOKEN_DATAGROUP", jsonObj); + } else { + resObject.putAll(jsonObj); + } + String resStr = resObject.toJSONString(); + + return resStr.getBytes(); + } catch (JwtAuthException e) { + logger.error(e); + + JSONObject errorJson = new JSONObject(); + errorJson.put("error", e.getCode()); + errorJson.put("error_description", e.getMessage()); + resObject.putAll(errorJson); + return resObject.toJSONString().getBytes(); + } catch (Exception e) { + logger.error(e); + + JSONObject errorJson = new JSONObject(); + errorJson.put("error", "invalid_request"); + errorJson.put("error_description", e.getMessage()); + resObject.putAll(errorJson); + return resObject.toJSONString().getBytes(); + } + } + + private Set assignResourceIds(String resourceIds) throws Exception { + if (StringUtils.isBlank(resourceIds)) { + return null; + } + + String[] arr = org.springframework.util.StringUtils.tokenizeToStringArray(resourceIds, ","); + Set resourceIdSet = new HashSet(); + for (String resourceId : arr) { + resourceIdSet.add(resourceId); + } + + return resourceIdSet; + } + + private void veryfyGrantType(String clientId, String grantType) throws JwtAuthException { + ClientDetails details = OAuth2Manager.getInstance().getClientDeatilsStore().get(clientId); + if (details == null) { + throw new JwtAuthException("invalid_client", "Bad client credentials(not found)"); + } + + if (!details.getAuthorizedGrantTypes().contains(grantType)) { + throw new JwtAuthException("unsupported_grant_type", "Unsupported grant type for ClientID"); + } + } + + private void veryfyClientSecret(String clientId, String clientSecret) throws JwtAuthException { + ClientDetails details = OAuth2Manager.getInstance().getClientDeatilsStore().get(clientId); + if (details == null) { + throw new JwtAuthException("invalid_client", "Bad client credentials(not found)"); + } + + if (!StringUtils.equals(details.getClientSecret(), clientSecret)) { + throw new JwtAuthException("invalid_client", "Bad client credentials"); + } + } + + private Long assignDefaultExpiresIn(String clientId, String flag) throws JwtAuthException { + ClientDetails details = OAuth2Manager.getInstance().getClientDeatilsStore().get(clientId); + Long retLong = null; + if (details == null) { + throw new JwtAuthException("invalid_client", "Bad client credentials(not found)"); + } + + if (StringUtils.equals(flag, "expires_in") && StringUtils.isNotBlank(details.getAccessTokenValiditySeconds().toString())) { + retLong = new Long(details.getAccessTokenValiditySeconds()); + } else if (StringUtils.equals(flag, "refresh_token_expires_in") && StringUtils.isNotBlank(details.getRefreshTokenValiditySeconds().toString())) { + retLong = new Long(details.getRefreshTokenValiditySeconds()); + } else { + throw new JwtAuthException("invalid_client", "Bad expires_in/refresh_token_expires_in(not found)"); + } + return retLong; + } + + private String assignDefaultStringValue(String clientId, String flag) throws Exception { + ClientVO client = (ClientVO) OAuth2Manager.getInstance().getClientDeatilsStore().get(clientId); + String retStr = ""; + if (client == null) { + throw new JwtAuthException("invalid_client", "Bad client credentials(not found)"); + } + + if (StringUtils.equals(flag, "iss") && StringUtils.isNotBlank(client.getIssuer())) { + retStr = client.getIssuer(); + } else if (StringUtils.equals(flag, "aud") && StringUtils.isNotBlank(client.getAudience())) { + retStr = client.getAudience(); + } else { + throw new Exception("iss/aud is null."); + } + logger.info("===================>"+flag+" : ["+retStr+"]"); + return retStr; + } + + private Set assignScope(String scopes) throws Exception { + if (StringUtils.isBlank(scopes)) { + return new HashSet(); + } + + String[] arr = org.springframework.util.StringUtils.tokenizeToStringArray(scopes, " "); + Set scopeSet = new HashSet(); + for (String scope : arr) { + scopeSet.add(scope); + } + + return scopeSet; + } + + private Set assignAuthorities(String authorities) throws Exception { + if (StringUtils.isBlank(authorities)) { + return new HashSet(); + } + + String[] arr = org.springframework.util.StringUtils.tokenizeToStringArray(authorities, ","); + Set authoritiesSet = new HashSet(); + for (String authority : arr) { + authoritiesSet.add(new SimpleGrantedAuthority(authority)); + } + + return authoritiesSet; + } + + private String createToken(String grantType, String clientId, Set scopeSet, Set resourceIdSet, + Set authoritiesSet, String userName, Long expiresIn, boolean supportRefreshToken, + Long refreshTokenExpiresIn, String refreshToken, String issuer, String audience) throws Exception { + HashMap authorizationParameters = new HashMap(); + authorizationParameters.put(OAuth2Utils.GRANT_TYPE, grantType); + authorizationParameters.put(OAuth2Utils.CLIENT_ID, clientId); +// authorizationParameters.put("iss", issuer); +// authorizationParameters.put("aud", audience); + if (StringUtils.equals(grantType, "password") || StringUtils.equals(grantType, "authorization_code")) { + authorizationParameters.put("user_name", userName); + } + + Set responseType = new HashSet(); + responseType.add(grantType); + + OAuth2Request authorizationRequest = new OAuth2Request(authorizationParameters, clientId, authoritiesSet, true, + scopeSet, resourceIdSet, "", responseType, null); + + Authentication authentication = null; + if (StringUtils.equals(grantType, "password") || StringUtils.equals(grantType, "authorization_code")) { + User userPrincipal = new User(userName, "", true, true, true, true, authoritiesSet); + authentication = new UsernamePasswordAuthenticationToken(userPrincipal, null, authoritiesSet); + } + + OAuth2Authentication authenticationRequest = new OAuth2Authentication(authorizationRequest, authentication); + authenticationRequest.setAuthenticated(true); + + DefaultTokenServices tokenServices = createDefaultTokenServices(supportRefreshToken, expiresIn, + refreshTokenExpiresIn); + OAuth2AccessToken accessToken = null; + if (StringUtils.equals(grantType, "refresh_token")) { + tokenServices.setReuseRefreshToken(true); + TokenRequest tokenRequest = new TokenRequest(authorizationParameters, clientId, scopeSet, grantType); + accessToken = tokenServices.refreshAccessToken(refreshToken, tokenRequest); + } else { + accessToken = tokenServices.createAccessToken(authenticationRequest); + } + + logger.debug("accessToken=" + accessToken.toString()); + + return new ObjectMapper().writeValueAsString(accessToken); + } + + private DefaultTokenServices createDefaultTokenServices(boolean supportRefreshToken, Long expiresIn, + Long refreshTokenExpiresIn) throws Exception { + TokenEnhancerChain tokenEnhancerChain = new TokenEnhancerChain(); + tokenEnhancerChain.setTokenEnhancers(Arrays.asList(tokenEnhancer(), accessTokenConverter())); + + DefaultTokenServices tokenServices = new DefaultTokenServices(); + tokenServices.setTokenStore(tokenStore()); + tokenServices.setSupportRefreshToken(supportRefreshToken); + tokenServices.setTokenEnhancer(tokenEnhancerChain); + if (expiresIn != null) { + tokenServices.setAccessTokenValiditySeconds(expiresIn.intValue()); + } + if (supportRefreshToken && refreshTokenExpiresIn != null) { + tokenServices.setRefreshTokenValiditySeconds(refreshTokenExpiresIn.intValue()); + } + return tokenServices; + } + + private TokenEnhancer tokenEnhancer() { +// return BeanUtils.getBean("tokenEnhancer", TokenEnhancer.class); + return (TokenEnhancer) accessTokenConverter(); + } + + private JwtAccessTokenConverter accessTokenConverter() { + return BeanUtils.getBean("jwtAccessTokenConverter", JwtAccessTokenConverter.class); + } + + private TokenStore tokenStore() { + return new JwtTokenStore((JwtAccessTokenConverter) accessTokenConverter()); + } + + public static void main(String args[]){ + + + +// String token = "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImRlZmF1bHRfc3NsX2tleSJ9.ew0KICAiaXNzIjogIkExQUFFUjAwMDAiLA0KICAiYXVkIjoiWlZBQUVNMDAwMCIsDQogICJqdGkiOiJlYmI4NmUyMi03YzZmLTQzZDItOTZiMy05NjU0MTAyZTE1M2MiLA0KICAiZXhwIjoiMTYzNjk2ODcwOSIsDQogICJzY29wZSI6ImJhbmsubGlzdCINCn0.nF0JeCHJHn7yBzhjEnge_Eqi0aAeD_WTt0iUB2V2VPJV9zWgMW-Npr3fCXlmYP5HoTjeQES5ftrxWLlLMaxRPHDKWwafgwLm3eQt9r_x_j0PRn-KpoZ9xTWy3oKCQvP0DN0IQepLZfM214nCrjdSPCV17oUS03cBW0lIDmXeROSR2auAMZvkSQqF74E_QLEKF3XLk0MM3Jz4nZp1bBj3PfJyCxjy2ibp12TN0vHccGmSItqANsbeVn0sQybdIraNzb9bptLwWe8WYyn3XugEA9-bavPOSPwrGgLENBnHnzWj1L8yS0rXuEjydCwf6HMAbpNVHQpicM0Q3xdl5W1PBA"; +// String[] components = token.split("\\s"); + + //String r "refresh_token_expires_in":"604800","refresh_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6ImRlZmF1bHRfc3NsX2tleSJ9.ew0KICAiaXNzIjogIkExQUFFUjAwMDAiLA0KICAiYXVkIjoiWlZBQUVNMDAwMCIsDQogICJqdGkiOiIwMzI5Y2M3Zi04Y2U2LTQxNzQtYTc5Ny1mMWRjNjg1ZmM5NDAiLA0KICAiZXhwIjoiMTYzNjk2ODcwOSINCn0.dQx6kWm1JCEgueZjUsQJYNDBu2i4P1-jVLKgUH6aX2aBFunlUBtk_zMMFIJb3OvQpz8qPc9xhs1MkM2YHdpJlNleHY3GhhjiQMfYeiCU9yOzv-zuyvOY1pCO0McmHJNdFcxoQfHHFNm4yFay3dOAFE0Z3FQ74nwxrgnzKSucrHCKyGz0pHdLWnWxHNrJMZ4NmaSyPRxU3qxdWFe1soxqgTqpW_SQkTl3D5SWXgevc6zihPPpFhCSOJ39RrJlIVSH1IY5NRAm71AoaZ6ooLsLvPNED3Z7rG-g9coKEU_DASeCNslRZrP0D3azqswFeu-np3zFZUTrgP_TNT6FFReEnA"; + try { + JwtTokenCreator jtc = new JwtTokenCreator(); +// String me="\"d\""; + String message= "{\"refresh_token_expires_in\":\"86400\",\"refresh_token\":null,\"grant_type\":\"authorization_code\",\"support_refresh_token_in\":\"Y\",\"user_name\":\"aaa\",\"scope\":\"bank.list\",\"expires_in\":\"3600\",\"client_id\":\"ZZAAAAPacQmv3ZVhtPISDSA9jb9AWjak\"}"; + JSONObject jsonObject = (JSONObject) JSONValue.parse(message); + String grantType = (String) jsonObject.get(OAuth2Utils.GRANT_TYPE); + String clientId = (String) jsonObject.get(OAuth2Utils.CLIENT_ID); +// String clientSecret = (String) jsonObject.get("client_secret"); + Set scopeSet; + + Properties prop = null; + byte[] msgBytes = null; + msgBytes = message.getBytes(); + jtc.executeApplication(prop, msgBytes, prop); + +// scopeSet = jtc.assignScope((String) jsonObject.get(OAuth2Utils.SCOPE)); +// +// +// Set resourceIdSet = jtc.assignResourceIds((String) jsonObject.get("resource_ids")); +// Set authoritiesSet = jtc.assignAuthorities((String) jsonObject.get("authorities")); +// +// String userName = (String) jsonObject.get("user_name"); +// +// +// Long expiresIn = Long.parseLong(jsonObject.get(OAuth2AccessToken.EXPIRES_IN).toString()); +// Long refreshTokenExpiresIn = Long.parseLong(jsonObject.get("refresh_token_expires_in").toString()); +//// Long expiresIn = (Long) jsonObject.get(OAuth2AccessToken.EXPIRES_IN); +//// Long refreshTokenExpiresIn = (Long) jsonObject.get("refresh_token_expires_in"); +// boolean supportRefreshToken = BooleanUtils +// .toBoolean((String) jsonObject.getOrDefault("support_refresh_token_yn", "Y")); +// +// String refreshToken = (String) jsonObject.get("refresh_token"); +// +// jtc.createToken( grantType, clientId, scopeSet, resourceIdSet,authoritiesSet, userName, expiresIn, supportRefreshToken, +// refreshTokenExpiresIn, refreshToken); + + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/src/main/java/com/eactive/eai/custom/message/GUIDGeneratorKJB.java b/src/main/java/com/eactive/eai/custom/message/GUIDGeneratorKJB.java new file mode 100644 index 0000000..71f0dc2 --- /dev/null +++ b/src/main/java/com/eactive/eai/custom/message/GUIDGeneratorKJB.java @@ -0,0 +1,83 @@ +package com.eactive.eai.custom.message; + +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; + +import org.apache.commons.lang3.StringUtils; + +import com.eactive.eai.common.server.Keys; +import com.eactive.eai.common.util.StringUtil; +import com.eactive.eai.common.util.UUID; + +/** + * 1. 기능 : UUID Generation Class 2. 처리 개요 : * - 3. 주의사항 + * + * @author : + * @version : v 1.0.0 + * @see : 관련 기능을 참조 + * @since : : + */ +public final class GUIDGeneratorKJB { + + private static final DateTimeFormatter SDF_YYYYMMDDHHMMSS = DateTimeFormatter.ofPattern("yyyyMMddHHmmss"); + + /* + * 그룹사코드(3) + 호스트명(8) + 서버구분번호(2) + 일자(8) + 전문생성시간(6) + 일련번호(6) + 시스템경로번호(3, '001') + */ + + public static final int GUID_LENGTH = 33; // 시스템경로번호 제외부분 + + /** + * 1. 기능 : Private 생성자 2. 처리 개요 : - 3. 주의사항 - Instance 생성하지 못함 + **/ + private GUIDGeneratorKJB() { + } + + public synchronized static String getGUID(String groupCmpCd) { + if (StringUtils.isEmpty(groupCmpCd)) groupCmpCd = "034"; //광주은행 그룹회사코드 "034" + + String nowDateTime = SDF_YYYYMMDDHHMMSS.format(ZonedDateTime.now()); + String strSeq = StringUtils.leftPad(String.valueOf(seq), 6, '0') ; + String guid = groupCmpCd + UNIQUE_NUM + nowDateTime + strSeq + "001"; + + seq++; + if (seq > 999999) { + seq = 1; + } + + return guid; + } + + private static String UNIQUE_NUM; + private static int seq = 1; + static { + String hostname = ""; + try { + hostname = java.net.InetAddress.getLocalHost().getHostName(); + } + catch(Exception e) { + hostname = "________"; + } + + if(hostname.getBytes().length != 8) { + if(hostname.getBytes().length < 8) { + hostname = StringUtils.leftPad(hostname, 8, '_'); + } else if(hostname.getBytes().length > 8) { + hostname = StringUtils.substring(hostname, 0, 8); + } + } + + String serverName = System.getProperty(Keys.SERVER_KEY); + String instid = "00"; + if(serverName != null && serverName.length() > 2) { + instid = serverName.substring(serverName.length()-2, serverName.length()); + } + + UNIQUE_NUM = hostname.toUpperCase() + instid; + } + + public static void main(String[] args) { + String guid = getGUID("051"); + System.out.println("[" + guid.length() + "]" + guid); + } +} \ No newline at end of file diff --git a/src/main/java/com/eactive/eai/custom/message/InterfaceMapperKJB.java b/src/main/java/com/eactive/eai/custom/message/InterfaceMapperKJB.java new file mode 100644 index 0000000..a28ec4f --- /dev/null +++ b/src/main/java/com/eactive/eai/custom/message/InterfaceMapperKJB.java @@ -0,0 +1,202 @@ +package com.eactive.eai.custom.message; + +import org.apache.commons.lang3.StringUtils; + +import com.eactive.eai.common.server.EAIServerManager; +import com.eactive.eai.common.util.StringUtil; +import com.eactive.eai.message.StandardMessage; +import com.eactive.eai.message.service.DefaultInterfaceMapper; +import com.ext.eai.common.stdmessage.STDMessageKeys; + +@SuppressWarnings("serial") +public class InterfaceMapperKJB extends DefaultInterfaceMapper { + private static String SESSION_ID = "INTERFACE_COMMON.MCI_SESN_ID"; + private static String INSTANCE_ID = "INTERFACE_COMMON.MCI_INSTNC_ID"; + + @Override + public String getEaiSvcCode(StandardMessage standardMessage) { + String eaiSvcCode = null; + String interfaceId = getInterfaceId(standardMessage); + String returnType = getSendRecvDivision(standardMessage); // S | R + String inExDivision = getInExDivision(standardMessage); // 1 | 2 + if (interfaceId == null) + interfaceId = ""; + interfaceId = interfaceId.trim(); + + // TODO : site에 맞게 조합해야 함. + eaiSvcCode = interfaceId + returnType + StringUtils.defaultString(inExDivision); + return eaiSvcCode; + } + + @Override + public void setGuid(StandardMessage standardMessage, String guid) { + if (guid == null) + throw new RuntimeException("guid is null"); + if (guid.length() != 36) + throw new RuntimeException("The length of guid is not 36"); + setItemValue(standardMessage, getPath(GUID), guid); + } + + @Override + public String getGuid(StandardMessage standardMessage) { + String guid = getItemValue(standardMessage, getPath(GUID)); + if (guid.length() == 36) { + guid = guid.substring(0, 33); + } + return guid; + } + + @Override + public String getGuidSeq(StandardMessage standardMessage) { + String guidseq = null; + String guid = getItemValue(standardMessage, getPath(GUID)); + if (guid.length() == 36) { + guidseq = guid.substring(33); + } else { + guidseq = "000"; + } + return guidseq; + } + + @Override + public void setGuidSeq(StandardMessage standardMessage, String guidSeq) { + setItemValue(standardMessage, getPath(GUID), getGuid(standardMessage) + guidSeq); + } + + @Override + public String getOrgGuid(StandardMessage standardMessage) { + String orgGuid = getItemValue(standardMessage, getPath(GUID_ORG)); + if (orgGuid.length() == 36) { + orgGuid = orgGuid.substring(0, 33); + } + return orgGuid; + } + + @Override + public void setOrgGuid(StandardMessage standardMessage, String orgGuid) { + if (orgGuid.length() == 36) { + orgGuid = orgGuid.substring(0, 33); + } + setItemValue(standardMessage, getPath(GUID_ORG), orgGuid); + } + + @Override + public String nextGuidSeq(StandardMessage standardMessage) { + String guidSeq = getGuidSeq(standardMessage); + if (guidSeq == null) + return ""; + int seq = 0; + try { + seq = Integer.parseInt(guidSeq) + 1; + } catch (NumberFormatException e) { + seq = 1; + } + guidSeq = StringUtil.stringFormat(Integer.toString(seq), true, '0', 3); + setGuidSeq(standardMessage, guidSeq); + return guidSeq; + } + + /** + * 표준전문의 복원은 COMMON.ORTR_RESTR_YN 의 value는 (Y/N) 엔진에서 복원여부 의 value는 (1/0) + */ + @Override + public String getRecoverYn(StandardMessage standardMessage) { + String data = getItemValue(standardMessage, getPath(RECOVER_YN)); + if ("Y".equals(data)) { + return "1"; + } else { + return "0"; + } + } + + @Override + public void setRecoverYn(StandardMessage standardMessage, String recoverYn) { + if ("1".equals(recoverYn)) { + setItemValue(standardMessage, getPath(RECOVER_YN), "Y"); + } else { + setItemValue(standardMessage, getPath(RECOVER_YN), "N"); + } + } + + @Override + public String getInstCode(StandardMessage standardMessage) { + EAIServerManager server = EAIServerManager.getInstance(); + if (server != null && server.isMCI()) { + return getItemValue(standardMessage, INSTANCE_ID); + } else { + return ""; + } + } + + @Override + public void setInstCode(StandardMessage standardMessage, String instCode) { + EAIServerManager server = EAIServerManager.getInstance(); + if (server != null && server.isMCI()) { + setItemValue(standardMessage, INSTANCE_ID, instCode); + } + } + + @Override + public String getSessionId(StandardMessage standardMessage) { + EAIServerManager server = EAIServerManager.getInstance(); + if (server != null && server.isMCI()) { + return getItemValue(standardMessage, SESSION_ID); + } else { + return ""; + } + } + + @Override + public void setSessionId(StandardMessage standardMessage, String sessionId) { + EAIServerManager server = EAIServerManager.getInstance(); + if (server != null && server.isMCI()) { + setItemValue(standardMessage, SESSION_ID, sessionId); + } + } + + + /* + * 엔진 에서는 public static final String RESPONSE_TYPE_CODE_N = "0";//정상(normal) + * public static final String RESPONSE_TYPE_CODE_E = "1";//오류(error) + */ + @Override + public void setResponseType(StandardMessage standardMessage, String responseType) { + if (responseType != null && (STDMessageKeys.RESPONSE_TYPE_CODE_N.equals(responseType) + || STDMessageKeys.RESPONSE_TYPE_CODE_E.equals(responseType))) { + if (STDMessageKeys.RESPONSE_TYPE_CODE_N.equals(responseType)) { + setItemValue(standardMessage, getPath(RESPONSE_TYPE), "NR"); + } else { + setItemValue(standardMessage, getPath(RESPONSE_TYPE), "ER"); + } + } else { + setItemValue(standardMessage, getPath(RESPONSE_TYPE), responseType); + } + + } + + @Override + public String getInterfaceId(StandardMessage standardMessage) { + String interfaceId = getItemValue(standardMessage, getPath(INTERFACE_ID)); + if (interfaceId == null) + return ""; + interfaceId = interfaceId.trim(); + return interfaceId; + } + + @Override + public String getReqSysCode(StandardMessage standardMessage) { + // apiPath의 값에서 추출할 예정 : serviceId = api_path + String apiPath = getItemValue(standardMessage, getPath(SERVICE_ID)); + if (apiPath != null) { + String[] split = apiPath.split("/"); + if (split.length > 2) { + String route = split[1].toUpperCase(); + if (route.length() > 3) { + route = route.substring(0, 3); + } + return route; + } + } + return null; + } +} \ No newline at end of file From dff0a1bf98738b5d49847bc771c28af7e9209a24 Mon Sep 17 00:00:00 2001 From: 25W0075 <25W0075@P9801Z.kjbank.dom> Date: Mon, 8 Dec 2025 09:48:38 +0900 Subject: [PATCH 34/50] =?UTF-8?q?persistent-store-type=EC=9D=84=20memory?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/weblogic.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebContent/WEB-INF/weblogic.xml b/WebContent/WEB-INF/weblogic.xml index 44b772f..71b418f 100644 --- a/WebContent/WEB-INF/weblogic.xml +++ b/WebContent/WEB-INF/weblogic.xml @@ -6,7 +6,7 @@ 1800 JSESSIONID_EMS - none + memory From 8c614fce97217a783a59cb2dcdc75a64f1633e65 Mon Sep 17 00:00:00 2001 From: daekuk Date: Mon, 8 Dec 2025 12:11:03 +0900 Subject: [PATCH 35/50] =?UTF-8?q?persistent=20type=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/weblogic.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WebContent/WEB-INF/weblogic.xml b/WebContent/WEB-INF/weblogic.xml index 44b772f..71b418f 100644 --- a/WebContent/WEB-INF/weblogic.xml +++ b/WebContent/WEB-INF/weblogic.xml @@ -6,7 +6,7 @@ 1800 JSESSIONID_EMS - none + memory From 67ebc7de2a68bdb0b45eb7f59a808f94c7769b8c Mon Sep 17 00:00:00 2001 From: "Yunsam.Eo" Date: Mon, 8 Dec 2025 13:31:04 +0900 Subject: [PATCH 36/50] =?UTF-8?q?=ED=86=A0=ED=81=B0=EB=B0=9C=EA=B8=89=20ur?= =?UTF-8?q?l=20=EC=88=98=EC=A0=95=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eactive/eai/authserver/custom/KjbMGOAuth2Controller.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/eactive/eai/authserver/custom/KjbMGOAuth2Controller.java b/src/main/java/com/eactive/eai/authserver/custom/KjbMGOAuth2Controller.java index f08be14..5918d96 100644 --- a/src/main/java/com/eactive/eai/authserver/custom/KjbMGOAuth2Controller.java +++ b/src/main/java/com/eactive/eai/authserver/custom/KjbMGOAuth2Controller.java @@ -61,7 +61,7 @@ public class KjbMGOAuth2Controller { @Autowired private TokenIssuanceLogDAO tokenIssuanceLogDAO; - @RequestMapping(value = "/mapi/oauth2/token2", method = RequestMethod.POST, produces = "application/json; charset=\"UTF-8\"") + @RequestMapping(value = "/mapi/oauth2/token", method = RequestMethod.POST, produces = "application/json; charset=\"UTF-8\"") @ResponseBody public KjbMGOAuth2AccessTokenResponse token(@RequestBody KjbMGOAuth2AccessTokenRequest tokenRequest, HttpServletRequest request, HttpServletResponse response) { From 616b2a36f3c4026fe774981de1981c8913d93143 Mon Sep 17 00:00:00 2001 From: yunjy-hp Date: Tue, 9 Dec 2025 13:47:00 +0900 Subject: [PATCH 37/50] =?UTF-8?q?=EA=B4=91=EC=A3=BC=EC=9D=80=ED=96=89=20?= =?UTF-8?q?=ED=91=9C=EC=A4=80=EC=A0=84=EB=AC=B8=20=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http/non-to-standard-api.http | 15 +- http/standard-api.http | 11 +- .../KJB_StandardMessage_R10_20251208.md | 220 +++++++++++++++++ .../eai/custom/message/GUIDGeneratorKJB.java | 35 ++- .../custom/message/InterfaceMapperKJB.java | 2 +- .../StandardMessageCoordinatorKJB.java | 185 ++++++++++++++ src/main/resources/standard-layout-kjb.csv | 233 ++++++++++++++++++ .../standard-message-config.properties | 8 +- ...dard-message-mapping-config-kjb.properties | 52 ++++ 9 files changed, 735 insertions(+), 26 deletions(-) create mode 100644 kjb-docs/std-deploy/KJB_StandardMessage_R10_20251208.md create mode 100644 src/main/java/com/eactive/eai/custom/message/StandardMessageCoordinatorKJB.java create mode 100644 src/main/resources/standard-layout-kjb.csv create mode 100644 src/main/resources/standard-message-mapping-config-kjb.properties diff --git a/http/non-to-standard-api.http b/http/non-to-standard-api.http index a74020b..66e35de 100644 --- a/http/non-to-standard-api.http +++ b/http/non-to-standard-api.http @@ -1,5 +1,15 @@ ### 비표준 -> 표준 테스트 -POST http://localhost:7080/api/test/case012 +POST http://localhost:10210/api/test/case012 +Content-Type: application/json +Accept: application/json + +{ + "field1": "aaaa", + "field2": "bbbb" +} + +### 비표준 -> 비표준 테스트 +POST http://localhost:10210/api/test/case001 Content-Type: application/json Accept: application/json @@ -7,5 +17,4 @@ Accept: application/json "serviceId": "TST10001", "aaa": "aaaa", "bbb": "bbbb" -} - +} \ No newline at end of file diff --git a/http/standard-api.http b/http/standard-api.http index bb7b2b4..f5c0661 100644 --- a/http/standard-api.http +++ b/http/standard-api.http @@ -1,10 +1,5 @@ ### 기본 테스트 -POST http://localhost:7080/api/test/case001 -Content-Type: application/json -Accept: application/json +POST http://localhost:10210/HTT/TstInHttSysStd +Content-Type: text/plain; charset=ms949 -{ - "serviceId": "TST10001", - "aaa": "aaaa", - "bbb": "bbbb" -} \ No newline at end of file +000010163034ITRT97774O20251203100415P00421003SR1010.15.11.86 ITREAI0201M2192614300070MCI 034LAC01613021 TESTCASE001 A1OBPOOY034ITRT97774O20251203100415P0042100103403330003330333TITR01T97774LAC016130SC002307110953LAC016130SC00.scn KORN00 0000000000NN 20251203N202660016 N N NN NN 00000000000000000000000000000000000000000000000000000000000004N2025120310041542202512031004155520251203100415415N 003 IO00000015{"key":"value"}@@ \ No newline at end of file diff --git a/kjb-docs/std-deploy/KJB_StandardMessage_R10_20251208.md b/kjb-docs/std-deploy/KJB_StandardMessage_R10_20251208.md new file mode 100644 index 0000000..44e73d9 --- /dev/null +++ b/kjb-docs/std-deploy/KJB_StandardMessage_R10_20251208.md @@ -0,0 +1,220 @@ +Header 헤더부 1 3 1 1 0 1 +Sys_Info 시스템식별 2 3 1 1 0 1 +STND_MESG_LEN 표준전문길이 3 2 1 1 8 12 +ENCD_CMPI_DVCD 암호화압축구분코드 3 2 1 1 1 1 0 +GUID GUID 3 2 1 1 36 1 +MESG_DMAN_DVCD 전문요청구분코드 3 2 1 1 1 1 S +MESG_VER_NO 전문버전번호 3 2 1 1 3 1 R10 +Src_System 전송시스템 2 3 1 1 0 1 +FRST_TRNM_IPAD 최초전송IP주소 3 2 1 1 39 1 +FRST_TRNM_SYS_CD 최초전송시스템코드 3 2 1 1 3 1 API +TRNM_SYS_CD 전송시스템코드 3 2 1 1 3 1 +TRNM_NODE_NO 전송노드번호 3 2 1 1 4 1 +MCI_SESN_ID MCI세션ID 3 2 1 1 8 1 +GNRZ_TMOT_TKTM 총괄타임아웃시간 3 2 1 1 3 1 070 +TX_TMOT_TKTM 거래타임아웃시간 3 2 1 1 3 1 060 +KJB_Add KJB추가 2 3 1 1 0 1 +OTSD_DMAN_SYS_CD 대외요청시스템코드 3 2 1 1 3 1 OBP +EAI_NODE_NO EAI노드번호 3 2 1 1 2 1 +FEP_NODE_NO FEP노드번호 3 2 1 1 2 1 +FEP_SESN_ID FEP세션ID 3 2 1 1 6 1 +Spare_Zone 예비영역 2 3 1 1 0 1 +HEDR_SPR_CTNT 헤더예비영역 3 2 1 1 25 1 +Common 공통부 1 3 1 1 0 1 +Service_info 거래서비스정보 2 3 1 1 0 1 +GROUP_CMP_CD 그룹회사코드 3 2 1 1 3 1 034 +SRVC_ID 서비스ID 3 2 1 1 11 1 +PROCS_RSLT_RCMS_SRVC_ID 처리결과수신서비스ID 3 2 1 1 11 1 +IF_ID 인터페이스ID 3 2 1 1 20 1 +TX_SYNZ_DVCD 거래동기화구분코드 3 2 1 1 1 1 +HMAB_DVCD 내외구분코드 3 2 1 1 1 1 2 +OTSD_CHNL_INST_CD 대외채널기관코드 3 2 1 1 3 1 +SYS_OPRT_ENV_DVCD 시스템운영환경구분코드 3 2 1 1 1 1 +TX_TYP_DVCD 거래유형구분코드 3 2 1 1 1 1 O +ORTR_RESTR_YN 원거래복원여부 3 2 1 1 1 1 +ORTR_GUID 원거래GUID 3 2 1 1 36 1 +Channel_Info 채널정보 2 3 1 1 0 1 +BANK_CD 은행코드 3 2 1 1 3 1 +TX_BRCD 거래부점코드 3 2 1 1 4 1 +DSPC_RCV_BRN_DVCD 파출수납부점구분코드 3 2 1 1 2 1 +RLTR_BRCD 실거래부점코드 3 2 1 1 4 1 +TRMN_INSL_BRCD 단말설치부점코드 3 2 1 1 4 1 +CHNL_TYCD 채널유형코드 3 2 1 1 1 1 +CHNL_DTLS_CLCD 채널세부분류코드 3 2 1 1 3 1 +TMNL_KIND_DVCD 단말기종류구분코드 3 2 1 1 2 1 +TRMN_NO 단말번호 3 2 1 1 6 1 +SCN_NO 화면번호 3 2 1 1 13 1 +SCN_FILE_VER 화면파일버전 3 2 1 1 10 2 +SCN_FILE_NM 화면파일명 3 2 1 1 30 1 +LANG_DVCD 언어구분코드 3 2 1 1 3 1 KOR +CHNL_COM_SCTN_EXIS_YN 채널공통부문존재여부 3 2 1 1 1 1 N +Confirm_Info 승인정보 2 3 1 1 0 1 +PRCG_APRV_PROCS_STCD 책임자승인처리상태코드 3 2 1 1 1 1 +PRCG_APRV_TYCD 책임자승인유형코드 3 2 1 1 1 1 +APRV_PRCG_EMPNO 승인책임자직원번호 3 2 1 1 7 1 +NURN_RSBT_EMPNO 차상위책임직원번호 3 2 1 1 7 1 +PRCG_APRV_SEQNO 책임자승인일련번호 3 2 1 1 10 2 +NURN_AGNCY_APRV_YN 차상위대행승인여부 3 2 1 1 1 1 +DSGT_PRCG_CHNG_YN 지정책임자변경여부 3 2 1 1 1 1 +CHNG_DSGT_PRCG_EMPNO 변경지정책임자직원번호 3 2 1 1 7 1 +PRCG_APRV_DMAN_RSN 책임자승인요청사유 3 2 1 1 40 1 +PRCG_APRV_RSN 책임자승인사유 3 2 1 1 40 1 +BizProc_Info 업무처리정보 2 3 1 1 0 1 +BZOP_DT 영업일자 3 2 1 1 8 1 +ANTT_YN 계정처리여부 3 2 1 1 1 1 +MESG_IQRY_DVCD 전문조회구분코드 3 2 1 1 1 1 +ATMC_CLSN_DVCD 자동화기기마감구분코드 3 2 1 1 1 1 +TLRNO 텔러번호 3 2 1 1 7 1 +ASST_TLRNO 보조텔러번호 3 2 1 1 7 1 +PSWD_VALDTN_YN 비밀번호검증여부 3 2 1 1 1 1 +TX_TELR_PSWD 거래텔러비밀번호 3 2 1 1 44 1 +CSIF_IDNT_DVCD 고객정보식별구분코드 3 2 1 1 3 1 +CSIF_ID 고객정보ID 3 2 1 1 30 1 +CSIF_CUST_NM 고객정보고객명 3 2 1 1 30 1 +CSIF_MASK_REVOC_YN 고객정보마스크해제여부 3 2 1 1 1 1 +CUST_PTLET_MASK_YN 고객포틀릿마스크여부 3 2 1 1 1 1 +IDC_IMG_NO 신분증이미지번호 3 2 1 1 32 1 +SMTWKP_TX_YN 스마트워크플레이스거래여부 3 2 1 1 1 1 +SECU_ACCO_REG_YN 보안계좌등록여부 3 2 1 1 1 1 +ABC_TX_DTLS_DVCD ABC거래세부구분코드 3 2 1 1 2 1 +CLNT_TELR_CSHN_RFLC_YN 클라이언트텔러시재반영여부 3 2 1 1 1 1 +SLIP_DIV_YN 전표구분여부 3 2 1 1 1 1 +SLIP_NO 전표번호 3 2 1 1 9 1 +TELR_SLIP_SEQNO 텔러전표일련번호 3 2 1 1 10 2 +TELR_CASH_AMT 텔러현금금액 3 2 1 1 17 2 +TELR_CBPC_AMT 텔러타점권금액 3 2 1 1 17 2 +TELR_TRFAMT 텔러대체금액 3 2 1 1 17 2 +LOGIN_DVCD 로그인구분코드 3 2 1 1 1 1 +TX_DT_EXTNS_YN  거래일자연장여부 3 2 1 1 1 1 N +TX_DT 거래일자 3 2 1 1 8 1 +TX_TIME 거래시각 3 2 1 1 8 1 +SYS_DT 시스템일자 3 2 1 1 8 1 +SYS_TIME 시스템시각 3 2 1 1 8 1 +MESG_DMAN_DT 전문요청일자 3 2 1 1 8 1 +MESG_DMAN_TKTM 전문요청시간 3 2 1 1 9 1 +MESG_CNTY_YN 전문연속여부 3 2 1 1 1 1 +MESG_RSPN_DT 전문응답일자 3 2 1 1 8 1 +MESG_RSPN_TKTM 전문응답시간 3 2 1 1 9 1 +PROCS_RSLT_DVCD 처리결과구분코드 3 2 1 1 2 1 +OUTPUT_MESG_TYCD 출력전문유형코드 3 2 1 1 1 1 +LRQN_OUTPUT_DSCT_TRGT_YN 대량출력중단대상여부 3 2 1 1 1 1 +MESG_CNTY_SEQNO 전문연속일련번호 3 2 1 1 3 1 +Error_Info 에러정보 2 3 1 1 0 1 +ERR_CD 오류코드 3 2 1 1 6 1 +ERR_SYS_CD 오류시스템코드 3 2 1 1 3 1 +KJB_Add KJB추가 2 3 1 1 0 1 +ORTR_SCN_ID 원거래화면ID 3 2 1 1 13 1 +CORP_DPRM_NO 기업부서번호 3 2 1 1 5 1 +CSIF_IQRY_RSCD 고객정보조회사유코드 3 2 1 1 2 1 +Com_Spare_Zone 예비영역 2 3 1 1 0 1 +COM_SPR_CTNT 공통예비내용 3 2 1 1 212 1 +Channel_Common 채널공통부 1 3 0 1 0 1 Common.Channel_Info.CHNL_COM_SCTN_EXIS_YN Y +Data_Header 데이터헤더 2 3 0 1 0 1 +DATA_HEDR_KNCD 데이터헤더종류코드 3 2 1 1 2 1 +DATA_HEDR_LEN 데이터헤더길이 3 2 1 1 8 1 +Data_For_Each 개별데이터부 2 3 0 1 0 1 +PSWD_ERR_DVCD 비밀번호오류구분코드 3 2 1 1 2 1 +ELFN_CUST_TYCD 전자금융고객유형코드 3 2 1 1 2 1 +USER_ID_S14 사용자ID_S14 3 2 1 1 14 1 +MST_ID_S14 마스터ID_S14 3 2 1 1 14 1 +SVR_TX_NO 서버거래번호 3 2 1 1 10 1 +HOST_TX_NO_S10 호스트거래번호_S10 3 2 1 1 10 1 +NEXT_PAGE_EXIS_YN1 다음페이지존재여부1 3 2 1 1 1 1 +SCCR_ISS_CD 보안카드발급코드 3 2 1 1 2 1 +SQ1_SCCR_SSBP_NO_SER 1차보안카드첨자번호순서 3 2 1 1 2 1 +SQ2_SCCR_SSBP_NO_SER 2차보안카드첨자번호순서 3 2 1 1 2 1 +SECU_MEDIA_SEQNO_S4 보안매체일련번호_S4 3 2 1 1 4 1 +SECU_MEDIA_DTL_DVCD_N3 보안매체상세구분코드_N3 3 2 1 1 3 1 +PAGE_NO 페이지번호 3 2 1 1 5 1 +PAGE_SIZE 페이지사이즈 3 2 1 1 5 1 +TTCN_N5 총건수_N5 3 2 1 1 5 1 +IQRY_CCNT_N5 조회건수_N5 3 2 1 1 5 1 +PRIQR_TX_NO 선조회거래번호 3 2 1 1 10 1 +SQ1_CUST_CNFR_INFO_CTNT_S39 1차고객확인정보내용_S39 3 2 1 1 39 1 +SQ2_CUST_CNFR_INFO_CTNT_S39 2차고객확인정보내용_S39 3 2 1 1 39 1 +MAC_S17 MAC주소_S17 3 2 1 1 17 1 +HDD_SEQ_NO_S24 HDD일련번호_S24 3 2 1 1 24 1 +CMCM_CD 통신사코드 3 2 1 1 1 1 +TLNO_S14 전화번호_S14 3 2 1 1 14 1 +OTP_EXPR_GDNC_DVCD_S1 OTP만기안내구분코드_S1 3 2 1 1 1 1 +KFTC_ENCD_MST_KEY_VER_S2 금융결제원암호화마스터키버전_S2 3 2 1 1 2 1 +KFTC_ENCD_RAND1_S32 금융결제원암호화난수1_S32 3 2 1 1 32 1 +KFTC_ENCD_RAND2_S32 금융결제원암호화난수2_S32 3 2 1 1 32 1 +ADDT_ATHN_YN_S1 추가인증여부_S1 3 2 1 1 1 1 +ADDT_ATHN_METH_DVCD_S2 추가인증수단구분코드_S2 3 2 1 1 2 1 +ADDT_ATHN_ATHN_VAL_S40 추가인증인증값_S40 3 2 1 1 40 1 +DUP_TX_YN_S1 중복거래여부_S1 3 2 1 1 1 1 +ABR_IP_BLC_YN_S1 해외IP차단여부_S1 3 2 1 1 1 1 +VIRT_ACCO_DVCD_S1 가상계좌조회구분_S1 3 2 1 1 1 1 +BZWK_DVCD1_S1 업무구분코드1_S1 3 2 1 1 1 1 +BZWK_DVCD2_S1 업무구분코드2_S1 3 2 1 1 1 1 +BZWK_DVCD3_S1 업무구분코드3_S1 3 2 1 1 1 1 +BZWK_DVCD4_S1 업무구분코드4_S1 3 2 1 1 1 1 +BZWK_DVCD5_S1 업무구분코드5_S1 3 2 1 1 1 1 +TX_SER_SEQNO_N3 거래순서일련번호_N3 3 2 1 1 3 1 +SECU_MEDIA_SEQNO_DMAN_VAL_S4 보안매체일련번호요청값_S4 3 2 1 1 4 1 +MEDIA_D1_UZ_POSB_AMT_N12 매체1일사용가능금액_N12 3 2 1 1 12 1 +CPHR_KEY_SECU_CO_CD_S1 암호키보안업체코드_S1 3 2 1 1 1 1 +HDD_VOLU_ID_S35 HDDVOLUMEID_S35 3 2 1 1 35 1 +SPR_FILD_S197 예비필드_S197 3 2 1 1 197 1 +Message 메시지부 1 3 0 1 0 1 Header.Sys_Info.MESG_DMAN_DVCD R +Msg_Header 메시지헤더 2 3 0 1 0 1 +MSG_HEDR_KNCD 메시지헤더종류코드 3 2 1 1 2 1 NM +MSG_HEDR_LEN 메시지헤더길이 3 2 1 1 8 2 +Msg_Body 메시지 2 3 0 1 0 1 +OUTPUT_ATRB_CD 출력속성코드 3 2 1 1 1 1 0 +OUTPUT_MSG_CD 출력메시지코드 3 2 1 1 10 1 +OUTPUT_MSG_CTNT 출력메시지내용 3 2 1 1 200 1 +OUTPUT_MSG_DESC 출력메시지설명 3 2 1 1 300 1 +ERR_MNGM_CTNT 오류조치내용 3 2 1 1 200 1 +ERR_CHGR_NM 오류담당자명 3 2 1 1 10 1 +ERR_CHGR_CNPL_NO 오류담당연락처번호 3 2 1 1 20 1 +OUTPUT_MSG_NCNT 출력메시지개수 3 2 1 1 4 2 0000 +Output_Msg_Grid 출력메시지 3 4 0 1 0 1 Message.Msg_Body.OUTPUT_MSG_NCNT +OUTPUT_MSG_CD 출력메시지코드 4 2 0 1 10 1 +OUTPUT_MSG_CTNT 출력메시지내용 4 2 0 1 200 1 +OUTPUT_MSG_DESC 출력메시지설명 4 2 0 1 300 1 +ERR_MNGM_CTNT 오류조치내용 4 2 0 1 200 1 +ERR_LOCT_CTNT 오류위치내용 4 2 0 1 200 1 +ERR_OCCU_ITEM_NM 오류발생항목명 4 2 0 1 20 1 +Manager_Confirm 책임자승인부 1 3 0 1 0 1 Manager_Confirm.Data_Header.DATA_HEDR_KNCD AD +Data_Header 데이터헤더 2 3 0 1 0 1 +DATA_HEDR_KNCD 데이터헤더종류코드 3 2 1 1 2 1 +DATA_HEDR_LEN 데이터헤더길이 3 2 1 1 8 2 +Data_Header_Etc 데이터헤더부가정보 2 3 0 1 0 1 +OUTPUT_SRVC_ID 출력서비스ID 3 2 1 1 13 1 +OUTPUT_SCN_ID 출력화면ID 3 2 1 1 13 1 +OUTPUT_SCN_DRVTN_MSG_CTNT 출력화면유도메시지내용 3 2 1 1 50 1 +DCG_DVCD 배출구분코드 3 2 1 1 1 1 +Data_For_Each 개별데이터부 2 3 0 1 0 1 +ACNO 계좌번호 3 2 1 1 16 1 +TRMN_CUST_FLNM 단말고객성명 3 2 1 1 20 1 +TX_AMT 거래금액 3 2 1 1 17 2 +APRV_RSCD_CCNT 승인사유코드건수 3 2 1 1 5 2 +APRV_RSCD 승인사유코드 3 2 1 1 5 1 +PRCG_APRV_DESC 책임자승인설명 3 2 1 1 50 1 +PRCG_APRV_TYCD 책임자승인유형코드 3 2 1 1 1 1 +PRCG_APRV_LIST_CCNT 책임자승인목록건수 3 2 1 1 5 2 +TX_DVCD 거래구분코드 3 2 1 1 2 1 +PRCG_EMPNO 책임자직원번호 3 2 1 1 6 1 +KOR_FLNM 한글성명 3 2 1 1 40 1 +BLNG_BRCD 소속부점코드 3 2 1 1 4 1 +BRN_KOR_NM  부점한글명 3 2 1 1 100 1 +LOGIN_IPAD 로그인IP주소 3 2 1 1 30 1 +JOBCLS_CD 직급코드 3 2 1 1 2 1 +LOGIN_STCD 로그인상태코드 3 2 1 1 2 1 +ABSC_YN 부재여부 3 2 1 1 1 1 +AGNCY_APRV_TLRNO 대행승인텔러번호 3 2 1 1 7 1 +BRMNR_YN 지점장여부 3 2 1 1 1 1 +AUDT_UNCN_PRCG_YN 감사통할책임자여부 3 2 1 1 1 1 +Data_Part 데이터부 1 3 1 1 0 1 +Data_Header 데이터헤더 2 3 1 1 0 1 +DATA_HEDR_KNCD 데이터헤더종류코드 3 2 1 1 2 1 IO +DATA_HEDR_LEN 데이터헤더길이 3 2 1 1 8 2 +Data_Header_Etc 데이터헤더부가정보 2 3 0 1 0 1 Data_Part.Data_Header.DATA_HEDR_KNCD OD +OUTPUT_SRVC_ID 출력서비스ID 3 2 1 1 13 1 +OUTPUT_SCN_ID 출력화면ID 3 2 1 1 13 1 +OUTPUT_SCN_DRVTN_MSG_CTNT 출력화면유도메시지내용 3 2 1 1 50 1 +DCG_DVCD 배출구분코드 3 2 1 1 1 1 +BizData 업무데이터 2 9 1 1 0 1 +END_BIT_CTNT 종료비트내용 1 2 1 1 2 11 @@ \ No newline at end of file diff --git a/src/main/java/com/eactive/eai/custom/message/GUIDGeneratorKJB.java b/src/main/java/com/eactive/eai/custom/message/GUIDGeneratorKJB.java index 71f0dc2..8354879 100644 --- a/src/main/java/com/eactive/eai/custom/message/GUIDGeneratorKJB.java +++ b/src/main/java/com/eactive/eai/custom/message/GUIDGeneratorKJB.java @@ -3,6 +3,7 @@ package com.eactive.eai.custom.message; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; +import com.eactive.eai.common.util.DatetimeUtil; import org.apache.commons.lang3.StringUtils; import com.eactive.eai.common.server.Keys; @@ -19,8 +20,6 @@ import com.eactive.eai.common.util.UUID; */ public final class GUIDGeneratorKJB { - private static final DateTimeFormatter SDF_YYYYMMDDHHMMSS = DateTimeFormatter.ofPattern("yyyyMMddHHmmss"); - /* * 그룹사코드(3) + 호스트명(8) + 서버구분번호(2) + 일자(8) + 전문생성시간(6) + 일련번호(6) + 시스템경로번호(3, '001') */ @@ -34,18 +33,34 @@ public final class GUIDGeneratorKJB { } public synchronized static String getGUID(String groupCmpCd) { - if (StringUtils.isEmpty(groupCmpCd)) groupCmpCd = "034"; //광주은행 그룹회사코드 "034" - - String nowDateTime = SDF_YYYYMMDDHHMMSS.format(ZonedDateTime.now()); - String strSeq = StringUtils.leftPad(String.valueOf(seq), 6, '0') ; - String guid = groupCmpCd + UNIQUE_NUM + nowDateTime + strSeq + "001"; + String guid = groupCmpCd + UNIQUE_NUM; + guid = guid + DatetimeUtil.getCurrentDateTime(); - seq++; - if (seq > 999999) { + if(seq < 10) { + guid = guid + "00000" + seq; + } + else if(seq < 100) { + guid = guid + "0000" + seq; + } + else if(seq < 1000) { + guid = guid + "000" + seq; + } + else if(seq < 10000) { + guid = guid + "00" + seq; + } + else if(seq < 100000) { + guid = guid + "0" + seq; + } + else { + guid = guid + seq; + } + + seq ++; + if(seq > 999999) { seq = 1; } - return guid; + return guid + "001"; } private static String UNIQUE_NUM; diff --git a/src/main/java/com/eactive/eai/custom/message/InterfaceMapperKJB.java b/src/main/java/com/eactive/eai/custom/message/InterfaceMapperKJB.java index a28ec4f..cf252b2 100644 --- a/src/main/java/com/eactive/eai/custom/message/InterfaceMapperKJB.java +++ b/src/main/java/com/eactive/eai/custom/message/InterfaceMapperKJB.java @@ -65,7 +65,7 @@ public class InterfaceMapperKJB extends DefaultInterfaceMapper { @Override public String getOrgGuid(StandardMessage standardMessage) { - String orgGuid = getItemValue(standardMessage, getPath(GUID_ORG)); + String orgGuid = getItemValue(standardMessage, getPath(GUID)); if (orgGuid.length() == 36) { orgGuid = orgGuid.substring(0, 33); } diff --git a/src/main/java/com/eactive/eai/custom/message/StandardMessageCoordinatorKJB.java b/src/main/java/com/eactive/eai/custom/message/StandardMessageCoordinatorKJB.java new file mode 100644 index 0000000..cfe435e --- /dev/null +++ b/src/main/java/com/eactive/eai/custom/message/StandardMessageCoordinatorKJB.java @@ -0,0 +1,185 @@ +package com.eactive.eai.custom.message; + +import com.eactive.eai.adapter.AdapterGroupVO; +import com.eactive.eai.adapter.AdapterManager; +import com.eactive.eai.common.dao.Keys; +import com.eactive.eai.common.server.EAIServerManager; +import com.eactive.eai.common.util.DatetimeUtil; +import com.eactive.eai.common.util.Logger; +import com.eactive.eai.common.util.MessageUtil; +import com.eactive.eai.common.util.StringUtil; +import com.eactive.eai.inbound.processor.ProcessVO; +import com.eactive.eai.inbound.processor.Processor; +import com.eactive.eai.message.StandardItem; +import com.eactive.eai.message.StandardMessage; +import com.eactive.eai.message.manager.StandardMessageManager; +import com.eactive.eai.message.service.DefaultStandardMessageCoordinator; +import com.eactive.eai.message.service.InterfaceMapper; +import com.ext.eai.common.stdmessage.STDMessageKeys; +import org.apache.commons.lang.StringUtils; + +import java.net.UnknownHostException; +import java.util.Properties; + +public class StandardMessageCoordinatorKJB extends DefaultStandardMessageCoordinator { + private static Logger logger = Logger.getLogger(Logger.LOGGER_DEFAULT); + + public static final String DEFAULT_LENGTH = "00000745"; + private static final String MESSAGE_PART = "Message"; + private static final String MESSAGE_PART_HEADER_PART = "Message.Msg_Header"; + private static final String MESSAGE_PART_MSG_HEDR_KNCD = "Message.Msg_Header.MSG_HEDR_KNCD"; + private static final String MESSAGE_PART_MSG_HEDR_LEN = "Message.Msg_Header.MSG_HEDR_LEN"; + private static final String MESSAGE_PART_BODY_PART = "Message.Msg_Body"; + private static final String MESSAGE_PART_OUTPUT_MSG_CD = "Message.Msg_Body.OUTPUT_MSG_CD"; + private static final String MESSAGE_PART_OUTPUT_MSG_CTNT = "Message.Msg_Body.OUTPUT_MSG_CTNT"; + private static final String COMMON_PART_GROUP_CMD_CD = "Common.Service_info.GROUP_CMP_CD"; + private static final String COMMON_PART_OTSD_CHNL_INST_CD = "Common.Service_info.OTSD_CHNL_INST_CD"; + private static final String DATA_HEADER_DATA_HEDR_LEN = "Data_Part.Data_Header.DATA_HEDR_LEN"; + + @Override + public void coordinateAfterParsing(StandardMessage standardMessage, Object paramObject, Properties prop) { + } + + @Override + public void coordinateBeforeStandardMessageSend(StandardMessage standardMessage, String msgType, String charset) { + makeupDataHeaderLength(standardMessage, charset); + } + + @Override + public void coordinateBeforeResponse(StandardMessage standardMessage, ProcessVO processVO, Properties prop, String charset) { + makeupDataHeaderLength(standardMessage, charset); + } + + @Override + public void coordinateAfterCreateMessageByRule(StandardMessage standardMessage, Object paramObject, Properties prop) { + // guid 설정 + StandardMessageManager standardManager = StandardMessageManager.getInstance(); + InterfaceMapper mapper = standardManager.getMapper(); + + //GUID 설정 + String groupCmdCd = standardMessage.findItemValue(COMMON_PART_GROUP_CMD_CD); + + String guid = GUIDGeneratorKJB.getGUID(groupCmdCd); + + mapper.setGuid(standardMessage, guid); + + StandardItem dataHeaderEtc = standardMessage.findItem("Data_Part.Data_Header_Etc"); + dataHeaderEtc.setHidden(true); + + //기관코드, 텔러번호 설정 + //Adapter에 셋팅된 기관코드를 셋팅한다. + String adapterGroupName = prop.getProperty(Processor.ADAPTER_GROUP_NAME); + AdapterManager adapterManager = AdapterManager.getInstance(); + AdapterGroupVO adptGrpVO = adapterManager.getAdapterGroupVO(adapterGroupName); + + // Adapter의 기관코드를 얻어온다. + //TODO: 기관코드의 경우 현재 EAPIM 시스템에 컬럼은 있으나 설정을 사용하지 않고있으므로 불필요 할 경우 사용하지 않는다, 필요 할 경우 추가한다. + String inAdapterOsidInstiNo = adptGrpVO.getOsidInstiNo(); + if(inAdapterOsidInstiNo != null && inAdapterOsidInstiNo.trim().length() > 0) { + standardMessage.setData(COMMON_PART_OTSD_CHNL_INST_CD, inAdapterOsidInstiNo); + if (logger.isDebug()) { + logger.debug("FIELD SET " + COMMON_PART_OTSD_CHNL_INST_CD + " << "+inAdapterOsidInstiNo); + } + } + + //2012-12-17 나영채 차장 타발요청에만 셋팅해달라고 요청 + //전문요청일자 + standardMessage.setData("Common.BizProc_Info.MESG_DMAN_DT", DatetimeUtil.getCurrentDate()); + //전문요청시간 + standardMessage.setData("Common.BizProc_Info.MESG_DMAN_TKTM", DatetimeUtil.getTime8()); + + + //2012-07-24 임의 로 영업일자에 system시간 설정 + standardMessage.setData("Common.BizProc_Info.BZOP_DT", DatetimeUtil.getCurrentDate()); + + EAIServerManager eaiServerManager = EAIServerManager.getInstance(); + //비표준일경우 시스템 운영환경 구분코드를 셋팅한다. + standardMessage.setData("Common.Service_info.SYS_OPRT_ENV_DVCD", getSysOprtEnvDvcd(eaiServerManager)); + + //헤더부 최초전송IP주소 FRST_TRNM_IPAD + try { + standardMessage.setData("Header.Src_System.FRST_TRNM_IPAD", java.net.InetAddress.getLocalHost().getHostAddress()); + } catch (UnknownHostException e) { + } + } + + @Override + public boolean coordinateSetStandardMessageError(StandardMessage standardMessage, InterfaceMapper mapper, + String errCode, String errMsg) { + + mapper.setResponseType(standardMessage, STDMessageKeys.RESPONSE_TYPE_CODE_E); + mapper.setSendRecvDivision(standardMessage, STDMessageKeys.SEND_RECV_CD_RECV); + + StandardItem messagePart = standardMessage.findItem(MESSAGE_PART); + messagePart.setHidden(false); + messagePart.setSize(1); + + StandardItem messageHeaderPart = standardMessage.findItem(MESSAGE_PART_HEADER_PART); + messageHeaderPart.setSize(1); + StandardItem messageBodyPart = standardMessage.findItem(MESSAGE_PART_BODY_PART); + messageBodyPart.setSize(1); + + errCode = StringUtils.defaultString(errCode); + String siteErrCode = MessageUtil.getTobeCode(errCode); + String siteErrMessage; + switch(errCode) { + case("RECEAIIRP070"): + siteErrMessage = "거래 통제 되었습니다."; + break; + default: + siteErrMessage = MessageUtil.getTobeMessage(errCode); + break; + } + + mapper.setErrorCode(standardMessage, siteErrCode); + + standardMessage.setData(MESSAGE_PART_MSG_HEDR_KNCD, "EM"); + standardMessage.setData(MESSAGE_PART_MSG_HEDR_LEN, DEFAULT_LENGTH); + standardMessage.setData(MESSAGE_PART_OUTPUT_MSG_CD, siteErrCode); + //Message.Msg_Body.OUTPUT_MSG_CTNT + mapper.setErrorMsg(standardMessage, siteErrMessage); + + return false; + } + + + @Override + public void coordinateAfterRecvNonStdSyncResponse(StandardMessage responseMessage) { + StandardItem messagePart = responseMessage.findItem(MESSAGE_PART); + messagePart.setHidden(false); + messagePart.setSize(1); + + StandardItem messageHeaderPart = responseMessage.findItem(MESSAGE_PART_HEADER_PART); + messageHeaderPart.setSize(1); + StandardItem messageBodyPart = responseMessage.findItem(MESSAGE_PART_BODY_PART); + messageBodyPart.setSize(1); + + responseMessage.setData(MESSAGE_PART_MSG_HEDR_KNCD, "NM"); + responseMessage.setData(MESSAGE_PART_MSG_HEDR_LEN, DEFAULT_LENGTH); + responseMessage.setData(MESSAGE_PART_OUTPUT_MSG_CD, "100000 "); + responseMessage.setData(MESSAGE_PART_OUTPUT_MSG_CTNT, "정상처리 되었습니다."); + } + + public String getSysOprtEnvDvcd(EAIServerManager eaiServerManager) { + String result = ""; + if (eaiServerManager.isPEAIServer()){ //운영 + result = STDMessageKeys.SYS_OPRT_ENV_DVCD_ONLINE; + }else if (eaiServerManager.isDEAIServer()){ //개발 + result = STDMessageKeys.SYS_OPRT_ENV_DVCD_DEV; + }else if (eaiServerManager.isSEAIServer()){ //테스트/검증 + result = STDMessageKeys.SYS_OPRT_ENV_DVCD_TESTSTAGE; + } + return result; + } + + private static void makeupDataHeaderLength(StandardMessage standardMessage, String charset) { + String dataBytesLengthStr = null; + try { + dataBytesLengthStr = String.valueOf(standardMessage.getBizDataBytes(charset).length); + String dataHeaderLength = StringUtils.leftPad(dataBytesLengthStr, 8, '0'); + standardMessage.setData(DATA_HEADER_DATA_HEDR_LEN, dataHeaderLength); + } catch (Exception e) { + throw new RuntimeException(e); + } + } +} diff --git a/src/main/resources/standard-layout-kjb.csv b/src/main/resources/standard-layout-kjb.csv new file mode 100644 index 0000000..acef1d5 --- /dev/null +++ b/src/main/resources/standard-layout-kjb.csv @@ -0,0 +1,233 @@ +#----------------------------------------------------------------------------- +# comment start with # +# level; // 0 : root ~ n +# type; // 0: Message, 1: Field, 2:Group 3, Grid, 4 : Field Array, 9 : BIZ DATA +# size // 0 : variable, > 0 fixed +# fieldType; // 0: ELEMENT, 1: ATTRIBUTE, +# length; +# dataType; // 0: String, 1: Number,10: ZZ String, 11: LL Number +#----------------------------------------------------------------------------- +# name ,level ,type ,size ,fieldType ,length ,dataType ,,refPath, refValue,value +#----------------------------------------------------------------------------- +# name ,level ,type ,size ,fieldType ,length ,dataType ,refPath, refValue, value +Header,1,3,1,1,0,1,,, +Sys_Info,2,3,1,1,0,1,,, +STND_MESG_LEN,3,2,1,1,8,12,,, +ENCD_CMPI_DVCD,3,2,1,1,1,1,,,0 +GUID,3,2,1,1,36,1,,, +MESG_DMAN_DVCD,3,2,1,1,1,1,,,S +MESG_VER_NO,3,2,1,1,3,1,,,R10 +Src_System,2,3,1,1,0,1,,, +FRST_TRNM_IPAD,3,2,1,1,39,1,,, +FRST_TRNM_SYS_CD,3,2,1,1,3,1,,,API +TRNM_SYS_CD,3,2,1,1,3,1,,, +TRNM_NODE_NO,3,2,1,1,4,1,,, +MCI_SESN_ID,3,2,1,1,8,1,,, +GNRZ_TMOT_TKTM,3,2,1,1,3,1,,,070 +TX_TMOT_TKTM,3,2,1,1,3,1,,,060 +KJB_Add,2,3,1,1,0,1,,, +OTSD_DMAN_SYS_CD,3,2,1,1,3,1,,,OBP +EAI_NODE_NO,3,2,1,1,2,1,,, +FEP_NODE_NO,3,2,1,1,2,1,,, +FEP_SESN_ID,3,2,1,1,6,1,,, +Spare_Zone,2,3,1,1,0,1,,, +HEDR_SPR_CTNT,3,2,1,1,25,1,,, +Common,1,3,1,1,0,1,,, +Service_info,2,3,1,1,0,1,,, +GROUP_CMP_CD,3,2,1,1,3,1,,,034 +SRVC_ID,3,2,1,1,11,1,,, +PROCS_RSLT_RCMS_SRVC_ID,3,2,1,1,11,1,,, +IF_ID,3,2,1,1,20,1,,, +TX_SYNZ_DVCD,3,2,1,1,1,1,,, +HMAB_DVCD,3,2,1,1,1,1,,,2 +OTSD_CHNL_INST_CD,3,2,1,1,3,1,,, +SYS_OPRT_ENV_DVCD,3,2,1,1,1,1,,, +TX_TYP_DVCD,3,2,1,1,1,1,,,O +ORTR_RESTR_YN,3,2,1,1,1,1,,, +ORTR_GUID,3,2,1,1,36,1,,, +Channel_Info,2,3,1,1,0,1,,, +BANK_CD,3,2,1,1,3,1,,, +TX_BRCD,3,2,1,1,4,1,,, +DSPC_RCV_BRN_DVCD,3,2,1,1,2,1,,, +RLTR_BRCD,3,2,1,1,4,1,,, +TRMN_INSL_BRCD,3,2,1,1,4,1,,, +CHNL_TYCD,3,2,1,1,1,1,,, +CHNL_DTLS_CLCD,3,2,1,1,3,1,,, +TMNL_KIND_DVCD,3,2,1,1,2,1,,, +TRMN_NO,3,2,1,1,6,1,,, +SCN_NO,3,2,1,1,13,1,,, +SCN_FILE_VER,3,2,1,1,10,2,,, +SCN_FILE_NM,3,2,1,1,30,1,,, +LANG_DVCD,3,2,1,1,3,1,,,KOR +CHNL_COM_SCTN_EXIS_YN,3,2,1,1,1,1,,,N +Confirm_Info,2,3,1,1,0,1,,, +PRCG_APRV_PROCS_STCD,3,2,1,1,1,1,,, +PRCG_APRV_TYCD,3,2,1,1,1,1,,, +APRV_PRCG_EMPNO,3,2,1,1,7,1,,, +NURN_RSBT_EMPNO,3,2,1,1,7,1,,, +PRCG_APRV_SEQNO,3,2,1,1,10,2,,, +NURN_AGNCY_APRV_YN,3,2,1,1,1,1,,, +DSGT_PRCG_CHNG_YN,3,2,1,1,1,1,,, +CHNG_DSGT_PRCG_EMPNO,3,2,1,1,7,1,,, +PRCG_APRV_DMAN_RSN,3,2,1,1,40,1,,, +PRCG_APRV_RSN,3,2,1,1,40,1,,, +BizProc_Info,2,3,1,1,0,1,,, +BZOP_DT,3,2,1,1,8,1,,, +ANTT_YN,3,2,1,1,1,1,,, +MESG_IQRY_DVCD,3,2,1,1,1,1,,, +ATMC_CLSN_DVCD,3,2,1,1,1,1,,, +TLRNO,3,2,1,1,7,1,,, +ASST_TLRNO,3,2,1,1,7,1,,, +PSWD_VALDTN_YN,3,2,1,1,1,1,,, +TX_TELR_PSWD,3,2,1,1,44,1,,, +CSIF_IDNT_DVCD,3,2,1,1,3,1,,, +CSIF_ID,3,2,1,1,30,1,,, +CSIF_CUST_NM,3,2,1,1,30,1,,, +CSIF_MASK_REVOC_YN,3,2,1,1,1,1,,, +CUST_PTLET_MASK_YN,3,2,1,1,1,1,,, +IDC_IMG_NO,3,2,1,1,32,1,,, +SMTWKP_TX_YN,3,2,1,1,1,1,,, +SECU_ACCO_REG_YN,3,2,1,1,1,1,,, +ABC_TX_DTLS_DVCD,3,2,1,1,2,1,,, +CLNT_TELR_CSHN_RFLC_YN,3,2,1,1,1,1,,, +SLIP_DIV_YN,3,2,1,1,1,1,,, +SLIP_NO,3,2,1,1,9,1,,, +TELR_SLIP_SEQNO,3,2,1,1,10,2,,, +TELR_CASH_AMT,3,2,1,1,17,2,,, +TELR_CBPC_AMT,3,2,1,1,17,2,,, +TELR_TRFAMT,3,2,1,1,17,2,,, +LOGIN_DVCD,3,2,1,1,1,1,,, +TX_DT_EXTNS_YN ,3,2,1,1,1,1,,, +TX_DT,3,2,1,1,8,1,,, +TX_TIME,3,2,1,1,8,1,,, +SYS_DT,3,2,1,1,8,1,,, +SYS_TIME,3,2,1,1,8,1,,, +MESG_DMAN_DT,3,2,1,1,8,1,,, +MESG_DMAN_TKTM,3,2,1,1,9,1,,, +MESG_CNTY_YN,3,2,1,1,1,1,,, +MESG_RSPN_DT,3,2,1,1,8,1,,, +MESG_RSPN_TKTM,3,2,1,1,9,1,,, +PROCS_RSLT_DVCD,3,2,1,1,2,1,,, +OUTPUT_MESG_TYCD,3,2,1,1,1,1,,, +LRQN_OUTPUT_DSCT_TRGT_YN,3,2,1,1,1,1,,, +MESG_CNTY_SEQNO,3,2,1,1,3,1,,, +Error_Info,2,3,1,1,0,1,,, +ERR_CD,3,2,1,1,6,1,,, +ERR_SYS_CD,3,2,1,1,3,1,,, +KJB_Add,2,3,1,1,0,1,,, +ORTR_SCN_ID,3,2,1,1,13,1,,, +CORP_DPRM_NO,3,2,1,1,5,1,,, +CSIF_IQRY_RSCD,3,2,1,1,2,1,,, +Com_Spare_Zone,2,3,1,1,0,1,,, +COM_SPR_CTNT,3,2,1,1,212,1,,, +Channel_Common,1,3,0,1,0,1,Std_Header.Common.Channel_Info.CHNL_COM_SCTN_EXIS_YN,Y, +Data_Header,2,3,0,1,0,1,,, +DATA_HEDR_KNCD,3,2,1,1,2,1,,, +DATA_HEDR_LEN,3,2,1,1,8,1,,, +Data_For_Each,2,3,0,1,0,1,,, +PSWD_ERR_DVCD,3,2,1,1,2,1,,, +ELFN_CUST_TYCD,3,2,1,1,2,1,,, +USER_ID_S14,3,2,1,1,14,1,,, +MST_ID_S14,3,2,1,1,14,1,,, +SVR_TX_NO,3,2,1,1,10,1,,, +HOST_TX_NO_S10,3,2,1,1,10,1,,, +NEXT_PAGE_EXIS_YN1,3,2,1,1,1,1,,, +SCCR_ISS_CD,3,2,1,1,2,1,,, +SQ1_SCCR_SSBP_NO_SER,3,2,1,1,2,1,,, +SQ2_SCCR_SSBP_NO_SER,3,2,1,1,2,1,,, +SECU_MEDIA_SEQNO_S4,3,2,1,1,4,1,,, +SECU_MEDIA_DTL_DVCD_N3,3,2,1,1,3,1,,, +PAGE_NO,3,2,1,1,5,1,,, +PAGE_SIZE,3,2,1,1,5,1,,, +TTCN_N5,3,2,1,1,5,1,,, +IQRY_CCNT_N5,3,2,1,1,5,1,,, +PRIQR_TX_NO,3,2,1,1,10,1,,, +SQ1_CUST_CNFR_INFO_CTNT_S39,3,2,1,1,39,1,,, +SQ2_CUST_CNFR_INFO_CTNT_S39,3,2,1,1,39,1,,, +MAC_S17,3,2,1,1,17,1,,, +HDD_SEQ_NO_S24,3,2,1,1,24,1,,, +CMCM_CD,3,2,1,1,1,1,,, +TLNO_S14,3,2,1,1,14,1,,, +OTP_EXPR_GDNC_DVCD_S1,3,2,1,1,1,1,,, +KFTC_ENCD_MST_KEY_VER_S2,3,2,1,1,2,1,,, +KFTC_ENCD_RAND1_S32,3,2,1,1,32,1,,, +KFTC_ENCD_RAND2_S32,3,2,1,1,32,1,,, +ADDT_ATHN_YN_S1,3,2,1,1,1,1,,, +ADDT_ATHN_METH_DVCD_S2,3,2,1,1,2,1,,, +ADDT_ATHN_ATHN_VAL_S40,3,2,1,1,40,1,,, +DUP_TX_YN_S1,3,2,1,1,1,1,,, +ABR_IP_BLC_YN_S1,3,2,1,1,1,1,,, +VIRT_ACCO_DVCD_S1,3,2,1,1,1,1,,, +BZWK_DVCD1_S1,3,2,1,1,1,1,,, +BZWK_DVCD2_S1,3,2,1,1,1,1,,, +BZWK_DVCD3_S1,3,2,1,1,1,1,,, +BZWK_DVCD4_S1,3,2,1,1,1,1,,, +BZWK_DVCD5_S1,3,2,1,1,1,1,,, +TX_SER_SEQNO_N3,3,2,1,1,3,1,,, +SECU_MEDIA_SEQNO_DMAN_VAL_S4,3,2,1,1,4,1,,, +MEDIA_D1_UZ_POSB_AMT_N12,3,2,1,1,12,1,,, +CPHR_KEY_SECU_CO_CD_S1,3,2,1,1,1,1,,, +HDD_VOLU_ID_S35,3,2,1,1,35,1,,, +SPR_FILD_S197,3,2,1,1,197,1,,, +Message,1,3,0,1,0,1,Std_Header.Header.Sys_Info.MESG_DMAN_DVCD,R, +Msg_Header,2,3,0,1,0,1,,, +MSG_HEDR_KNCD,3,2,1,1,2,1,,,NM +MSG_HEDR_LEN,3,2,1,1,8,2,,, +Msg_Body,2,3,0,1,0,1,,, +OUTPUT_ATRB_CD,3,2,1,1,1,1,,,0 +OUTPUT_MSG_CD,3,2,1,1,10,1,,, +OUTPUT_MSG_CTNT,3,2,1,1,200,1,,, +OUTPUT_MSG_DESC,3,2,1,1,300,1,,, +ERR_MNGM_CTNT,3,2,1,1,200,1,,, +ERR_CHGR_NM,3,2,1,1,10,1,,, +ERR_CHGR_CNPL_NO,3,2,1,1,20,1,,, +OUTPUT_MSG_NCNT,3,2,1,1,4,2,,,0000 +Output_Msg_Grid,3,4,0,1,0,1,Message.Msg_Body.OUTPUT_MSG_NCNT,, +OUTPUT_MSG_CD,4,2,0,1,10,1,,, +OUTPUT_MSG_CTNT,4,2,0,1,200,1,,, +OUTPUT_MSG_DESC,4,2,0,1,300,1,,, +ERR_MNGM_CTNT,4,2,0,1,200,1,,, +ERR_LOCT_CTNT,4,2,0,1,200,1,,, +ERR_OCCU_ITEM_NM,4,2,0,1,20,1,,, +Manager_Confirm,1,3,0,1,0,1,Std_Header.Header.Sys_Info.MESG_DMAN_DVCD,R, +Data_Header,2,3,0,1,0,1,,, +DATA_HEDR_KNCD,3,2,1,1,2,1,,, +DATA_HEDR_LEN,3,2,1,1,8,2,,, +Data_Header_Etc,2,3,0,1,0,1,,, +OUTPUT_SRVC_ID,3,2,1,1,13,1,,, +OUTPUT_SCN_ID,3,2,1,1,13,1,,, +OUTPUT_SCN_DRVTN_MSG_CTNT,3,2,1,1,50,1,,, +DCG_DVCD,3,2,1,1,1,1,,, +Data_For_Each,2,3,0,1,0,1,,, +ACNO,3,2,1,1,16,1,,, +TRMN_CUST_FLNM,3,2,1,1,20,1,,, +TX_AMT,3,2,1,1,17,2,,, +APRV_RSCD_CCNT,3,2,1,1,5,2,,, +APRV_RSCD,3,2,1,1,5,1,,, +PRCG_APRV_DESC,3,2,1,1,50,1,,, +PRCG_APRV_TYCD,3,2,1,1,1,1,,, +PRCG_APRV_LIST_CCNT,3,2,1,1,5,2,,, +TX_DVCD,3,2,1,1,2,1,,, +PRCG_EMPNO,3,2,1,1,6,1,,, +KOR_FLNM,3,2,1,1,40,1,,, +BLNG_BRCD,3,2,1,1,4,1,,, +BRN_KOR_NM ,3,2,1,1,100,1,,, +LOGIN_IPAD,3,2,1,1,30,1,,, +JOBCLS_CD,3,2,1,1,2,1,,, +LOGIN_STCD,3,2,1,1,2,1,,, +ABSC_YN,3,2,1,1,1,1,,, +AGNCY_APRV_TLRNO,3,2,1,1,7,1,,, +BRMNR_YN,3,2,1,1,1,1,,, +AUDT_UNCN_PRCG_YN,3,2,1,1,1,1,,, +Data_Part,1,3,0,1,0,1,,, +Data_Header,2,3,0,1,0,1,,, +DATA_HEDR_KNCD,3,2,1,1,2,1,,,IO +DATA_HEDR_LEN,3,2,1,1,8,2,,, +Data_Header_Etc,2,3,0,1,0,1,Std_Header.Header.Sys_Info.MESG_DMAN_DVCD,R, +OUTPUT_SRVC_ID,3,2,1,1,13,1,,, +OUTPUT_SCN_ID,3,2,1,1,13,1,,, +OUTPUT_SCN_DRVTN_MSG_CTNT,3,2,1,1,50,1,,, +DCG_DVCD,3,2,1,1,1,1,,, +Data_For_Each,2,3,0,1,0,1,,, +BizData,3,9,1,1,0,1,,, +END_BIT_CTNT,1,2,1,1,2,11,,,@@ \ No newline at end of file diff --git a/src/main/resources/standard-message-config.properties b/src/main/resources/standard-message-config.properties index 91015d3..9704d20 100644 --- a/src/main/resources/standard-message-config.properties +++ b/src/main/resources/standard-message-config.properties @@ -1,18 +1,18 @@ # layout : StandardMessage layout definition #layout.file.type=CSV layout.file.type=DB -#layout.file.path=standard-layout-sbi.csv +#layout.file.path=standard-layout-kjb.csv #layout.file.path=standard-layout-elk.csv #layout.filter.FLAT=com.eactive.eai.custom.message.FlatMessageFilterSBI layout.filter.FLAT=com.eactive.eai.message.filter.FlatMessageFilter # mapper : StandardMessage's fields getter/setter interface #mapper.class=com.eactive.eai.custom.message.InterfaceMapperSBI -mapper.class=com.eactive.eai.custom.message.InterfaceMapperKBANK +mapper.class=com.eactive.eai.custom.message.InterfaceMapperKJB #mapper.definition=standard-message-mapping-config-sbi.properties #mapper.definition=standard-message-mapping-config-elk.properties -mapper.definition=standard-message-mapping-config.properties +mapper.definition=standard-message-mapping-config-kjb.properties # StandardMessage Coordinator implementation -message.coordinator.class=com.eactive.eai.custom.message.StandardMessageCoordinatorKBANK +message.coordinator.class=com.eactive.eai.custom.message.StandardMessageCoordinatorKJB # RequestProcessor implementation #requestProcessor.class=com.eactive.eai.inbound.processor.RequestProcessor # reader : parsing input data to StandardMessage diff --git a/src/main/resources/standard-message-mapping-config-kjb.properties b/src/main/resources/standard-message-mapping-config-kjb.properties new file mode 100644 index 0000000..89d9200 --- /dev/null +++ b/src/main/resources/standard-message-mapping-config-kjb.properties @@ -0,0 +1,52 @@ +#C2R\uC5D0\uC11C\uB9CC \uC0AC\uC6A9 +REQ_SYS_CODE= +#\uCC44\uB110\uC720\uD615\uCF54\uB4DC +CHANNEL_TYPE_CD= +#\uCC44\uB110\uC138\uBD80\uBD84\uB958\uCF54\uB4DC +CHANNEL_DETAIL_CD= +#\uC804\uC1A1\uC2DC\uAC04-400\uC751\uB2F5\uC2DC\uC5D0 \uC14B\uD305 +SEND_TIME= +#GUID - K +GUID=Header.Sys_Info.GUID +#\uC2DC\uC2A4\uD15C\uD0C0\uC785-MCI/EAI/FEP-\uC0AC\uC6A9 +SYSTEM_TYPE=Header.Src_System.FRST_TRNM_SYS_CD +#\uC218\uC2E0\uC2DC\uAC01 +RECV_TIME=Common.BizProc_Info.MESG_DMAN_TKTM +# \uBBF8\uC0AC\uC6A9 +RETURN_VALUE= +#\uC6D0\uAC70\uB798GUID - K +GUID_ORG= +#GUID\uC758 \uC9C4\uD589\uC77C\uB828\uBC88\uD638 - K +GUID_SEQ= +#\uACC4\uC815\uACC4\uC11C\uBE44\uC2A4ID - K +SERVICE_ID=Common.Service_info.SRVC_ID +#\uACC4\uC815\uACC4\uC751\uB2F5\uC11C\uBE44\uC2A4ID +RETURN_SERVICE_ID= +#\uC778\uD130\uD398\uC774\uC2A4ID - K +INTERFACE_ID=Common.Service_info.IF_ID +#\uC138\uC158ID-MCI/EAI/FEP\uBCC4\uB85C map +SESSION_ID=Header.Src_System.MCI_SESN_ID +#\uC694\uCCAD\uC751\uB2F5\uAD6C\uBD84\uCF54\uB4DC(S|R) +SEND_RECV_DIVISION=Header.Sys_Info.MESG_DMAN_DVCD +#\uB0B4\uC678\uAD6C\uBD84\uCF54\uB4DC(1|2) +IN_EX_DIVISION=Common.Service_info.HMAB_DVCD +#\uC6B4\uC601\uD658\uACBD\uAD6C\uBD84\uCF54\uB4DC +OPERATION_ENV=Common.Service_info.SYS_OPRT_ENV_DVCD +#\uCD5C\uCD08\uC694\uCCADIP +FIRST_REQ_IP=Header.Src_System.FRST_TRNM_IPAD +#\uBCF5\uC6D0\uC5EC\uBD80(0|1) +RECOVER_YN=Common.Service_info.ORTR_RESTR_YN +#\uC778\uC2A4\uD134\uC2A4ID +INST_CODE= +#\uD0C0\uC784\uC544\uC6C3 +TIMEOUT= +#\uC5D0\uB7EC\uCF54\uB4DC +ERROR_CODE=Common.Error_Info.ERR_CD +#\uC5D0\uB7EC\uBA54\uC2DC\uC9C0 +ERROR_MSG=Message.Msg_Body.OUTPUT_MSG_CTNT +#\uC0AC\uC6A9\uC790ID +USER_ID= +#\uC751\uB2F5\uD0C0\uC785-\uC815\uC0C1\uC5EC\uBD80(0=\uC815\uC0C1|1=\uC5D0\uB7EC) +RESPONSE_TYPE=Common.BizProc_Info.PROCS_RSLT_DVCD +#\uAC70\uB798\uB3D9\uAE30\uD654\uAD6C\uBD84\uCF54\uB4DC(S|A) +SYNC_ASYNC_TYPE=Common.Service_info.TX_SYNZ_DVCD From 8780e376f8143e6ea029d9c8b154d5bd4b9f9933 Mon Sep 17 00:00:00 2001 From: yunjy-hp Date: Tue, 9 Dec 2025 14:19:29 +0900 Subject: [PATCH 38/50] =?UTF-8?q?=EA=B4=91=EC=A3=BC=EC=9D=80=ED=96=89=20?= =?UTF-8?q?=ED=91=9C=EC=A4=80=EC=A0=84=EB=AC=B8=20=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EC=9E=91=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/META-INF/context.xml | 62 --------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 WebContent/META-INF/context.xml diff --git a/WebContent/META-INF/context.xml b/WebContent/META-INF/context.xml deleted file mode 100644 index 385912e..0000000 --- a/WebContent/META-INF/context.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 0b98c8d11ffb5c86eb3986816092be88b8e32568 Mon Sep 17 00:00:00 2001 From: parkl Date: Tue, 9 Dec 2025 16:21:50 +0900 Subject: [PATCH 39/50] =?UTF-8?q?=EC=A3=BC=EC=84=9D=20=EC=98=A4=EB=A5=98?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/web.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml index c36bd0f..e4e6473 100644 --- a/WebContent/WEB-INF/web.xml +++ b/WebContent/WEB-INF/web.xml @@ -69,7 +69,6 @@ - - --> default @@ -73,19 +74,18 @@ - + + + + + + + + + + + + - - default - weblogic.servlet.FileServlet - - - default - /static/* - + + + + + + + + From 13b525f0772ff899275b0efbf45c2435f95d1907 Mon Sep 17 00:00:00 2001 From: pksup Date: Thu, 11 Dec 2025 16:28:51 +0900 Subject: [PATCH 48/50] =?UTF-8?q?error=20format=20=EB=B3=80=EA=B2=BD=20,?= =?UTF-8?q?=20token=20=EB=B0=9C=EA=B8=89=20url=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eactive/eai/kjb/errors/OAuth2BearerAuth404ErrorTest.java | 2 +- .../java/com/eactive/eai/kjb/errors/OAuth2BearerAuthTest.java | 2 +- .../java/com/eactive/eai/kjb/errors/OAuth2TokenSuccessTest.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kjb-errors/src/test/java/com/eactive/eai/kjb/errors/OAuth2BearerAuth404ErrorTest.java b/kjb-errors/src/test/java/com/eactive/eai/kjb/errors/OAuth2BearerAuth404ErrorTest.java index 1107a1c..c368fe1 100644 --- a/kjb-errors/src/test/java/com/eactive/eai/kjb/errors/OAuth2BearerAuth404ErrorTest.java +++ b/kjb-errors/src/test/java/com/eactive/eai/kjb/errors/OAuth2BearerAuth404ErrorTest.java @@ -27,7 +27,7 @@ class OAuth2BearerAuth404ErrorTest { @Test void testCase001_Bearer인증_존재하지않는API_404에러() throws Exception { // Step 1: 토큰 발급 - String tokenUrl = TestConfig.getBaseUrl("/oauth/token"); + String tokenUrl = TestConfig.getBaseUrl("/oauth2/token"); String accessToken; try (CloseableHttpClient httpClient = HttpClients.createDefault()) { diff --git a/kjb-errors/src/test/java/com/eactive/eai/kjb/errors/OAuth2BearerAuthTest.java b/kjb-errors/src/test/java/com/eactive/eai/kjb/errors/OAuth2BearerAuthTest.java index 6682c5e..064e02b 100644 --- a/kjb-errors/src/test/java/com/eactive/eai/kjb/errors/OAuth2BearerAuthTest.java +++ b/kjb-errors/src/test/java/com/eactive/eai/kjb/errors/OAuth2BearerAuthTest.java @@ -27,7 +27,7 @@ class OAuth2BearerAuthTest { @Test void testCase001_Bearer인증_성공() throws Exception { // Step 1: 토큰 발급 - String tokenUrl = TestConfig.getBaseUrl("/oauth/token"); + String tokenUrl = TestConfig.getBaseUrl("/oauth2/token"); String accessToken; try (CloseableHttpClient httpClient = HttpClients.createDefault()) { diff --git a/kjb-errors/src/test/java/com/eactive/eai/kjb/errors/OAuth2TokenSuccessTest.java b/kjb-errors/src/test/java/com/eactive/eai/kjb/errors/OAuth2TokenSuccessTest.java index 138277b..a9f7e50 100644 --- a/kjb-errors/src/test/java/com/eactive/eai/kjb/errors/OAuth2TokenSuccessTest.java +++ b/kjb-errors/src/test/java/com/eactive/eai/kjb/errors/OAuth2TokenSuccessTest.java @@ -25,7 +25,7 @@ class OAuth2TokenSuccessTest { @Test void testCase001_토큰발급성공() throws Exception { // given - String url = TestConfig.getBaseUrl("/oauth/token"); + String url = TestConfig.getBaseUrl("/oauth2/token"); List params = new ArrayList<>(); params.add(new BasicNameValuePair("grant_type", "client_credentials")); From dd255bb474caea1b5138d9dc5d7de586299c1277 Mon Sep 17 00:00:00 2001 From: "Yunsam.Eo" Date: Fri, 12 Dec 2025 08:39:59 +0900 Subject: [PATCH 49/50] =?UTF-8?q?transactionProp=EC=97=90=20isParameterTyp?= =?UTF-8?q?e=3Dtrue=EC=9D=BC=EB=95=8C=20INBOUND=5FQUERY=5FSTRING=EC=B2=98?= =?UTF-8?q?=EC=9E=A5=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/eactive/eai/adapter/service/ApiAdapterService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/eactive/eai/adapter/service/ApiAdapterService.java b/src/main/java/com/eactive/eai/adapter/service/ApiAdapterService.java index a9f1bbe..6ce7b1b 100644 --- a/src/main/java/com/eactive/eai/adapter/service/ApiAdapterService.java +++ b/src/main/java/com/eactive/eai/adapter/service/ApiAdapterService.java @@ -151,6 +151,7 @@ public class ApiAdapterService extends HttpAdapterServiceSupport { if (isParameterType) { paramValue = request.getQueryString(); + transactionProp.put(INBOUND_QUERY_STRING, StringUtils.defaultString(paramValue)); // Filter에서 QueryString 검증을 위해 저장 if (paramValue == null) paramValue = ""; if (traceLevel >= 3) { From 61de36cbd4894ee31929441ccc6f5c2e2308fdad Mon Sep 17 00:00:00 2001 From: "Yunsam.Eo" Date: Fri, 12 Dec 2025 09:09:28 +0900 Subject: [PATCH 50/50] =?UTF-8?q?=ED=86=A0=ED=81=B0=EB=B0=9C=EA=B8=89URL?= =?UTF-8?q?=20=EC=98=88=EC=99=B8=EC=B2=98=EB=A6=AC=20=EC=88=98=EC=A0=95(/m?= =?UTF-8?q?api/oauth2/token)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eactive/eai/adapter/controller/ApiAdapterController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eactive/eai/adapter/controller/ApiAdapterController.java b/src/main/java/com/eactive/eai/adapter/controller/ApiAdapterController.java index f79e0a1..6d8d7db 100644 --- a/src/main/java/com/eactive/eai/adapter/controller/ApiAdapterController.java +++ b/src/main/java/com/eactive/eai/adapter/controller/ApiAdapterController.java @@ -50,10 +50,10 @@ public class ApiAdapterController implements HttpAdapterServiceKey { ApiAdapterService service; /** - * KBANK 요구사항으로 /api/v1/oauth/token 과 같은 형태로 토큰 발급거래를 수행해야해서 예외처리함 + * KJBANK 요구사항으로 /mapi/oauth2/token 과 같은 형태로 토큰 발급거래를 수행해야해서 예외처리함 * @See com.eactive.eai.authserver.config.AuthorizationServerConfig.configure(AuthorizationServerEndpointsConfigurer endpoints) */ - @RequestMapping(value = {"/api/*", "/mapi/*", "/api/*/{path:^(?!.*oauth).*$}/**", "/mapi/*/{path:^(?!.*oauth).*$}/**"}) + @RequestMapping(value = {"/api/*", "/mapi/*", "/api/*/{path:^(?!.*oauth).*$}/**", "/mapi/{path:^(?!.*oauth2).*$}/**"}) // @RequestMapping(value = {"/api/**"}) public ResponseEntity callApi(HttpServletRequest servletRequest, HttpServletResponse servletResponse) throws Exception { // /ONLWeb/api/v1/public/getUserInfo.svc