Interface WrapperMessage
- All Superinterfaces:
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 TypeMethodDescriptionvoidaddMessage(Message message) Adds a message to the WrapperMessage, the first message defines the message type.booleanGets a value indicating whether all the Type2/type3 data should be cleared.Returns the list of messages in the order they were added.voidsetClearFlag(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
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
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:
Trueif all the Type2/type3 data should be cleared; otherwisefalse.
-
setClearFlag
Sets a value indicating whether all Type2/type3 data should be cleared.- Parameters:
clearFlag-Trueif all Type2/type3 data should be cleared; otherwisefalse.
-