Class MessageModel
java.lang.Object
de.xima.fc.user_portal.view_model.messages.MessageModel
- All Implemented Interfaces:
IUserPortalChatEntryViewModel, Serializable
Message model class with builder pattern.
- Since:
- 8.4.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic MessageModelforMessage(BaseFormRecordMessageResource resource) getFormattedSendTime(Locale locale) Get the sender name.Get the subject of the chat entry.Get the sent time.getUuid()booleanbooleanCheck if the chat entry has a footer.booleanbooleanisFirstMessageOfDay(List<MessageModel> messages) booleanCheck if the chat entry is a message sent by the current user.booleanisRead()voidsetRelatedUploadModel(PendingUploadRequestModel relatedUploadModel) booleanShow the received message if it is not an own message and there are no upload requests with files.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface IUserPortalChatEntryViewModel
getSenderInitials
-
Method Details
-
forMessage
-
getAttachments
-
getContent
-
getFormattedSendTime
-
getSenderName
Description copied from interface:IUserPortalChatEntryViewModelGet the sender name.- Specified by:
getSenderNamein interfaceIUserPortalChatEntryViewModel- Returns:
- the sender name
-
getTimestamp
Description copied from interface:IUserPortalChatEntryViewModelGet the sent time.- Specified by:
getTimestampin interfaceIUserPortalChatEntryViewModel- Returns:
- the sent time
-
getSubject
Description copied from interface:IUserPortalChatEntryViewModelGet the subject of the chat entry.- Specified by:
getSubjectin interfaceIUserPortalChatEntryViewModel- Returns:
- the subject of the chat entry
-
isOwnMessage
public boolean isOwnMessage()Description copied from interface:IUserPortalChatEntryViewModelCheck if the chat entry is a message sent by the current user.- Specified by:
isOwnMessagein interfaceIUserPortalChatEntryViewModel- Returns:
- true if the chat entry is a message sent by the current user, false otherwise
-
getSentTime
-
getSentTimeInstant
-
getUploadRequest
-
getUuid
-
hasAttachments
public boolean hasAttachments() -
hasUploadRequest
public boolean hasUploadRequest() -
isFirstMessageOfDay
-
isRead
public boolean isRead() -
getRelatedUploadModel
- Returns:
- the related 'pending upload request' model belonging to this message or null, if this one is just a simple text message
-
setRelatedUploadModel
- Parameters:
relatedUploadModel- the related 'pending upload request' model belonging to this message
-
showReceivedMessage
public boolean showReceivedMessage()Show the received message if it is not an own message and there are no upload requests with files.- Returns:
- true if the message should be shown, false otherwise
-