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 SummaryFieldsModifier and TypeFieldDescriptionprotected CurrentUserProviderThe current user providerprotected UserPreferencesManagerThe user preferences managerstatic final StringThe id of user preference for flash info contentsFields inherited from class org.apache.cocoon.acting.ServiceableActionmanagerFields inherited from class org.apache.cocoon.acting.AbstractActionEMPTY_MAP
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetReadItems(UserIdentity user, String siteName) Get the ids of read flash infosprotected voidsaveReadItems(UserIdentity owner, List<String> itemIds, String siteName) Save the ids of read items in user preferencesvoidservice(ServiceManager smanager) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabledenableLogging, getLogger, setupLogger, setupLogger, setupLogger
- 
Field Details- 
FLASHINFO_USER_PREF_ITEM_IDSThe id of user preference for flash info contents- See Also:
 
- 
_currentUserProviderThe current user provider
- 
_userPrefManagerThe user preferences manager
 
- 
- 
Constructor Details- 
AbstractItemsActionpublic AbstractItemsAction()
 
- 
- 
Method Details- 
service- Specified by:
- servicein interface- Serviceable
- Overrides:
- servicein class- ServiceableAction
- Throws:
- ServiceException
 
- 
getReadItemsprotected List<String> getReadItems(UserIdentity user, String siteName) throws UserPreferencesException Get the ids of read flash infos- Parameters:
- user- the user
- siteName- the site name
- Returns:
- the ids of read contents
- Throws:
- UserPreferencesException- if failed to retrieve user preferences
 
- 
saveReadItemsprotected void saveReadItems(UserIdentity owner, List<String> itemIds, String siteName) throws UserPreferencesException Save the ids of read items in user preferences- Parameters:
- owner- the user
- itemIds- the id of read items
- siteName- the site name
- Throws:
- UserPreferencesException- if failed to save user preferences
 
 
-