public class EocOmTransformUtil extends Object
| Constructor and Description |
|---|
EocOmTransformUtil() |
| Modifier and Type | Method and Description |
|---|---|
static com.google.gson.JsonObject |
getMappingJsonObject(String tenantId,
String product,
String id,
String uid,
String dapChain)
向MDC取得運營單元對應的JsonObject
|
static String |
transform(String message,
String tenantId,
String product)
轉換訊息中的運營單元資訊
|
static String |
transform(String message,
String tenantId,
String product,
String uid)
轉換訊息中的運營單元資訊
|
static String |
transformByServiceName(String message,
String tenantId,
String serviceName,
String userToken)
轉換訊息中的運營單元資訊
|
static Map<String,String> |
transformEocOmMap(Map<String,String> targetMap,
Map<String,String> sourceMap,
String tenantId,
String product)
轉換eocmap/ommap
|
static Map<String,String> |
transformEocOmMap(Map<String,String> targetMap,
Map<String,String> sourceMap,
String tenantId,
String product,
String dapChain)
轉換eocmap/ommap
|
static void |
transformRequest(MessageModel messageModel)
轉換MessageModel中的Request訊息運營單元資訊 包含UID、datakey、body訊息
|
static void |
transformResponse(MessageModel messageModel)
轉換MessageModel的Response訊息中的運營單元資訊 包含body訊息
|
public static String transform(String message, String tenantId, String product) throws Exception
message - 欲轉換的Json字串tenantId - 租戶IDproduct - 地端產品名稱IOException - IOExceptionorg.apache.http.client.ClientProtocolException - ClientProtocolExceptionJsonFormatException - JsonFormatExceptionorg.apache.http.ParseException - ParseExceptionExceptionpublic static String transform(String message, String tenantId, String product, String uid) throws Exception
message - 欲轉換的Json字串tenantId - 租戶IDproduct - 地端產品名稱uid - 地端產品UIDIOException - IOExceptionorg.apache.http.client.ClientProtocolException - ClientProtocolExceptionJsonFormatException - JsonFormatExceptionorg.apache.http.ParseException - ParseExceptionExceptionpublic static String transformByServiceName(String message, String tenantId, String serviceName, String userToken) throws Exception
message - 欲轉換的Json字串tenantId - 租戶IDserviceName - 調用服務名稱userToken - 用戶tokenExceptionpublic static void transformRequest(MessageModel messageModel) throws Exception
messageModel - MessageModelException - Exceptionpublic static void transformResponse(MessageModel messageModel) throws Exception
messageModel - MessageModelIOException - IOExceptionorg.apache.http.client.ClientProtocolException - ClientProtocolExceptionJsonFormatException - JsonFormatExceptionorg.apache.http.ParseException - ParseExceptionExceptionpublic static Map<String,String> transformEocOmMap(Map<String,String> targetMap, Map<String,String> sourceMap, String tenantId, String product) throws Exception
IOExceptionorg.apache.http.client.ClientProtocolExceptionJsonFormatExceptionorg.apache.http.ParseExceptionExceptionpublic static Map<String,String> transformEocOmMap(Map<String,String> targetMap, Map<String,String> sourceMap, String tenantId, String product, String dapChain) throws Exception
IOExceptionorg.apache.http.client.ClientProtocolExceptionJsonFormatExceptionorg.apache.http.ParseExceptionExceptionpublic static com.google.gson.JsonObject getMappingJsonObject(String tenantId, String product, String id, String uid, String dapChain) throws org.apache.http.client.ClientProtocolException, IOException, org.apache.http.ParseException, JsonFormatException
org.apache.http.client.ClientProtocolExceptionIOExceptionorg.apache.http.ParseExceptionJsonFormatExceptionCopyright © 2022. All rights reserved.