Package ca.cdr.api.util
Class TransactionLogRequestDetailsAccess
java.lang.Object
ca.cdr.api.util.TransactionLogRequestDetailsAccess
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addAdditionalJsonProperty
(RequestDetails theRequestDetails, String theKey, Object theObject) Utility method to add key/value pairs to a transactionLog.static void
addMessageToRequest
(RequestDetails theDetails, MappingMessage theMessage) getAdditionalJsonPropertiesMap
(RequestDetails theRequestDetails) static List<MappingMessage>
getMessagesOnRequest
(RequestDetails theDetails) static List<TransactionLogStepJson>
getTransactionLogStepsFromRequest
(ServletRequestDetails theRequestDetails)
-
Field Details
-
STEPS_LIST_KEY
-
REQUEST_SUBTYPE_KEY
-
-
Constructor Details
-
TransactionLogRequestDetailsAccess
public TransactionLogRequestDetailsAccess()
-
-
Method Details
-
addMessageToRequest
-
getMessagesOnRequest
-
getTransactionLogStepsFromRequest
@Nullable public static List<TransactionLogStepJson> getTransactionLogStepsFromRequest(ServletRequestDetails theRequestDetails) -
addAdditionalJsonProperty
public static void addAdditionalJsonProperty(RequestDetails theRequestDetails, String theKey, Object theObject) Utility method to add key/value pairs to a transactionLog. The provided value object needs to be serializable with Jackson since pairs are accumulated and subsequently formatted in an inline Json string. IllegalArgumentException is thrown iftheObject
is not Json serializable with Jackson ornull
.- Parameters:
theRequestDetails
- The request details where the pairs will be storedtheKey
- The key for referencing to theObject. Keys are transformed into json properties when serializing a pair.theObject
- The value needing storage. Values are transformed into json values when serializing a pair.
-
getAdditionalJsonPropertiesMap
-