Class AbstractItemsAction
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.acting.AbstractAction
org.apache.cocoon.acting.ServiceableAction
org.ametys.plugins.frontnotification.userprefs.AbstractItemsAction
- All Implemented Interfaces:
Component
,LogEnabled
,Serviceable
,Action
- Direct Known Subclasses:
GetReadItemsAction
,SaveReadItemsAction
Abstract classes for flash info user preferences
-
Field Summary
Modifier and TypeFieldDescriptionprotected CurrentUserProvider
The current user providerprotected UserPreferencesManager
The user preferences managerstatic final String
The id of user preference for flash info contentsFields inherited from class org.apache.cocoon.acting.ServiceableAction
manager
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetReadItems
(UserIdentity user, String siteName) Get the ids of read flash infosprotected void
saveReadItems
(UserIdentity owner, List<String> itemIds, String siteName) Save the ids of read items in user preferencesvoid
service
(ServiceManager smanager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
FLASHINFO_USER_PREF_ITEM_IDS
The id of user preference for flash info contents- See Also:
-
_currentUserProvider
The current user provider -
_userPrefManager
The user preferences manager
-
-
Constructor Details
-
AbstractItemsAction
public AbstractItemsAction()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classServiceableAction
- Throws:
ServiceException
-
getReadItems
protected List<String> getReadItems(UserIdentity user, String siteName) throws UserPreferencesException Get the ids of read flash infos- Parameters:
user
- the usersiteName
- the site name- Returns:
- the ids of read contents
- Throws:
UserPreferencesException
- if failed to retrieve user preferences
-
saveReadItems
protected void saveReadItems(UserIdentity owner, List<String> itemIds, String siteName) throws UserPreferencesException Save the ids of read items in user preferences- Parameters:
owner
- the useritemIds
- the id of read itemssiteName
- the site name- Throws:
UserPreferencesException
- if failed to save user preferences
-