Package io.goobi.viewer.managedbeans
Class AdminCommentBean
java.lang.Object
io.goobi.viewer.managedbeans.AdminCommentBean
- All Implemented Interfaces:
Serializable
JSF backing bean for admin comment management, providing CRUD operations for user comments in the admin interface.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeleteCommentAction(Comment comment) deleteCommentAction.deleteCommentGroupAction(CommentGroup commentGroup) deleteCommentGroupAction.getAllCommentGroups.getCommentGroupsForUser(User user) getCommentGroupsForUser.Getter for the fieldcurrentCommentGroup.Returns the ID ofcurrentCommentGroup.Getter for the fieldlazyModelComments.getPageComments.Getter for the fieldselectedComment.Getter for the fielduserBean.voidinit()init.booleanisUserCommentsEnabled.voidnewCurrentCommentGroupAction.voidresetCurrentCommentAction.voidresetCurrentCommentGroupAction.voidsaveCommentAction(Comment comment) saveCommentAction.saveCommentGroupAction(CommentGroup commentGroup) saveCommentGroupAction.saveCurentCommentGroupAction.voidsetCurrentCommentGroup(CommentGroup currentCommentGroup) Setter for the fieldcurrentCommentGroup.voidSetscurrentCommentGroupby loading it from the DB via the given ID.voidsetSelectedComment(Comment selectedComment) Setter for the fieldselectedComment.voidsetUserBean(UserBean userBean) Setter for the fielduserBean.voidsetUserCommentsEnabled(boolean userCommentsEnabled) setUserCommentsEnabled.
-
Constructor Details
-
AdminCommentBean
public AdminCommentBean()
-
-
Method Details
-
init
init.
-
isUserCommentsEnabled
public boolean isUserCommentsEnabled()isUserCommentsEnabled.
- Returns:
- true if comments enabled; false otherwise
-
setUserBean
Setter for the field
userBean.- Parameters:
userBean- injected user session bean
-
getUserBean
Getter for the field
userBean.- Returns:
- the injected UserBean
-
setUserCommentsEnabled
setUserCommentsEnabled.
- Parameters:
userCommentsEnabled- true to enable comments; false to disable- Throws:
DAOException
-
getAllCommentGroups
getAllCommentGroups.
- Returns:
- All comment groups in the database
- Throws:
DAOException
-
getCommentGroupsForUser
getCommentGroupsForUser.
- Parameters:
user- Current user- Returns:
- Filtered list of available
CommentGroups to the given user - Throws:
DAOException
-
resetCurrentCommentGroupAction
public void resetCurrentCommentGroupAction()resetCurrentCommentGroupAction.
-
newCurrentCommentGroupAction
public void newCurrentCommentGroupAction()newCurrentCommentGroupAction.
-
saveCurentCommentGroupAction
saveCurentCommentGroupAction.
- Returns:
- Navigation outcome
- Throws:
DAOException
-
saveCommentGroupAction
saveCommentGroupAction.- Parameters:
commentGroup- comment group to persist or update- Returns:
- Navigation outcome
- Throws:
DAOException- if any.
-
deleteCommentGroupAction
deleteCommentGroupAction.- Parameters:
commentGroup- comment group to delete from the database- Returns:
- Navigation outcome
- Throws:
DAOException- if any.
-
resetCurrentCommentAction
public void resetCurrentCommentAction()resetCurrentCommentAction.
-
saveCommentAction
saveCommentAction.- Parameters:
comment- comment to persist or update- Throws:
DAOException- if any.
-
deleteCommentAction
deleteCommentAction.- Parameters:
comment- comment to delete from the database- Returns:
- empty navigation outcome string
- Throws:
DAOException- if any.
-
getLazyModelComments
Getter for the fieldlazyModelComments.- Returns:
- the
TableDataProviderused for paginated comment listing in the admin interface
-
getPageComments
getPageComments.- Returns:
- a list of comments for the current page in the paginated comment list
-
getCurrentCommentGroup
Getter for the field
currentCommentGroup.- Returns:
- the
CommentGroupcurrently active in the admin interface, or null if none selected
-
setCurrentCommentGroup
Setter for the field
currentCommentGroup.- Parameters:
currentCommentGroup- comment group to set as active and reload the table for
-
getCurrentCommentGroupId
Returns the ID ofcurrentCommentGroup.- Returns:
- currentCommentGroup.id
-
setCurrentCommentGroupId
SetscurrentCommentGroupby loading it from the DB via the given ID.- Parameters:
id- database ID of the comment group to load- Throws:
DAOException
-
getSelectedComment
Getter for the fieldselectedComment.- Returns:
- the
Commentcurrently selected for editing or deletion, or null if none selected
-
setSelectedComment
Setter for the fieldselectedComment.- Parameters:
selectedComment- comment selected for editing or deletion
-