Package ca.cdr.api.util
Class MessageMappingUtil
java.lang.Object
ca.cdr.api.util.MessageMappingUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic TransactionLogStepJsoncreateTransactionLogStep(List<MappingMessage> theIssues) Given a set of mapping issues (if any), generate aTransactionLogStepJsonthat can be sent to the transaction log service.static booleanhasErrors(List<MappingMessage> theIssues) Returnstrueif any of the given mapping issues has a level ofERRORor higher.static booleanisAtLeastError(MappingMessage.MessageLevel theLevel) Returnstrueif the given severity level isMappingMessage.MessageLevel.ERRORor higher.static StringtoLogMessage(List<MappingMessage> theIssues) Formats the given mapping issues as a semicolon-delimited string suitable for log output.static StringtoMarkdown(List<MappingMessage> theIssues) Formats the given mapping issues as a markdown bullet list.
-
Method Details
-
createTransactionLogStep
@Nullable public static TransactionLogStepJson createTransactionLogStep(List<MappingMessage> theIssues) Given a set of mapping issues (if any), generate aTransactionLogStepJsonthat can be sent to the transaction log service. Will only return an object if any issues are actually present, otherwise returns null.- Returns:
- Returns null if no issues detected
-
hasErrors
Returnstrueif any of the given mapping issues has a level ofERRORor higher. -
isAtLeastError
Returnstrueif the given severity level isMappingMessage.MessageLevel.ERRORor higher. -
toMarkdown
Formats the given mapping issues as a markdown bullet list. -
toLogMessage
Formats the given mapping issues as a semicolon-delimited string suitable for log output. Each issue is formatted as[LEVEL] path - message.
-