public class FilteredEventsUserPreferencesManager extends Object implements Component, Serviceable
Modifier and Type | Field and Description |
---|---|
private CurrentUserProvider |
_currentUserProvider
The current user provider
|
private JSONUtils |
_jsonUtils
Utility method for JSON strings
|
private UserPreferencesManager |
_userPreferencesManager
The manager of user preferences for the front-office
|
static String |
ROLE
The Avalon role
|
Constructor and Description |
---|
FilteredEventsUserPreferencesManager() |
Modifier and Type | Method and Description |
---|---|
private Map<String,String> |
_getContextVars(String siteName) |
Map<String,Object> |
getUserPreferences(String siteName,
String zoneItemId)
Get the preferences of the current user
|
void |
service(ServiceManager serviceManager) |
void |
setUserPreferences(String siteName,
String zoneItemId,
String view,
List<String> calendarIds,
List<String> tagIds)
Set the preferences of the current user for the filtered events service
|
private CurrentUserProvider _currentUserProvider
private UserPreferencesManager _userPreferencesManager
private JSONUtils _jsonUtils
public FilteredEventsUserPreferencesManager()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
ServiceException
public void setUserPreferences(String siteName, String zoneItemId, String view, List<String> calendarIds, List<String> tagIds) throws UserPreferencesException
siteName
- the name of the sitezoneItemId
- the id of the involved zone itemview
- the view used to display the filtered eventscalendarIds
- the ids of the calendars to use as a filtertagIds
- the ids of the tags to use as a filterUserPreferencesException
- if an error occurs while setting the user preferencespublic Map<String,Object> getUserPreferences(String siteName, String zoneItemId) throws UserPreferencesException
siteName
- the name of the sitezoneItemId
- the id of the invovlved zone itemUserPreferencesException
- if an error occurs while retrieving the preferences of the current userprivate Map<String,String> _getContextVars(String siteName)