Class WorkspaceViewUserPreferencesDAO
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.AbstractWorkspaceDAO
org.ametys.plugins.workspaces.preferences.WorkspaceViewUserPreferencesDAO
- All Implemented Interfaces:
LogEnabled,Component,Contextualizable,Serviceable
DAO for workspaces view user preferences, such as choosing between cards or list view
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected UserPreferencesManagerThe user preferencesstatic final StringAvalon Rolestatic final Stringthe user preferences context for workspaces viewFields inherited from class org.ametys.plugins.workspaces.AbstractWorkspaceDAO
_context, _currentUserProvider, _observationManager, _projectManager, _projectRightHelper, _projectTagsDAO, _resolver, _richTextTransformer, _rightManager, _userManager, _workflowHelper, _workflowProvider, _workspaceHelper, _workspaceModuleEP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetUserPreference(String moduleId) Get the view preference of the current user on given modulevoidservice(ServiceManager manager) voidsetUserPreference(String moduleId, String preferences) Update the user preferences of current user for a view on given moduleMethods inherited from class org.ametys.plugins.workspaces.AbstractWorkspaceDAO
_checkReadAccess, _checkUserReadingRights, _checkUserRights, _handleTags, _hasAfterSubComments, _setAttachments, answerComment, contextualize, createComment, deleteComment, editComment, getProjectName, getSitemapLanguage, getSiteName, likeOrUnlikeCommentMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon Role -
VIEW_USER_PREF_CONTEXT
the user preferences context for workspaces view- See Also:
-
_userPrefsManager
The user preferences
-
-
Constructor Details
-
WorkspaceViewUserPreferencesDAO
public WorkspaceViewUserPreferencesDAO()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractWorkspaceDAO- Throws:
ServiceException
-
setUserPreference
Update the user preferences of current user for a view on given module- Parameters:
moduleId- the module idpreferences- the preferences value
-
getUserPreference
Get the view preference of the current user on given module- Parameters:
moduleId- the module id- Returns:
- the view preference (true for grid, false for list)
-