Package io.goobi.viewer.managedbeans
Class AdminCommentBean
java.lang.Object
io.goobi.viewer.managedbeans.AdminCommentBean
- All Implemented Interfaces:
Serializable
AdminCommentBean class.
- See Also:
-
Constructor Summary
-
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
.void
init()
init.boolean
isUserCommentsEnabled.void
newCurrentCommentGroupAction.void
resetCurrentCommentAction.void
resetCurrentCommentGroupAction.void
saveCommentAction
(Comment comment) saveCommentAction.saveCommentGroupAction
(CommentGroup commentGroup) saveCommentGroupAction.saveCurentCommentGroupAction.void
setCurrentCommentGroup
(CommentGroup currentCommentGroup) Setter for the fieldcurrentCommentGroup
.void
SetscurrentCommentGroup
by loading it from the DB via the given ID.void
setSelectedComment
(Comment selectedComment) Setter for the fieldselectedComment
.void
setUserBean
(UserBean userBean) Setter for the fielduserBean
.void
setUserCommentsEnabled
(boolean userCommentsEnabled) setUserCommentsEnabled.
-
Constructor Details
-
AdminCommentBean
public AdminCommentBean()
-
-
Method Details
-
init
@PostConstruct public void init()init.
-
isUserCommentsEnabled
public boolean isUserCommentsEnabled()isUserCommentsEnabled.
- Returns:
- true if comments enabled; false otherwise
-
setUserBean
Setter for the field
userBean
.- Parameters:
userBean
- aUserBean
object
-
getUserBean
Getter for the field
userBean
.- Returns:
- a
UserBean
object
-
setUserCommentsEnabled
setUserCommentsEnabled.
- Parameters:
userCommentsEnabled
- a boolean- Throws:
DAOException
-
getAllCommentGroups
getAllCommentGroups.
- Returns:
- All comment groups in the database
- Throws:
DAOException
-
getCommentGroupsForUser
getCommentGroupsForUser.
- Parameters:
user
- Current user- Returns:
- Filtered list of available
CommentGroup
s 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
- 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()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
Getter for the field
currentCommentGroup
.- Returns:
- the currentCommentGroup
-
setCurrentCommentGroup
Setter for the field
currentCommentGroup
.- 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
- aLong
object- Throws:
DAOException
-
getSelectedComment
Getter for the field
selectedComment
.- Returns:
- the selectedComment
-
setSelectedComment
Setter for the field
selectedComment
.- Parameters:
selectedComment
- the selectedComment to set
-