Class NotificationRequestBuilder

java.lang.Object
es.kukenan.smartfi.microservice.communication.service.NotificationRequestBuilder

@Component public class NotificationRequestBuilder extends Object
Notification data factory.
  • Field Details

    • channelDestinationHandlerManager

      @Autowired private NotificationChannelDestinationHandlerManager channelDestinationHandlerManager
      Channel destination handler manager, used to get the proper destination address given the channel to use.
  • Constructor Details

    • NotificationRequestBuilder

      public NotificationRequestBuilder()
  • Method Details

    • createNotification

      public NotificationRequest createNotification(User user, NotificationChannel channel, Receiver receiver, Map<String,Object> variables)
      Create notifications based on the given arguments.
      Parameters:
      user - user destination of the message.
      channel - the channel to send the message.
      receiver - the possible receiver of the message.
      variables - variables available to be used in the template.
      Returns:
      the notification data.