Class AdminCommentBean

java.lang.Object
io.goobi.viewer.managedbeans.AdminCommentBean
All Implemented Interfaces:
Serializable

@Named @SessionScoped public class AdminCommentBean extends Object implements Serializable
See Also:
  • Constructor Details

    • AdminCommentBean

      public AdminCommentBean()
  • Method Details

    • init

      @PostConstruct public void init()
    • isUserCommentsEnabled

      public boolean isUserCommentsEnabled()
      Returns:
      true if comments enabled; false otherwise
    • setUserBean

      public void setUserBean(UserBean userBean)
    • getUserBean

      public UserBean getUserBean()
    • setUserCommentsEnabled

      public void setUserCommentsEnabled(boolean userCommentsEnabled) throws DAOException
      Parameters:
      userCommentsEnabled -
      Throws:
      DAOException
    • getAllCommentGroups

      public List<CommentGroup> getAllCommentGroups() throws DAOException
      Returns:
      All comment groups in the database
      Throws:
      DAOException
    • getCommentGroupsForUser

      public List<CommentGroup> getCommentGroupsForUser(User user) throws DAOException
      Parameters:
      user - Current user
      Returns:
      Filtered list of available CommentGroups to the given user
      Throws:
      DAOException
    • resetCurrentCommentGroupAction

      public void resetCurrentCommentGroupAction()
    • newCurrentCommentGroupAction

      public void newCurrentCommentGroupAction()
    • saveCurentCommentGroupAction

      public String saveCurentCommentGroupAction() throws DAOException
      Returns:
      Navigation outcome
      Throws:
      DAOException
    • saveCommentGroupAction

      public String saveCommentGroupAction(CommentGroup commentGroup) throws DAOException

      saveCommentGroupAction.

      Parameters:
      commentGroup - a CommentGroup object.
      Returns:
      Navigation outcome
      Throws:
      DAOException - if any.
    • deleteCommentGroupAction

      public String deleteCommentGroupAction(CommentGroup commentGroup) throws DAOException

      deleteCommentGroupAction.

      Parameters:
      commentGroup - a CommentGroup object.
      Returns:
      Navigation outcome
      Throws:
      DAOException - if any.
    • resetCurrentCommentAction

      public void resetCurrentCommentAction()
    • saveCommentAction

      public void saveCommentAction(Comment comment) throws DAOException

      saveCommentAction.

      Parameters:
      comment - a Comment object.
      Throws:
      DAOException - if any.
    • deleteCommentAction

      public String deleteCommentAction(Comment comment) throws DAOException

      deleteCommentAction.

      Parameters:
      comment - a Comment object.
      Returns:
      a String object.
      Throws:
      DAOException - if any.
    • getLazyModelComments

      public TableDataProvider<Comment> getLazyModelComments()

      Getter for the field lazyModelComments.

      Returns:
      the lazyModelComments
    • getPageComments

      public List<Comment> getPageComments()

      getPageComments.

      Returns:
      a List object.
    • getCurrentCommentGroup

      public CommentGroup getCurrentCommentGroup()
      Returns:
      the currentCommentGroup
    • setCurrentCommentGroup

      public void setCurrentCommentGroup(CommentGroup currentCommentGroup)
      Parameters:
      currentCommentGroup - the currentCommentGroup to set
    • getCurrentCommentGroupId

      public Long getCurrentCommentGroupId()
      Returns the ID of currentCommentGroup.
      Returns:
      currentCommentGroup.id
    • setCurrentCommentGroupId

      public void setCurrentCommentGroupId(Long id) throws DAOException
      Sets currentCommentGroup by loading it from the DB via the given ID.
      Parameters:
      id -
      Throws:
      DAOException
    • getSelectedComment

      public Comment getSelectedComment()

      Getter for the field selectedComment.

      Returns:
      the selectedComment
    • setSelectedComment

      public void setSelectedComment(Comment selectedComment)

      Setter for the field selectedComment.

      Parameters:
      selectedComment - the selectedComment to set