Class NotificationSenderService.MessageContext
java.lang.Object
es.kukenan.smartfi.microservice.communication.service.NotificationSenderService.MessageContext
- Enclosing class:
NotificationSenderService
This class is designed to hold all the required information to send a set of messages. Any additional information needed should be reachable from
the data present in this class.
-
Field Summary
FieldsModifier and TypeFieldDescriptionA list of attachment that may be sent to the user.private final CampaignCampaign.private NotificationChannelSpecific channel to send.private NotificationChannelChannel to procces this message.private final MessagesRequest.MessageSpecialPropertiesA message to be delivered.private ReceiverThe receiver for this message.private BooleanFlag if set an specific channel.The set of templates available to send this message, only one should be used.A list where unexpected errors must be added.private final UserThe user that is the original destination of the messages.A list of variables that may be used by the templates to compose the message. -
Constructor Summary
ConstructorsConstructorDescriptionMessageContext(MessagesRequest.MessageSpecialProperties messageSpecialProperties, Campaign campaign, MessagesRequest messagesRequest, List<String> unexpectedErrors) Constructor that use as source the information of the givenMessagesRequest. -
Method Summary
-
Field Details
-
user
The user that is the original destination of the messages. -
receiver
The receiver for this message. -
messageSpecialProperties
A message to be delivered. -
campaign
Campaign. -
currentChannel
Channel to procces this message. -
variables
A list of variables that may be used by the templates to compose the message. -
attachments
A list of attachment that may be sent to the user. -
templates
The set of templates available to send this message, only one should be used. -
unexpectedErrors
A list where unexpected errors must be added. -
specificChannel
Flag if set an specific channel. -
channel
Specific channel to send.
-
-
Constructor Details
-
MessageContext
public MessageContext(MessagesRequest.MessageSpecialProperties messageSpecialProperties, Campaign campaign, MessagesRequest messagesRequest, List<String> unexpectedErrors) Constructor that use as source the information of the givenMessagesRequest.- Parameters:
messageSpecialProperties- the message to send.campaign- campaign.messagesRequest- the messages request the message belongs to.unexpectedErrors- a list of unexpected errors to maintain.
-