Package io.jmix.notifications.impl
Class NotificationManagerImpl.NotificationRequestBuilderImpl
java.lang.Object
io.jmix.notifications.impl.NotificationManagerImpl.NotificationRequestBuilderImpl
- All Implemented Interfaces:
- NotificationManager.InputBody,- NotificationManager.InputChannels,- NotificationManager.InputContentType,- NotificationManager.InputOptionals,- NotificationManager.InputRecipients,- NotificationManager.InputSubject,- NotificationManager.InputType,- NotificationManager.NotificationRequestBuilder,- NotificationManager.SendNotification
- Enclosing class:
- NotificationManagerImpl
public class NotificationManagerImpl.NotificationRequestBuilderImpl
extends Object
implements NotificationManager.NotificationRequestBuilder
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected Stringprotected Set<NotificationChannel>protected ContentTypeprotected Set<org.springframework.security.core.userdetails.UserDetails>protected Stringprotected NotificationType
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected Set<NotificationChannel>getEffectiveChannelsSet(Stream<String> channelNamesStream) protected Set<org.springframework.security.core.userdetails.UserDetails>getEffectiveRecipientsSet(Stream<String> usernamesStream) protected org.springframework.security.core.userdetails.UserDetailsgetUserByUsernameOrNull(String username) voidsend()Creates and sends notification request.toChannels(NotificationChannel... channels) Sets notification channels.toChannels(Collection<NotificationChannel> channels) Sets notification channels.toChannelsByNames(String... channelNames) Sets notification channels by provided names.toChannelsByNames(Collection<String> channelNames) Sets notification channels by provided names.Sets notification body.withContentType(ContentType contentType) Set notification body content type.SetsContentType.HTMLcontent type for notification body.SetsContentType.PLAINcontent type for notification body.withRecipients(Collection<org.springframework.security.core.userdetails.UserDetails> recipients) Sets notification recipients.withRecipients(org.springframework.security.core.userdetails.UserDetails... recipients) Sets notification recipients.withRecipientUsernames(String... recipientUsernames) Sets notification recipients by provided usernames.withRecipientUsernames(Collection<String> recipientUsernames) Sets notification recipients by provided usernames.withSubject(String subject) Sets notification subject.withType(NotificationType type) Sets notification type.withTypeName(String typeName) Sets notification type by provided name.
- 
Field Details- 
recipients
- 
subject
- 
body
- 
contentType
- 
type
- 
channels
 
- 
- 
Constructor Details- 
NotificationRequestBuilderImplpublic NotificationRequestBuilderImpl()
 
- 
- 
Method Details- 
withSubjectDescription copied from interface:NotificationManager.InputSubjectSets notification subject.- Specified by:
- withSubjectin interface- NotificationManager.InputSubject
- Parameters:
- subject- subject
- Returns:
- builder
 
- 
withRecipientUsernamesDescription copied from interface:NotificationManager.InputRecipientsSets notification recipients by provided usernames.- Specified by:
- withRecipientUsernamesin interface- NotificationManager.InputRecipients
- Parameters:
- recipientUsernames- usernames
- Returns:
- builder
 
- 
withRecipientUsernamespublic NotificationManager.NotificationRequestBuilder withRecipientUsernames(Collection<String> recipientUsernames) Description copied from interface:NotificationManager.InputRecipientsSets notification recipients by provided usernames.- Specified by:
- withRecipientUsernamesin interface- NotificationManager.InputRecipients
- Parameters:
- recipientUsernames- usernames
- Returns:
- builder
 
- 
withRecipientspublic NotificationManager.InputChannels withRecipients(org.springframework.security.core.userdetails.UserDetails... recipients) Description copied from interface:NotificationManager.InputRecipientsSets notification recipients.- Specified by:
- withRecipientsin interface- NotificationManager.InputRecipients
- Parameters:
- recipients- recipients
- Returns:
- builder
 
- 
withRecipientspublic NotificationManager.InputChannels withRecipients(Collection<org.springframework.security.core.userdetails.UserDetails> recipients) Description copied from interface:NotificationManager.InputRecipientsSets notification recipients.- Specified by:
- withRecipientsin interface- NotificationManager.InputRecipients
- Parameters:
- recipients- recipients
- Returns:
- builder
 
- 
toChannelsByNamesDescription copied from interface:NotificationManager.InputChannelsSets notification channels by provided names.- Specified by:
- toChannelsByNamesin interface- NotificationManager.InputChannels
- Parameters:
- channelNames- channel names
- Returns:
- builder
 
- 
toChannelsByNamespublic NotificationManager.NotificationRequestBuilder toChannelsByNames(Collection<String> channelNames) Description copied from interface:NotificationManager.InputChannelsSets notification channels by provided names.- Specified by:
- toChannelsByNamesin interface- NotificationManager.InputChannels
- Parameters:
- channelNames- channel names
- Returns:
- builder
 
- 
toChannelsDescription copied from interface:NotificationManager.InputChannelsSets notification channels.- Specified by:
- toChannelsin interface- NotificationManager.InputChannels
- Parameters:
- channels- channels
- Returns:
- builder
 
- 
toChannelspublic NotificationManager.NotificationRequestBuilder toChannels(Collection<NotificationChannel> channels) Description copied from interface:NotificationManager.InputChannelsSets notification channels.- Specified by:
- toChannelsin interface- NotificationManager.InputChannels
- Parameters:
- channels- channels
- Returns:
- builder
 
- 
withContentTypeDescription copied from interface:NotificationManager.InputContentTypeSet notification body content type.- Specified by:
- withContentTypein interface- NotificationManager.InputContentType
- Parameters:
- contentType- content type
- Returns:
- builder
 
- 
withPlainTextContentTypeDescription copied from interface:NotificationManager.InputContentTypeSetsContentType.PLAINcontent type for notification body.- Specified by:
- withPlainTextContentTypein interface- NotificationManager.InputContentType
- Returns:
- builder
 
- 
withHtmlContentTypeDescription copied from interface:NotificationManager.InputContentTypeSetsContentType.HTMLcontent type for notification body.- Specified by:
- withHtmlContentTypein interface- NotificationManager.InputContentType
- Returns:
- builder
 
- 
withBodyDescription copied from interface:NotificationManager.InputBodySets notification body.- Specified by:
- withBodyin interface- NotificationManager.InputBody
- Parameters:
- body- body
- Returns:
- builder
 
- 
withTypeNameDescription copied from interface:NotificationManager.InputTypeSets notification type by provided name.- Specified by:
- withTypeNamein interface- NotificationManager.InputType
- Parameters:
- typeName- notification type name
- Returns:
- builder
 
- 
withTypeDescription copied from interface:NotificationManager.InputTypeSets notification type.- Specified by:
- withTypein interface- NotificationManager.InputType
- Parameters:
- type- notification type
- Returns:
- builder
 
- 
sendpublic void send()Description copied from interface:NotificationManager.SendNotificationCreates and sends notification request.- Specified by:
- sendin interface- NotificationManager.SendNotification
 
- 
getEffectiveRecipientsSet
- 
getUserByUsernameOrNull@Nullable protected org.springframework.security.core.userdetails.UserDetails getUserByUsernameOrNull(String username) 
- 
getEffectiveChannelsSet
 
-