public class ActionUtil extends Object
Constructor and Description |
---|
ActionUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
actionErrorLogProcessor(CategoryLogLevel errorCategory,
String errorCode,
String errorDescription)
Action Library Error logging Helper.
|
static void |
actionLogPostProcessor(StatusCode statusCode)
Method to enhance the MDC after the logging operation for Metrics and Audit logs.
|
static void |
actionLogPostProcessor(StatusCode statusCode,
boolean isServiceMetricLog) |
static void |
actionLogPostProcessor(StatusCode statusCode,
String responseCode,
boolean isServiceMetricLog) |
static void |
actionLogPostProcessor(StatusCode statusCode,
String responseCode,
String responseDescription,
boolean isServiceMetricLog)
Method to enhance the MDC after the logging operation for Metrics and Audit logs.
|
static void |
actionLogPreProcessor(ActionSubOperation subOperation,
String targetEntity)
Method to set up specific attributes MDC for the current logging operation.
|
static Date |
getCurrentTimeStampUtc()
Get Current Timestamp in UTC format.
|
static int |
getLogResponseCode(String errorCode)
Method to convert Action Library exception codes to OPENECOMP Audit codes in {@link.
|
static String |
getLogUtcDateStringFromTimestamp(Date timeStamp)
Convert timestamp to UTC format date string.
|
static String |
getUtcDateStringFromTimestamp(Date timeStamp)
Convert timestamp to UTC format date string.
|
public static Date getCurrentTimeStampUtc()
public static String getUtcDateStringFromTimestamp(Date timeStamp)
timeStamp
- UTC timestamp to be converted to the UTC Date format.public static String getLogUtcDateStringFromTimestamp(Date timeStamp)
timeStamp
- UTC timestamp to be converted to the UTC Date format.public static void actionLogPreProcessor(ActionSubOperation subOperation, String targetEntity)
subOperation
- Request Name.public static void actionLogPostProcessor(StatusCode statusCode)
statusCode
- Response code for the current operation.public static void actionLogPostProcessor(StatusCode statusCode, boolean isServiceMetricLog)
public static void actionLogPostProcessor(StatusCode statusCode, String responseCode, boolean isServiceMetricLog)
public static void actionLogPostProcessor(StatusCode statusCode, String responseCode, String responseDescription, boolean isServiceMetricLog)
statusCode
- Response code for the current operation.public static void actionErrorLogProcessor(CategoryLogLevel errorCategory, String errorCode, String errorDescription)
errorCategory
- WARN or ERROR.errorCode
- Action Library exception code.errorDescription
- Description of the error.public static int getLogResponseCode(String errorCode)
errorCode
- Action library exception code.Copyright © 2017. All rights reserved.