Class DefaultNotificationPreferenceFacade
- java.lang.Object
-
- de.hybris.platform.notificationfacades.facades.impl.DefaultNotificationPreferenceFacade
-
- All Implemented Interfaces:
NotificationPreferenceFacade
public class DefaultNotificationPreferenceFacade extends java.lang.Object implements NotificationPreferenceFacade
Facade used to get and update notification preference
-
-
Constructor Summary
Constructors Constructor Description DefaultNotificationPreferenceFacade()
-
Method Summary
-
-
-
Method Detail
-
getNotificationPreferenceEntryConverter
public Converter<NotificationChannel,NotificationPreferenceData> getNotificationPreferenceEntryConverter()
-
setNotificationPreferenceEntryConverter
public void setNotificationPreferenceEntryConverter(Converter<NotificationChannel,NotificationPreferenceData> notificationPreferenceElementConverter)
-
getNotificationService
public NotificationService getNotificationService()
-
setNotificationService
public void setNotificationService(NotificationService notificationService)
-
getModelService
public ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getUserService
public UserService getUserService()
-
setUserService
public void setUserService(UserService userService)
-
getNotificationPreferenceConverter
public Converter<CustomerModel,NotificationPreferenceData> getNotificationPreferenceConverter()
-
setNotificationPreferenceConverter
public void setNotificationPreferenceConverter(Converter<CustomerModel,NotificationPreferenceData> notificationPreferenceConverter)
-
getNotificationPreferencesConverter
public Converter<java.util.List<NotificationPreferenceData>,NotificationPreferenceDataList> getNotificationPreferencesConverter()
-
setNotificationPreferencesConverter
public void setNotificationPreferencesConverter(Converter<java.util.List<NotificationPreferenceData>,NotificationPreferenceDataList> notificationPreferencesConverter)
-
updateNotificationPreference
public void updateNotificationPreference(NotificationPreferenceData notificationPreferenceData)
Description copied from interface:NotificationPreferenceFacadeUpdate the notification preference to database- Specified by:
updateNotificationPreferencein interfaceNotificationPreferenceFacade- Parameters:
notificationPreferenceData- The new notification preference to be updated
-
getNotificationPreference
public NotificationPreferenceData 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(java.util.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
public java.util.List<NotificationPreferenceData> getNotificationPreferences()
Description copied from interface:NotificationPreferenceFacadeGet the notification preference data list- Specified by:
getNotificationPreferencesin interfaceNotificationPreferenceFacade- Returns:
- The NotificationPreferenceDataList contains all channels info
-
getNotificationPreferences
public java.util.List<NotificationPreferenceData> getNotificationPreferences(java.util.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
public java.util.List<NotificationPreferenceData> 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 java.util.List<NotificationPreferenceData> getValidNotificationPreferences(java.util.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 java.util.List<NotificationPreferenceData> filterValidNotificationPreference(java.util.List<NotificationPreferenceData> preferenceData)
-
getChannelValue
public java.lang.String getChannelValue(NotificationChannel channel)
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
protected boolean validateNotificationPreferenceData(NotificationPreferenceData data)
-
getNotificationPreferences
public NotificationPreferenceDataList getNotificationPreferences(java.util.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(java.util.List<NotificationPreferenceData> allChannels, java.util.Set<NotificationChannel> enabledChannels)
-
-