Class DefaultNotificationPreferenceFacade
java.lang.Object
de.hybris.platform.notificationfacades.facades.impl.DefaultNotificationPreferenceFacade
- All Implemented Interfaces:
NotificationPreferenceFacade
public class DefaultNotificationPreferenceFacade
extends Object
implements NotificationPreferenceFacade
Facade used to get and update notification preference
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<NotificationPreferenceData>filterValidNotificationPreference(List<NotificationPreferenceData> preferenceData) getChannelValue(NotificationChannel channel) Get the channel value for channelGet the notification preferenceGet the notification preference data listgetNotificationPreferences(List<NotificationPreferenceData> notificationPreferences) Get the notification preference data listgetNotificationPreferences(Set<NotificationChannel> enabledChannels) Get all notification channels according to enabledChannelsGet the valid notification preference data, for example the mail has mail address, the sms has phone numbergetValidNotificationPreferences(Set<NotificationChannel> enabledChannels) Get the valid notification preference data according to the enabledChannelsvoidsetModelService(ModelService modelService) voidsetNotificationPreferenceConverter(Converter<CustomerModel, NotificationPreferenceData> notificationPreferenceConverter) voidsetNotificationPreferenceEntryConverter(Converter<NotificationChannel, NotificationPreferenceData> notificationPreferenceElementConverter) voidsetNotificationPreferencesConverter(Converter<List<NotificationPreferenceData>, NotificationPreferenceDataList> notificationPreferencesConverter) voidsetNotificationService(NotificationService notificationService) voidsetUserService(UserService userService) protected voidupdateAllChannels(List<NotificationPreferenceData> allChannels, Set<NotificationChannel> enabledChannels) voidupdateNotificationPreference(NotificationPreferenceData notificationPreferenceData) Update the notification preference to databasevoidupdateNotificationPreference(List<NotificationPreferenceData> notificationPreferenceDataList) Update the notification preference to databaseprotected boolean
-
Constructor Details
-
DefaultNotificationPreferenceFacade
public DefaultNotificationPreferenceFacade()
-
-
Method Details
-
getNotificationPreferenceEntryConverter
public Converter<NotificationChannel,NotificationPreferenceData> getNotificationPreferenceEntryConverter() -
setNotificationPreferenceEntryConverter
public void setNotificationPreferenceEntryConverter(Converter<NotificationChannel, NotificationPreferenceData> notificationPreferenceElementConverter) -
getNotificationService
-
setNotificationService
-
getModelService
-
setModelService
-
getUserService
-
setUserService
-
getNotificationPreferenceConverter
-
setNotificationPreferenceConverter
public void setNotificationPreferenceConverter(Converter<CustomerModel, NotificationPreferenceData> notificationPreferenceConverter) -
getNotificationPreferencesConverter
public Converter<List<NotificationPreferenceData>,NotificationPreferenceDataList> getNotificationPreferencesConverter() -
setNotificationPreferencesConverter
public void setNotificationPreferencesConverter(Converter<List<NotificationPreferenceData>, NotificationPreferenceDataList> notificationPreferencesConverter) -
updateNotificationPreference
Description copied from interface:NotificationPreferenceFacadeUpdate the notification preference to database- Specified by:
updateNotificationPreferencein interfaceNotificationPreferenceFacade- Parameters:
notificationPreferenceData- The new notification preference to be updated
-
getNotificationPreference
Description copied from interface:NotificationPreferenceFacadeGet the notification preference- Specified by:
getNotificationPreferencein interfaceNotificationPreferenceFacade- Returns:
- The NotificationPreferenceData contains the enabled channels,and email address and mobile phone number if exist
-
updateNotificationPreference
public void updateNotificationPreference(List<NotificationPreferenceData> notificationPreferenceDataList) Description copied from interface:NotificationPreferenceFacadeUpdate the notification preference to database- Specified by:
updateNotificationPreferencein interfaceNotificationPreferenceFacade- Parameters:
notificationPreferenceDataList- The new notification preference to be updated
-
getNotificationPreferences
Description copied from interface:NotificationPreferenceFacadeGet the notification preference data list- Specified by:
getNotificationPreferencesin interfaceNotificationPreferenceFacade- Returns:
- The NotificationPreferenceDataList contains all channels info
-
getNotificationPreferences
public List<NotificationPreferenceData> getNotificationPreferences(Set<NotificationChannel> enabledChannels) Description copied from interface:NotificationPreferenceFacadeGet all notification channels according to enabledChannels- Specified by:
getNotificationPreferencesin interfaceNotificationPreferenceFacade- Parameters:
enabledChannels- the enabled channels- Returns:
- return all notification channels according to enabledChannels
-
getValidNotificationPreferences
Description copied from interface:NotificationPreferenceFacadeGet the valid notification preference data, for example the mail has mail address, the sms has phone number- Specified by:
getValidNotificationPreferencesin interfaceNotificationPreferenceFacade- Returns:
- The NotificationPreferenceDataList contains the valid channels info
-
getValidNotificationPreferences
public List<NotificationPreferenceData> getValidNotificationPreferences(Set<NotificationChannel> enabledChannels) Description copied from interface:NotificationPreferenceFacadeGet the valid notification preference data according to the enabledChannels- Specified by:
getValidNotificationPreferencesin interfaceNotificationPreferenceFacade- Parameters:
enabledChannels- the enabled channels- Returns:
- The NotificationPreferenceDataList contains the valid channels info
-
filterValidNotificationPreference
protected List<NotificationPreferenceData> filterValidNotificationPreference(List<NotificationPreferenceData> preferenceData) -
getChannelValue
Description copied from interface:NotificationPreferenceFacadeGet the channel value for channel- Specified by:
getChannelValuein interfaceNotificationPreferenceFacade- Parameters:
channel- the notification channel- Returns:
- return the related channel value for the channel
-
validateNotificationPreferenceData
-
getNotificationPreferences
public NotificationPreferenceDataList getNotificationPreferences(List<NotificationPreferenceData> notificationPreferences) Description copied from interface:NotificationPreferenceFacadeGet the notification preference data list- Specified by:
getNotificationPreferencesin interfaceNotificationPreferenceFacade- Parameters:
notificationPreferences- the notificationPreference data list- Returns:
- The NotificationPreferenceDataList contains all channels info
-
updateAllChannels
protected void updateAllChannels(List<NotificationPreferenceData> allChannels, Set<NotificationChannel> enabledChannels)
-