Package io.goobi.viewer.managedbeans
Class AdminCommentBean
java.lang.Object
io.goobi.viewer.managedbeans.AdminCommentBean
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeleteCommentAction
(Comment comment) deleteCommentAction.deleteCommentGroupAction
(CommentGroup commentGroup) deleteCommentGroupAction.getCommentGroupsForUser
(User user) Returns the ID ofcurrentCommentGroup
.Getter for the fieldlazyModelComments
.getPageComments.Getter for the fieldselectedComment
.void
init()
boolean
void
void
void
void
saveCommentAction
(Comment comment) saveCommentAction.saveCommentGroupAction
(CommentGroup commentGroup) saveCommentGroupAction.void
setCurrentCommentGroup
(CommentGroup currentCommentGroup) void
SetscurrentCommentGroup
by loading it from the DB via the given ID.void
setSelectedComment
(Comment selectedComment) Setter for the fieldselectedComment
.void
setUserBean
(UserBean userBean) void
setUserCommentsEnabled
(boolean userCommentsEnabled)
-
Constructor Details
-
AdminCommentBean
public AdminCommentBean()
-
-
Method Details
-
init
@PostConstruct public void init() -
isUserCommentsEnabled
public boolean isUserCommentsEnabled()- Returns:
- true if comments enabled; false otherwise
-
setUserBean
-
getUserBean
-
setUserCommentsEnabled
- Parameters:
userCommentsEnabled
-- Throws:
DAOException
-
getAllCommentGroups
- Returns:
- All comment groups in the database
- Throws:
DAOException
-
getCommentGroupsForUser
- Parameters:
user
- Current user- Returns:
- Filtered list of available
CommentGroup
s to the given user - Throws:
DAOException
-
resetCurrentCommentGroupAction
public void resetCurrentCommentGroupAction() -
newCurrentCommentGroupAction
public void newCurrentCommentGroupAction() -
saveCurentCommentGroupAction
- Returns:
- Navigation outcome
- Throws:
DAOException
-
saveCommentGroupAction
saveCommentGroupAction.
- Parameters:
commentGroup
- aCommentGroup
object.- Returns:
- Navigation outcome
- Throws:
DAOException
- if any.
-
deleteCommentGroupAction
deleteCommentGroupAction.
- Parameters:
commentGroup
- aCommentGroup
object.- Returns:
- Navigation outcome
- Throws:
DAOException
- if any.
-
resetCurrentCommentAction
public void resetCurrentCommentAction() -
saveCommentAction
saveCommentAction.
- Parameters:
comment
- aComment
object.- Throws:
DAOException
- if any.
-
deleteCommentAction
deleteCommentAction.
- Parameters:
comment
- aComment
object.- Returns:
- a
String
object. - Throws:
DAOException
- if any.
-
getLazyModelComments
Getter for the field
lazyModelComments
.- Returns:
- the lazyModelComments
-
getPageComments
getPageComments.
- Returns:
- a
List
object.
-
getCurrentCommentGroup
- Returns:
- the currentCommentGroup
-
setCurrentCommentGroup
- Parameters:
currentCommentGroup
- the currentCommentGroup to set
-
getCurrentCommentGroupId
Returns the ID ofcurrentCommentGroup
.- Returns:
- currentCommentGroup.id
-
setCurrentCommentGroupId
SetscurrentCommentGroup
by loading it from the DB via the given ID.- Parameters:
id
-- Throws:
DAOException
-
getSelectedComment
Getter for the field
selectedComment
.- Returns:
- the selectedComment
-
setSelectedComment
Setter for the field
selectedComment
.- Parameters:
selectedComment
- the selectedComment to set
-