Package io.goobi.viewer.managedbeans
Class UserDataBean
java.lang.Object
io.goobi.viewer.managedbeans.UserDataBean
- All Implemented Interfaces:
Serializable
JSF backing bean providing user profile management and account settings for authenticated users.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeleteSearchAction(Search search) Deletes the given persistent user search.longgetAnnotationCount.getAnnotations.getBookmarkListsForUser(User user, int numEntries) getBookmarkListsForUser.longGetter for the fieldcommentCount.getLatestActivity(User user, int numEntries) getLatestActivity.getLatestComments(User user, int numEntries) getLatestComments.Getter for the fieldlazyModelAnnotations.Getter for the fieldlazyModelComments.longgetNumAnnotations(User user) getNumAnnotations.longgetNumBookmarkLists(User user) getNumBookmarkLists.longgetNumComments(User user) getNumComments.getNumRecordsWithComments.longgetNumSearches(User user) getNumSearches.getSearches(User user, Integer numEntries) Returns saved searches for the logged in user.voidinit()Initializes all campaigns as lazily loaded list.voidsetBreadcrumbBean(UserBean userBean) Required setter for ManagedProperty injection.
-
Constructor Details
-
UserDataBean
public UserDataBean()
-
-
Method Details
-
setBreadcrumbBean
Required setter for ManagedProperty injection.- Parameters:
userBean- the UserBean instance to inject for testing
-
init
Initializes all campaigns as lazily loaded list.- Throws:
DAOException
-
getSearches
Returns saved searches for the logged in user.- Parameters:
user- owner of the saved searches to retrievenumEntries- maximum number of results; null means no limit- Returns:
- a list of saved searches for the given user, sorted by last update date descending
- Throws:
DAOException- if any.
-
getAnnotations
getAnnotations.
- Returns:
- List of annotations for the logged in user
- Throws:
DAOException
-
deleteSearchAction
Deletes the given persistent user search.- Parameters:
search- saved search query to delete- Returns:
- empty navigation outcome string
- Throws:
DAOException- if any.
-
getLazyModelAnnotations
Getter for the fieldlazyModelAnnotations.- Returns:
- the lazy-loading table data provider for the current user's annotations
-
getLazyModelComments
Getter for the field
lazyModelComments.- Returns:
- the TableDataProvider for the user's comment history
-
getNumBookmarkLists
getNumBookmarkLists.
- Parameters:
user- owner whose bookmark lists are counted- Returns:
- the total number of bookmark lists owned by the given user
- Throws:
DAOException- if any.
-
getNumSearches
getNumSearches.
- Parameters:
user- owner whose saved searches are counted- Returns:
- the total number of saved searches belonging to the given user
- Throws:
DAOException- if any.
-
getNumComments
getNumComments.
- Parameters:
user- owner whose comments are counted- Returns:
- Number of comments in the DB for the given user
- Throws:
DAOException
-
getNumAnnotations
getNumAnnotations.
- Parameters:
user- creator whose crowdsourcing annotations are counted- Returns:
- the total number of crowdsourcing annotations created by the given user
- Throws:
DAOException- if any.
-
getNumRecordsWithComments
getNumRecordsWithComments.
- Parameters:
user- owner whose commented records are counted- Returns:
- the number of distinct records with comments for the given user
- Throws:
DAOException- if any.
-
getAnnotationCount
getAnnotationCount.
- Returns:
- the total number of annotations created by the currently logged-in user, or 0 if no user is logged in
- Throws:
DAOException- if any.
-
getCommentCount
Getter for the field
commentCount.- Returns:
- the total number of comments created by the currently logged-in user
- Throws:
DAOException- if any.
-
getLatestComments
getLatestComments.
- Parameters:
user- owner whose comments to retrievenumEntries- maximum number of comments to return- Returns:
- List of comments for the given user
- Throws:
DAOException
-
getBookmarkListsForUser
getBookmarkListsForUser.
- Parameters:
user- owner whose bookmark lists are retrievednumEntries- maximum number of lists to return- Returns:
- a list of bookmark lists owned by the given user, sorted and limited to the specified count
- Throws:
DAOException- if any.
-
getLatestActivity
getLatestActivity.
- Parameters:
user- user whose recent activity is retrievednumEntries- maximum number of activity entries to return- Returns:
- a list of recent user activity entries (searches, bookmarks, comments) for the given user
- Throws:
DAOException- if any.
-