Package de.xima.fc.inbox.model.messages
Class MessageViewModel
- java.lang.Object
-
- de.xima.fc.inbox.model.messages.MessageViewModel
-
- All Implemented Interfaces:
IChatEntry,Serializable
public class MessageViewModel extends Object implements IChatEntry
View model for aFormRecordMessageto display in the chat.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MessageViewModelfromFormRecordMessage(FormRecordMessage message, Set<UserProfile> profilesCache, Map<String,IClientDescriptor> clientDescriptorCache, Locale locale, Set<IPluginMessageService<?>> pluginMessageServices, UserRef currentUserRef)List<MessageAttachmentViewModel>getAttachments()StringgetContent()Set<PluginMessageDataViewModel>getPluginMessageData()UserViewModelgetSender()Returns the sender of the chat entry.StringgetSenderContext()Returns the sender context of the chat entry.StringgetSenderCssClass()Returns the CSS class for the sender of the chat entry.StringgetSenderDisplayName(Locale locale)StringgetSenderIcon()Returns an icon for the sender of the chat entry.StringgetSenderName(Locale locale)Returns the sender name of the chat entry.StringgetSubject()Returns the subject of the chat entry.InstantgetTimestamp()Returns the timestamp of the chat entry.List<UploadRequestViewModel>getUploadRequests()StringgetViewId()Returns the view id of the chat entry.booleanisByUser(IUser user)booleanisEndUserMessage()booleanisHasAttachments()booleanisHasUploadRequests()booleanisWorkflowMessage()StringtoString()
-
-
-
Method Detail
-
fromFormRecordMessage
public static MessageViewModel fromFormRecordMessage(FormRecordMessage message, Set<UserProfile> profilesCache, Map<String,IClientDescriptor> clientDescriptorCache, Locale locale, Set<IPluginMessageService<?>> pluginMessageServices, UserRef currentUserRef)
-
getAttachments
public List<MessageAttachmentViewModel> getAttachments()
-
getContent
public String getContent()
-
getPluginMessageData
public Set<PluginMessageDataViewModel> getPluginMessageData()
-
getSender
public UserViewModel getSender()
Description copied from interface:IChatEntryReturns the sender of the chat entry.- Specified by:
getSenderin interfaceIChatEntry- Returns:
- The sender of the chat entry.
-
getSenderContext
public String getSenderContext()
Description copied from interface:IChatEntryReturns the sender context of the chat entry.- Specified by:
getSenderContextin interfaceIChatEntry- Returns:
- The sender context of the chat entry.
-
getSenderIcon
public String getSenderIcon()
Description copied from interface:IChatEntryReturns an icon for the sender of the chat entry.- Specified by:
getSenderIconin interfaceIChatEntry- Returns:
- An icon for the sender of the chat entry.
-
getSenderName
public String getSenderName(Locale locale)
Description copied from interface:IChatEntryReturns the sender name of the chat entry.- Specified by:
getSenderNamein interfaceIChatEntry- Returns:
- The sender name of the chat entry.
-
getTimestamp
public Instant getTimestamp()
Description copied from interface:IChatEntryReturns the timestamp of the chat entry.- Specified by:
getTimestampin interfaceIChatEntry- Returns:
- The timestamp of the chat entry.
-
getViewId
public String getViewId()
Description copied from interface:IChatEntryReturns the view id of the chat entry.- Specified by:
getViewIdin interfaceIChatEntry- Returns:
- The view id of the chat entry.
-
getSubject
public String getSubject()
Description copied from interface:IChatEntryReturns the subject of the chat entry.- Specified by:
getSubjectin interfaceIChatEntry- Returns:
- The subject of the chat entry.
-
getSenderCssClass
public String getSenderCssClass()
Description copied from interface:IChatEntryReturns the CSS class for the sender of the chat entry.- Specified by:
getSenderCssClassin interfaceIChatEntry- Returns:
- The CSS class for the sender of the chat entry.
-
getUploadRequests
public List<UploadRequestViewModel> getUploadRequests()
-
isByUser
public boolean isByUser(IUser user)
-
isEndUserMessage
public boolean isEndUserMessage()
-
isHasAttachments
public boolean isHasAttachments()
-
isHasUploadRequests
public boolean isHasUploadRequests()
-
isWorkflowMessage
public boolean isWorkflowMessage()
-
-