Class CommentLegacy
java.lang.Object
io.goobi.viewer.model.annotation.comments.CommentLegacy
- All Implemented Interfaces:
Comparable<CommentLegacy>
Comment class.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for Comment.CommentLegacy(String pi, int page, User owner, String text, CommentLegacy parent) Constructor for Comment. -
Method Summary
Modifier and TypeMethodDescriptionvoidRemoves any script tags from the text value.intGetter 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.booleanChecks whether the user with the given ID is allowed to edit this comment (i.e. the annotation belongs to this (proper) user.static booleansendEmailNotifications(CommentLegacy comment, String oldText, Locale locale) Sends an email notification about a new or altered comment to the configured recipient addresses.voidsetDateCreated(LocalDateTime dateCreated) Setter for the fielddateCreated.voidsetDateUpdated(LocalDateTime dateUpdated) Setter for the fielddateUpdated.voidSetter for the fieldid.voidSetter for the fieldowner.voidSetter for the fieldpage.voidSetter for the fieldpi.voidSetter for the fieldtext.
-
Constructor Details
-
Method Details
-
compareTo
- Specified by:
compareToin 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- aUserobject.- Returns:
- true if allowed; false otherwise
-
getDisplayDate
getDisplayDate.
- Parameters:
date- aLocalDateTimeobject.- Returns:
- a
Stringobject.
-
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
Stringobject.
-
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
-