Record Class AbstractNotifyMentionsObserver.MentionableObject
java.lang.Object
java.lang.Record
org.ametys.cms.repository.mentions.AbstractNotifyMentionsObserver.MentionableObject
- Record Components:
- the author
content
- the contentmentionedUsers
- the mentioned users in the mentionable objectcreationDate
- the creation dateametysObject
- the ametys object holding the mentionable objectlinkToAmetysObject
- the link of the ametys objectlanguage
- the language
- Enclosing class:
AbstractNotifyMentionsObserver<T extends AmetysObject>
public static record AbstractNotifyMentionsObserver.MentionableObject(User author, String content, Collection<UserIdentity> mentionedUsers, ZonedDateTime creationDate, AmetysObject ametysObject, AbstractNotifyMentionsObserver.LinkToAmetysObject linkToAmetysObject, String language)
extends Record
A record to get all information of the mentionable object
-
Constructor Summary
ConstructorsConstructorDescriptionMentionableObject
(User author, String content, Collection<UserIdentity> mentionedUsers, ZonedDateTime creationDate, AmetysObject ametysObject, AbstractNotifyMentionsObserver.LinkToAmetysObject linkToAmetysObject, String language) Creates an instance of aMentionableObject
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theametysObject
record component.author()
Returns the value of theauthor
record component.content()
Returns the value of thecontent
record component.Returns the value of thecreationDate
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.language()
Returns the value of thelanguage
record component.Returns the value of thelinkToAmetysObject
record component.Returns the value of thementionedUsers
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
MentionableObject
public MentionableObject(User author, String content, Collection<UserIdentity> mentionedUsers, ZonedDateTime creationDate, AmetysObject ametysObject, AbstractNotifyMentionsObserver.LinkToAmetysObject linkToAmetysObject, String language) Creates an instance of aMentionableObject
record class.- Parameters:
author
- the value for theauthor
record componentcontent
- the value for thecontent
record componentmentionedUsers
- the value for thementionedUsers
record componentcreationDate
- the value for thecreationDate
record componentametysObject
- the value for theametysObject
record componentlinkToAmetysObject
- the value for thelinkToAmetysObject
record componentlanguage
- the value for thelanguage
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
author
Returns the value of theauthor
record component.- Returns:
- the value of the
author
record component
-
content
Returns the value of thecontent
record component.- Returns:
- the value of the
content
record component
-
mentionedUsers
Returns the value of thementionedUsers
record component.- Returns:
- the value of the
mentionedUsers
record component
-
creationDate
Returns the value of thecreationDate
record component.- Returns:
- the value of the
creationDate
record component
-
ametysObject
Returns the value of theametysObject
record component.- Returns:
- the value of the
ametysObject
record component
-
linkToAmetysObject
Returns the value of thelinkToAmetysObject
record component.- Returns:
- the value of the
linkToAmetysObject
record component
-
language
Returns the value of thelanguage
record component.- Returns:
- the value of the
language
record component
-