Class MessageWrapper
java.lang.Object
com.evolveum.midpoint.schema.messaging.MessageWrapper
Provides basic message-manipulation methods to be used in scripts (typically, async update transformation scripts).
-
Constructor Summary
ConstructorDescriptionMessageWrapper
(@NotNull AsyncUpdateMessageType message, @NotNull PrismContext prismContext) -
Method Summary
Modifier and TypeMethodDescriptionReturns AMQP 0.9.1 attributes of the message.Returns message body asJsonAsyncProvisioningRequest
.byte[]
Returns message body as byte array.Returns message body as map.Item<?,
?> getBodyAsPrismItem
(String language) Returns message body as prism item.Returns message body as text.@NotNull AsyncUpdateMessageType
-
Constructor Details
-
MessageWrapper
public MessageWrapper(@NotNull @NotNull AsyncUpdateMessageType message, @NotNull @NotNull PrismContext prismContext)
-
-
Method Details
-
getMessage
-
getBodyAsText
Returns message body as text. Assumes UTF-8 encoding for binary messages. -
getBodyAsBytes
public byte[] getBodyAsBytes()Returns message body as byte array. Assumes UTF-8 encoding for text messages. -
getBodyAsMap
Returns message body as map. Assumes plain JSON representation.- Throws:
IOException
-
getBodyAsAsyncProvisioningRequest
public JsonAsyncProvisioningRequest getBodyAsAsyncProvisioningRequest() throws com.fasterxml.jackson.core.JsonProcessingExceptionReturns message body asJsonAsyncProvisioningRequest
. Assumes plain JSON representation.- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getBodyAsPrismItem
Returns message body as prism item. Assumes prism representation.- Throws:
SchemaException
-
getAmqp091Attributes
Returns AMQP 0.9.1 attributes of the message. TODO decide what to do with this method
-