Record Class AbstractNotifyMentionsObserver.MentionableObject
java.lang.Object
java.lang.Record
org.ametys.cms.repository.mentions.AbstractNotifyMentionsObserver.MentionableObject
- Record Components:
- the authorcontent- 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 aMentionableObjectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theametysObjectrecord component.author()Returns the value of theauthorrecord component.content()Returns the value of thecontentrecord component.Returns the value of thecreationDaterecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.language()Returns the value of thelanguagerecord component.Returns the value of thelinkToAmetysObjectrecord component.Returns the value of thementionedUsersrecord component.final StringtoString()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 aMentionableObjectrecord class.- Parameters:
author- the value for theauthorrecord componentcontent- the value for thecontentrecord componentmentionedUsers- the value for thementionedUsersrecord componentcreationDate- the value for thecreationDaterecord componentametysObject- the value for theametysObjectrecord componentlinkToAmetysObject- the value for thelinkToAmetysObjectrecord componentlanguage- the value for thelanguagerecord 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 theauthorrecord component.- Returns:
- the value of the
authorrecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
mentionedUsers
Returns the value of thementionedUsersrecord component.- Returns:
- the value of the
mentionedUsersrecord component
-
creationDate
Returns the value of thecreationDaterecord component.- Returns:
- the value of the
creationDaterecord component
-
ametysObject
Returns the value of theametysObjectrecord component.- Returns:
- the value of the
ametysObjectrecord component
-
linkToAmetysObject
Returns the value of thelinkToAmetysObjectrecord component.- Returns:
- the value of the
linkToAmetysObjectrecord component
-
language
Returns the value of thelanguagerecord component.- Returns:
- the value of the
languagerecord component
-