Class DefaultNotificationService
- java.lang.Object
-
- de.hybris.platform.notificationservices.service.impl.DefaultNotificationService
-
- All Implemented Interfaces:
NotificationService
public class DefaultNotificationService extends java.lang.Object implements NotificationService
default implementation of NotificationService
-
-
Constructor Summary
Constructors Constructor Description DefaultNotificationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getChannelValue(NotificationChannel channel, CustomerModel customer)
return the notificaiton channel's valuejava.util.Map<NotificationChannel,NotificationChannelStrategy>
getNotificationChannelStrategyMap()
protected java.util.Map<java.lang.String,NotificationLanguageStrategy>
getNotificationLanguageStrategyMap()
protected java.util.Set<NotificationChannel>
getSupportedChannel(CustomerModel customer)
protected boolean
isSupportedByCustomer(CustomerModel customer, NotificationChannel ch)
void
notifyCustomer(NotificationType notificationType, CustomerModel customer, java.util.Map<java.lang.String,? extends ItemModel> dataMap)
Send notification to customer using channels from customer's preferencesvoid
notifyCustomer(NotificationType notificationType, CustomerModel customer, java.util.Set<NotificationChannel> channelSet, java.util.Map<java.lang.String,? extends ItemModel> dataMap)
Send notification to customer using specific channelsprotected void
notifyCustomerByChannelSet(NotificationType notificationType, CustomerModel customer, java.util.Map<java.lang.String,? extends ItemModel> dataMap, java.util.Set<NotificationChannel> channelSet)
protected void
processNotification(NotificationChannel channel, CustomerModel customer, Processor processor, java.util.Map<java.lang.String,? extends ItemModel> dataMap)
void
setNotificationChannelStrategyMap(java.util.Map<NotificationChannel,NotificationChannelStrategy> notificationChannelStrategyMap)
void
setNotificationLanguageStrategyMap(java.util.Map<java.lang.String,NotificationLanguageStrategy> notificationLanguageStrategyMap)
void
setProcessorRegistry(ProcessorMappingRegistry processorRegistry)
-
-
-
Method Detail
-
getChannelValue
public java.lang.String getChannelValue(NotificationChannel channel, CustomerModel customer)
Description copied from interface:NotificationService
return the notificaiton channel's value- Specified by:
getChannelValue
in interfaceNotificationService
- Parameters:
channel
- the notification channelcustomer
- the customer want to get the channel value- Returns:
- return the notification channel's value for customer
-
notifyCustomer
public void notifyCustomer(NotificationType notificationType, CustomerModel customer, java.util.Map<java.lang.String,? extends ItemModel> dataMap)
Description copied from interface:NotificationService
Send notification to customer using channels from customer's preferences- Specified by:
notifyCustomer
in interfaceNotificationService
- Parameters:
notificationType
- one specific typecustomer
- one customer you want to notifydataMap
- some models needed by VM file to renderer
-
notifyCustomer
public void notifyCustomer(NotificationType notificationType, CustomerModel customer, java.util.Set<NotificationChannel> channelSet, java.util.Map<java.lang.String,? extends ItemModel> dataMap)
Description copied from interface:NotificationService
Send notification to customer using specific channels- Specified by:
notifyCustomer
in interfaceNotificationService
- Parameters:
notificationType
- one specific typecustomer
- one customer you want to notifychannelSet
- assigned channelsdataMap
- some models needed by VM to renderer
-
notifyCustomerByChannelSet
protected void notifyCustomerByChannelSet(NotificationType notificationType, CustomerModel customer, java.util.Map<java.lang.String,? extends ItemModel> dataMap, java.util.Set<NotificationChannel> channelSet)
-
processNotification
protected void processNotification(NotificationChannel channel, CustomerModel customer, Processor processor, java.util.Map<java.lang.String,? extends ItemModel> dataMap)
-
getSupportedChannel
protected java.util.Set<NotificationChannel> getSupportedChannel(CustomerModel customer)
-
isSupportedByCustomer
protected boolean isSupportedByCustomer(CustomerModel customer, NotificationChannel ch)
-
setProcessorRegistry
public void setProcessorRegistry(ProcessorMappingRegistry processorRegistry)
-
getNotificationLanguageStrategyMap
protected java.util.Map<java.lang.String,NotificationLanguageStrategy> getNotificationLanguageStrategyMap()
-
setNotificationLanguageStrategyMap
public void setNotificationLanguageStrategyMap(java.util.Map<java.lang.String,NotificationLanguageStrategy> notificationLanguageStrategyMap)
-
getNotificationChannelStrategyMap
public java.util.Map<NotificationChannel,NotificationChannelStrategy> getNotificationChannelStrategyMap()
-
setNotificationChannelStrategyMap
public void setNotificationChannelStrategyMap(java.util.Map<NotificationChannel,NotificationChannelStrategy> notificationChannelStrategyMap)
-
-