Interface WrapperMessage

All Superinterfaces:
Message

public interface WrapperMessage extends Message

Interface for wrapping multiple messages of the same type together into one message.

WrapperMessages are only useful for wrapping RecordType2Message, RecordType3Message and PermissionMessages. WrapperMessages are be published as one merged update by DataSource. A WrapperMessage will ignore any setImage and setNonActive flags from any added messages, instead the setImage and setNoneActive flags must be set on the WrapperMessage itself. Any flags (excluding image and nonactive) on the first message added will be added to the wrapper message.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Adds a message to the WrapperMessage, the first message defines the message type.
    boolean
    Gets a value indicating whether all the Type2/type3 data should be cleared.
    Returns the list of messages in the order they were added.
    void
    setClearFlag(Boolean clearFlag)
    Sets a value indicating whether all Type2/type3 data should be cleared.

    Methods inherited from interface com.caplin.datasource.messaging.Message

    getMessageType, getSubject, isImage, setImage
  • Method Details

    • addMessage

      void addMessage(Message message)
      Adds a message to the WrapperMessage, the first message defines the message type. If another message of a different type to the first message is added, then a RuntimeException is thrown.
      Parameters:
      message - the message to add to the wrapper
      Throws:
      RuntimeException - when the message added is a different type to the first one added
    • getMessages

      List<Message> getMessages()
      Returns the list of messages in the order they were added.
      Returns:
      list of messages
    • getClearFlag

      boolean getClearFlag()
      Gets a value indicating whether all the Type2/type3 data should be cleared.
      Returns:
      True if all the Type2/type3 data should be cleared; otherwise false.
    • setClearFlag

      void setClearFlag(Boolean clearFlag)
      Sets a value indicating whether all Type2/type3 data should be cleared.
      Parameters:
      clearFlag - True if all Type2/type3 data should be cleared; otherwise false .