Class DestinationWhiteListComponent

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

@Component public class DestinationWhiteListComponent extends Object
Whitelist filter component for any destination.
  • Field Details

    • enabled

      @Value("${notifications.whitelist.mail.enable}") private boolean enabled
      Enabled flag. If disabled, no whitelist filtered will be performed.
    • whiteListDestinationRepository

      @Autowired private WhiteListDestinationRepository whiteListDestinationRepository
      WhiteListDestination repository.
  • Constructor Details

    • DestinationWhiteListComponent

      public DestinationWhiteListComponent()
  • Method Details

    • filter

      public NotificationRequest filter(NotificationRequest request)
      Filter the given request to remove if destination is not in the white list.
      Parameters:
      request - notification request. If this feature is enabled, any request which destination is not present in the white list will be removed.
      Returns:
      The request if not in the white list. If this feature is disables, the same object received is returned unaltered.
    • filter0

      private NotificationRequest filter0(NotificationRequest request)
      Filter the given destination.
      Parameters:
      request - the message addresses to filter.
      Returns:
      the filtered message addresses,