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 SummaryConstructorsConstructorDescriptionMessageWrapper(@NotNull AsyncUpdateMessageType message, @NotNull PrismContext prismContext) 
- 
Method SummaryModifier 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- 
MessageWrapperpublic MessageWrapper(@NotNull @NotNull AsyncUpdateMessageType message, @NotNull @NotNull PrismContext prismContext) 
 
- 
- 
Method Details- 
getMessage
- 
getBodyAsTextReturns message body as text. Assumes UTF-8 encoding for binary messages.
- 
getBodyAsBytespublic byte[] getBodyAsBytes()Returns message body as byte array. Assumes UTF-8 encoding for text messages.
- 
getBodyAsMapReturns message body as map. Assumes plain JSON representation.- Throws:
- IOException
 
- 
getBodyAsAsyncProvisioningRequestpublic JsonAsyncProvisioningRequest getBodyAsAsyncProvisioningRequest() throws com.fasterxml.jackson.core.JsonProcessingExceptionReturns message body asJsonAsyncProvisioningRequest. Assumes plain JSON representation.- Throws:
- com.fasterxml.jackson.core.JsonProcessingException
 
- 
getBodyAsPrismItemReturns message body as prism item. Assumes prism representation.- Throws:
- SchemaException
 
- 
getAmqp091AttributesReturns AMQP 0.9.1 attributes of the message. TODO decide what to do with this method
 
-