Class JPAUserSettingServiceImpl

java.lang.Object
org.exoplatform.commons.notification.impl.AbstractService
org.exoplatform.settings.jpa.JPAUserSettingServiceImpl
All Implemented Interfaces:
org.exoplatform.commons.api.notification.service.setting.UserSettingService

public class JPAUserSettingServiceImpl extends AbstractService implements org.exoplatform.commons.api.notification.service.setting.UserSettingService
  • Field Details

    • NOTIFICATION_SCOPE

      public static final org.exoplatform.commons.api.settings.data.Scope NOTIFICATION_SCOPE
      Setting Scope on Common Setting
    • NAME_PATTERN

      public static final String NAME_PATTERN
      See Also:
  • Constructor Details

    • JPAUserSettingServiceImpl

      public JPAUserSettingServiceImpl(org.exoplatform.services.organization.OrganizationService organizationService, org.exoplatform.commons.api.settings.SettingService settingService, org.exoplatform.commons.api.notification.channel.ChannelManager channelManager, org.exoplatform.commons.api.notification.service.setting.PluginSettingService pluginSettingService, org.exoplatform.commons.api.persistence.DataInitializer dataInitializer, org.exoplatform.services.listener.ListenerService listenerService) throws Exception
      This service must depend on DataInitializer to make sure data structure is created before initializing it
      Parameters:
      organizationService - OrganizationService
      settingService - SettingService
      channelManager - ChannelManager
      pluginSettingService - PluginSettingService
      dataInitializer - DataInitializer
      listenerService - ListenerService
      Throws:
      Exception
  • Method Details

    • save

      public void save(org.exoplatform.commons.api.notification.model.UserSetting model)
      Specified by:
      save in interface org.exoplatform.commons.api.notification.service.setting.UserSettingService
    • setUserEnabled

      public void setUserEnabled(String username, boolean enabled)
      Specified by:
      setUserEnabled in interface org.exoplatform.commons.api.notification.service.setting.UserSettingService
    • get

      public org.exoplatform.commons.api.notification.model.UserSetting get(String userId)
      Specified by:
      get in interface org.exoplatform.commons.api.notification.service.setting.UserSettingService
    • initDefaultSettings

      public void initDefaultSettings(String userName)
      Specified by:
      initDefaultSettings in interface org.exoplatform.commons.api.notification.service.setting.UserSettingService
    • initDefaultSettings

      public void initDefaultSettings(org.exoplatform.services.organization.User[] users)
      Specified by:
      initDefaultSettings in interface org.exoplatform.commons.api.notification.service.setting.UserSettingService
    • getDefaultSettings

      public org.exoplatform.commons.api.notification.model.UserSetting getDefaultSettings()
      Specified by:
      getDefaultSettings in interface org.exoplatform.commons.api.notification.service.setting.UserSettingService
    • getDigestSettingForAllUser

      public List<org.exoplatform.commons.api.notification.model.UserSetting> getDigestSettingForAllUser(org.exoplatform.commons.api.notification.NotificationContext notificationContext, int offset, int limit)
      Specified by:
      getDigestSettingForAllUser in interface org.exoplatform.commons.api.notification.service.setting.UserSettingService
    • getDigestDefaultSettingForAllUser

      public List<org.exoplatform.commons.api.notification.model.UserSetting> getDigestDefaultSettingForAllUser(int offset, int limit)
      Specified by:
      getDigestDefaultSettingForAllUser in interface org.exoplatform.commons.api.notification.service.setting.UserSettingService
    • saveLastReadDate

      public void saveLastReadDate(String userId, Long time)
      Specified by:
      saveLastReadDate in interface org.exoplatform.commons.api.notification.service.setting.UserSettingService
    • clearDefaultSetting

      public void clearDefaultSetting()
      Specified by:
      clearDefaultSetting in interface org.exoplatform.commons.api.notification.service.setting.UserSettingService