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.StringgetChannelValue(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 booleanisSupportedByCustomer(CustomerModel customer, NotificationChannel ch)voidnotifyCustomer(NotificationType notificationType, CustomerModel customer, java.util.Map<java.lang.String,? extends ItemModel> dataMap)Send notification to customer using channels from customer's preferencesvoidnotifyCustomer(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 voidnotifyCustomerByChannelSet(NotificationType notificationType, CustomerModel customer, java.util.Map<java.lang.String,? extends ItemModel> dataMap, java.util.Set<NotificationChannel> channelSet)protected voidprocessNotification(NotificationChannel channel, CustomerModel customer, Processor processor, java.util.Map<java.lang.String,? extends ItemModel> dataMap)voidsetNotificationChannelStrategyMap(java.util.Map<NotificationChannel,NotificationChannelStrategy> notificationChannelStrategyMap)voidsetNotificationLanguageStrategyMap(java.util.Map<java.lang.String,NotificationLanguageStrategy> notificationLanguageStrategyMap)voidsetProcessorRegistry(ProcessorMappingRegistry processorRegistry)
-
-
-
Method Detail
-
getChannelValue
public java.lang.String getChannelValue(NotificationChannel channel, CustomerModel customer)
Description copied from interface:NotificationServicereturn the notificaiton channel's value- Specified by:
getChannelValuein 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:NotificationServiceSend notification to customer using channels from customer's preferences- Specified by:
notifyCustomerin 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:NotificationServiceSend notification to customer using specific channels- Specified by:
notifyCustomerin 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)
-
-