Class CommentLegacy
java.lang.Object
io.goobi.viewer.model.annotation.comments.CommentLegacy
- All Implemented Interfaces:
Comparable<CommentLegacy>
Comment class.
-
Constructor Summary
ConstructorDescriptionConstructor for Comment.CommentLegacy
(String pi, int page, User owner, String text, CommentLegacy parent) Constructor for Comment. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Removes any script tags from the text value.int
Getter for the fielddateCreated
.Getter for the fielddateUpdated
.getDisplayDate
(LocalDateTime date) getDisplayDate.getDisplayText.getId()
Getter for the fieldid
.Getter for the fieldoldText
.getOwner()
Getter for the fieldowner
.getPage()
Getter for the fieldpage
.getPi()
Getter for the fieldpi
.getText()
Getter for the fieldtext
.boolean
Checks whether the user with the given ID is allowed to edit this comment (i.e. the annotation belongs to this (proper) user.static boolean
sendEmailNotifications
(CommentLegacy comment, String oldText, Locale locale) Sends an email notification about a new or altered comment to the configured recipient addresses.void
setDateCreated
(LocalDateTime dateCreated) Setter for the fielddateCreated
.void
setDateUpdated
(LocalDateTime dateUpdated) Setter for the fielddateUpdated
.void
Setter for the fieldid
.void
Setter for the fieldowner
.void
Setter for the fieldpage
.void
Setter for the fieldpi
.void
Setter for the fieldtext
.
-
Constructor Details
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<CommentLegacy>
-
sendEmailNotifications
Sends an email notification about a new or altered comment to the configured recipient addresses. -
mayEdit
Checks whether the user with the given ID is allowed to edit this comment (i.e. the annotation belongs to this (proper) user.- Parameters:
user
- aUser
object.- Returns:
- true if allowed; false otherwise
-
getDisplayDate
getDisplayDate.
- Parameters:
date
- aLocalDateTime
object.- Returns:
- a
String
object.
-
checkAndCleanScripts
public void checkAndCleanScripts()Removes any script tags from the text value. -
getId
Getter for the field
id
.- Returns:
- the id
-
setId
Setter for the field
id
.- Parameters:
id
- the id to set
-
getPi
Getter for the field
pi
.- Returns:
- the pi
-
setPi
Setter for the field
pi
.- Parameters:
pi
- the pi to set
-
getPage
Getter for the field
page
.- Returns:
- the page
-
setPage
Setter for the field
page
.- Parameters:
page
- the page to set
-
getOwner
Getter for the field
owner
.- Returns:
- the owner
-
setOwner
Setter for the field
owner
.- Parameters:
owner
- the owner to set
-
setText
Setter for the field
text
.- Parameters:
text
- the text to set
-
getText
Getter for the field
text
.- Returns:
- the text
-
getDisplayText
getDisplayText.
- Returns:
- a
String
object.
-
getOldText
Getter for the field
oldText
.- Returns:
- the oldText
-
getDateCreated
Getter for the field
dateCreated
.- Returns:
- the dateCreated
-
setDateCreated
Setter for the field
dateCreated
.- Parameters:
dateCreated
- the dateCreated to set
-
getDateUpdated
Getter for the field
dateUpdated
.- Returns:
- the dateUpdated
-
setDateUpdated
Setter for the field
dateUpdated
.- Parameters:
dateUpdated
- the dateUpdated to set
-
getLinkToRecord
-