Class MessageWrapper
- java.lang.Object
-
- com.evolveum.midpoint.schema.messaging.MessageWrapper
-
@Experimental public class MessageWrapper extends Object
Provides basic message-manipulation methods to be used in scripts (typically, async update transformation scripts).
-
-
Constructor Summary
Constructors Constructor Description MessageWrapper(@NotNull AsyncUpdateMessageType message, @NotNull PrismContext prismContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Amqp091MessageAttributesType
getAmqp091Attributes()
Returns AMQP 0.9.1 attributes of the message.JsonAsyncProvisioningRequest
getBodyAsAsyncProvisioningRequest()
Returns message body asJsonAsyncProvisioningRequest
.byte[]
getBodyAsBytes()
Returns message body as byte array.Map<String,Object>
getBodyAsMap()
Returns message body as map.Item<?,?>
getBodyAsPrismItem(String language)
Returns message body as prism item.String
getBodyAsText()
Returns message body as text.@NotNull AsyncUpdateMessageType
getMessage()
-
-
-
Constructor Detail
-
MessageWrapper
public MessageWrapper(@NotNull @NotNull AsyncUpdateMessageType message, @NotNull @NotNull PrismContext prismContext)
-
-
Method Detail
-
getMessage
@NotNull public @NotNull AsyncUpdateMessageType getMessage()
-
getBodyAsText
public String 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
public Map<String,Object> getBodyAsMap() throws IOException
Returns message body as map. Assumes plain JSON representation.- Throws:
IOException
-
getBodyAsAsyncProvisioningRequest
public JsonAsyncProvisioningRequest getBodyAsAsyncProvisioningRequest() throws com.fasterxml.jackson.core.JsonProcessingException
Returns message body asJsonAsyncProvisioningRequest
. Assumes plain JSON representation.- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
getBodyAsPrismItem
public Item<?,?> getBodyAsPrismItem(String language) throws SchemaException
Returns message body as prism item. Assumes prism representation.- Throws:
SchemaException
-
getAmqp091Attributes
public Amqp091MessageAttributesType getAmqp091Attributes()
Returns AMQP 0.9.1 attributes of the message. TODO decide what to do with this method
-
-