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 Details

  • Method Details

    • 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 as JsonAsyncProvisioningRequest. 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