public class CalendarCategoriesHelper extends Object implements Component, Serviceable
| Modifier and Type | Field and Description | 
|---|---|
protected CurrentUserProvider | 
_currentUserProvider
The current user provider 
 | 
protected JSONUtils | 
_jsonUtils
Json utils 
 | 
protected UserPreferencesManager | 
_userPref
The user preferences 
 | 
static String | 
ROLE
The component role. 
 | 
protected static String | 
USER_PREF_ID
user pref id where the categories should be stored 
 | 
protected static String | 
ZONEITEMID
Parameter name for the zone item id 
 | 
| Constructor and Description | 
|---|
CalendarCategoriesHelper()  | 
| Modifier and Type | Method and Description | 
|---|---|
List<String> | 
getUserCategories(Request request)
Get the user preferences for this calendar 
 | 
List<String> | 
getUserCategories(String siteName,
                 String zoneItemId)
Get the user preferences for this calendar 
 | 
List<String> | 
getUserCategories(UserIdentity identity,
                 String siteName,
                 String zoneItemId)
Get the user preferences for this calendar 
 | 
void | 
service(ServiceManager manager)  | 
boolean | 
setUserCategories(Request request)
Set the user preferences for this calendar 
 | 
boolean | 
setUserCategories(String siteName,
                 String zoneItemId,
                 List<String> categories)
Set the user preferences for this calendar 
 | 
boolean | 
setUserCategories(UserIdentity identity,
                 String siteName,
                 String zoneItemId,
                 List<String> categories)
Set the user preferences for this calendar 
 | 
protected static final String ZONEITEMID
protected static final String USER_PREF_ID
protected CurrentUserProvider _currentUserProvider
protected UserPreferencesManager _userPref
protected JSONUtils _jsonUtils
public CalendarCategoriesHelper()
public void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic boolean setUserCategories(Request request) throws UserPreferencesException
request - the request from the serviceUserPreferencesException - impossible to set the preferencepublic boolean setUserCategories(String siteName, String zoneItemId, List<String> categories) throws UserPreferencesException
siteName - Site namezoneItemId - Zone Item Id where the service is putcategories - categories to setUserPreferencesException - impossible to set the preferencepublic boolean setUserCategories(UserIdentity identity, String siteName, String zoneItemId, List<String> categories) throws UserPreferencesException
identity - UsersiteName - Site namezoneItemId - Zone Item Id where the service is putcategories - categories to setUserPreferencesException - impossible to set the preferencepublic List<String> getUserCategories(Request request) throws UserPreferencesException
request - the request from the serviceUserPreferencesException - impossible to get the preferencepublic List<String> getUserCategories(String siteName, String zoneItemId) throws UserPreferencesException
siteName - Site namezoneItemId - Zone Item Id where the service is putUserPreferencesException - impossible to get the preferencepublic List<String> getUserCategories(UserIdentity identity, String siteName, String zoneItemId) throws UserPreferencesException
identity - UsersiteName - Site namezoneItemId - Zone Item Id where the service is putUserPreferencesException - impossible to set the preference