Interface UserSettingService
-
public interface UserSettingService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description UserSettingget(String userId)Gets the notification settings of a user by his remote Id.UserSettinggetDefaultSettings()Returns the default settings of an userList<UserSetting>getDigestDefaultSettingForAllUser(int offset, int limit)Gets all settings of users registering for default daily notifications.List<UserSetting>getDigestSettingForAllUser(NotificationContext context, int offset, int limit)Gets the list of user settings which has at least the plug-in to be configured by weekly or daily.voidinitDefaultSettings(String userId)Adds the default settings to a user's node.voidinitDefaultSettings(org.exoplatform.services.organization.User[] users)Adds the default settings to a list of users.voidsave(UserSetting notificationSetting)Saves the notification settings of a user.voidsaveLastReadDate(String userId, Long time)Stores the read time point when user clicks mark all read his/her messages.voidsetUserEnabled(String username, boolean enabled)Enables user settings
-
-
-
Method Detail
-
save
void save(UserSetting notificationSetting)
Saves the notification settings of a user.- Parameters:
notificationSetting- The notification settings.
-
get
UserSetting get(String userId)
Gets the notification settings of a user by his remote Id.- Parameters:
userId- The user's remote Id.- Returns:
- The notification settings.
-
getDigestSettingForAllUser
List<UserSetting> getDigestSettingForAllUser(NotificationContext context, int offset, int limit)
Gets the list of user settings which has at least the plug-in to be configured by weekly or daily. the weekly or daily condition input by NotificationContext.- Parameters:
context- the weekly or daily conditionoffset- The start point from which the user settings are got.limit- The limited number of user settings.- Returns:
- The list of user settings.
-
getDigestDefaultSettingForAllUser
List<UserSetting> getDigestDefaultSettingForAllUser(int offset, int limit)
Gets all settings of users registering for default daily notifications.- Parameters:
offset- The start point from which the user settings are got.limit- The limited number of user settings.- Returns:
- The list of user settings.
-
initDefaultSettings
void initDefaultSettings(String userId)
Adds the default settings to a user's node.- Parameters:
userId- The user's remote Id.
-
initDefaultSettings
void initDefaultSettings(org.exoplatform.services.organization.User[] users)
Adds the default settings to a list of users.- Parameters:
users- The list of users.
-
getDefaultSettings
UserSetting getDefaultSettings()
Returns the default settings of an user- Returns:
-
saveLastReadDate
void saveLastReadDate(String userId, Long time)
Stores the read time point when user clicks mark all read his/her messages. This value will be using to decide the read status of message. + If less than the read time point, Read = TRUE + Else depends on the the status of the message- Parameters:
userId- The user's idtime- The time milliseconds- Since:
- PLF 4.2
- eXo level API
- Platform
-
setUserEnabled
void setUserEnabled(String username, boolean enabled)
Enables user settings- Parameters:
username- user idenabled- true/false
-
-