Class AdminCommentBean

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

@Named @SessionScoped public class AdminCommentBean extends Object implements Serializable

AdminCommentBean class.

See Also:
  • 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

      public void setUserBean(UserBean userBean)

      Setter for the field userBean.

      Parameters:
      userBean - a UserBean object
    • getUserBean

      public UserBean getUserBean()

      Getter for the field userBean.

      Returns:
      a UserBean object
    • setUserCommentsEnabled

      public void setUserCommentsEnabled(boolean userCommentsEnabled) throws DAOException

      setUserCommentsEnabled.

      Parameters:
      userCommentsEnabled - a boolean
      Throws:
      DAOException
    • getAllCommentGroups

      public List<CommentGroup> getAllCommentGroups() throws DAOException

      getAllCommentGroups.

      Returns:
      All comment groups in the database
      Throws:
      DAOException
    • getCommentGroupsForUser

      public List<CommentGroup> getCommentGroupsForUser(User user) throws DAOException

      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

      public String saveCurentCommentGroupAction() throws DAOException

      saveCurentCommentGroupAction.

      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()

      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()

      Getter for the field currentCommentGroup.

      Returns:
      the currentCommentGroup
    • setCurrentCommentGroup

      public void setCurrentCommentGroup(CommentGroup currentCommentGroup)

      Setter for the field 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 - a Long object
      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