Package de.xima.fc.entities
Class FormRecordMessage
- java.lang.Object
-
- de.xima.cmn.dao.model.AEntity<Long>
-
- de.xima.fc.entities.AbstractEntity
-
- de.xima.fc.entities.AbstractLockableEntity
-
- de.xima.fc.entities.FormRecordMessage
-
- All Implemented Interfaces:
de.xima.cmn.dao.interfaces.IEntity<Long>,de.xima.cmn.dao.interfaces.ILockableEntity<Long>,ILockingVersionProviding,ITransferable,ITransferableEntity,ITransferableLockableEntity,IUUIDEntity,Serializable,Comparable<de.xima.cmn.dao.interfaces.IEntity<Long>>
@Entity public class FormRecordMessage extends AbstractLockableEntity implements IUUIDEntity
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringATTR_ATTACHMENTSstatic StringATTR_CHATstatic StringATTR_CONTENTstatic StringATTR_PROPERTIESstatic StringATTR_READ_AUTH_REFstatic StringATTR_READ_BY_INBOX_USERstatic StringATTR_READ_USER_PROFILESstatic StringATTR_SENDER_AUTH_REFstatic StringATTR_SENDER_CONTEXTstatic StringATTR_SENDER_NAMEstatic StringATTR_SENDER_USER_PROFILE_UUIDstatic StringATTR_SENT_INSTANTstatic StringATTR_SUBJECTstatic StringCOL_ATTACHMENT_IDstatic StringCOL_CHAT_IDstatic StringCOL_CONTENTstatic StringCOL_MESSAGE_IDstatic StringCOL_READ_BY_INBOX_USERstatic StringCOL_SENDER_AUTH_REFstatic StringCOL_SENDER_CONTEXTstatic StringCOL_SENDER_NAMEstatic StringCOL_SENDER_PROFILE_IDDeprecated.static StringCOL_SENDER_PROFILE_UUIDstatic StringCOL_SENT_TIMESTAMPstatic StringCOL_SUBJECT-
Fields inherited from class de.xima.fc.entities.AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersion
-
Fields inherited from class de.xima.fc.entities.AbstractEntity
COL_ID, id
-
Fields inherited from interface de.xima.fc.entities.interfaces.ITransferableEntity
IMPORT_ID, INVALID_ID
-
Fields inherited from interface de.xima.fc.entities.interfaces.IUUIDEntity
ATTR_UUID, COL_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, NULLABLE_UUID_TYPE, TYPE_NAME_UUID
-
-
Constructor Summary
Constructors Constructor Description FormRecordMessage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<Attachment>getAttachments()Gets the list of attachments that are linked with this message.Map<String,String>getAttributes()FormRecordChatgetChat()StringgetContent()Map<String,String>getExternalMessageCustomProperties(String extensionName)StringgetExternalMessageCustomProperty(String extensionName, String propertyName)static StringgetExternalMessageCustomPropertyKey(String extensionName, String propertyName)StringgetExternalMessageId(String extensionName)static StringgetExternalMessageIdPropertyKey(String extensionName)LonggetId()Set<String>getReadByUserAuthRefs()Gets theuniversal reference IDs of users that have read the message.Set<UserProfile>getReadUserProfiles()Gets the user profiles that have read the message.StringgetSenderAuthRef()StringgetSenderContext()StringgetSenderName()UUIDgetSenderUserProfileUuid()InstantgetSentInstant()StringgetSubject()List<Attachment>getUploadRequestAttachments()List<FormRecordMessageUploadRequest>getUploadRequests()StringgetUUID()Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.UUIDgetUUIDObject()Gets the UUID (universal unique identifier) that uniquely identifies this type of entity.booleanhasUnfulfilledUploadRequests()Checks if the message has unfulfilled upload requests.@NotNull Optional<Boolean>isExternalMessageSuccess(String extensionName)BooleanisRead(IUser user)Checks if the message has been read by the given user.booleanisRead(IUserRef userRef)Checks if the message has been read by the given user.booleanisReadByInboxUser()booleanisSender(IUser user)booleanisSender(IUserRef userRef)voidmarkRead(UserProfile profile)Deprecated.UsemarkRead(IUser)instead.voidmarkRead(IUser user)Marks the message as read by the given user.voidsetAttachments(List<Attachment> attachments)Sets the list of attachments that are linked with this message.voidsetAttributes(Map<String,String> properties)voidsetChat(FormRecordChat chat)voidsetContent(String content)voidsetExternalMessageCustomProperty(String extensionName, String propertyName, String value)voidsetExternalMessageId(String extensionName, String messageRefId)voidsetExternalMessageProperties(String extensionName, Map<String,String> properties)voidsetExternalMessageResponse(String extensionName, IPluginSendMessageResponse response)voidsetExternalMessageSuccess(String extensionName, boolean success)voidsetReadByInboxUser(boolean readByInboxUser)voidsetReadByUserAuthRefs(Set<String> readByUserAuthRefs)voidsetReadUserProfiles(Set<UserProfile> readUserProfiles)voidsetSender(IUser user)voidsetSenderAuthRef(String senderAuthRef)Deprecated.UsesetSender(IUser)instead.voidsetSenderContext(String senderContext)voidsetSenderName(String senderName)voidsetSenderUserProfileUuid(UUID senderUserProfileUuid)Deprecated.UsesetSender(IUser)instead.voidsetSentInstant(Instant sentInstant)voidsetSubject(String subject)voidsetUploadRequests(List<FormRecordMessageUploadRequest> uploadRequests)voidsetUUID(String uuid)Sets the UUID (universal unique identifier) that uniquely identifies this type of entity.voidsetUUIDObject(UUID uuid)-
Methods inherited from class de.xima.fc.entities.AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toString
-
Methods inherited from class de.xima.fc.entities.AbstractEntity
asIntValue, isPersisted, setId, setId
-
Methods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
-
-
-
Field Detail
-
ATTR_ATTACHMENTS
public static final String ATTR_ATTACHMENTS
- See Also:
- Constant Field Values
-
ATTR_CHAT
public static final String ATTR_CHAT
- See Also:
- Constant Field Values
-
ATTR_SENDER_NAME
public static final String ATTR_SENDER_NAME
- See Also:
- Constant Field Values
-
ATTR_SENDER_AUTH_REF
public static final String ATTR_SENDER_AUTH_REF
- See Also:
- Constant Field Values
-
ATTR_SENDER_CONTEXT
public static final String ATTR_SENDER_CONTEXT
- See Also:
- Constant Field Values
-
ATTR_SENDER_USER_PROFILE_UUID
public static final String ATTR_SENDER_USER_PROFILE_UUID
- See Also:
- Constant Field Values
-
ATTR_SUBJECT
public static final String ATTR_SUBJECT
- See Also:
- Constant Field Values
-
ATTR_CONTENT
public static final String ATTR_CONTENT
- See Also:
- Constant Field Values
-
ATTR_SENT_INSTANT
public static final String ATTR_SENT_INSTANT
- See Also:
- Constant Field Values
-
ATTR_READ_AUTH_REF
public static final String ATTR_READ_AUTH_REF
- See Also:
- Constant Field Values
-
ATTR_READ_USER_PROFILES
public static final String ATTR_READ_USER_PROFILES
- See Also:
- Constant Field Values
-
ATTR_READ_BY_INBOX_USER
public static final String ATTR_READ_BY_INBOX_USER
- See Also:
- Constant Field Values
-
ATTR_PROPERTIES
public static final String ATTR_PROPERTIES
- See Also:
- Constant Field Values
-
COL_ATTACHMENT_ID
public static final String COL_ATTACHMENT_ID
- See Also:
- Constant Field Values
-
COL_CHAT_ID
public static final String COL_CHAT_ID
- See Also:
- Constant Field Values
-
COL_SENDER_NAME
public static final String COL_SENDER_NAME
- See Also:
- Constant Field Values
-
COL_SENDER_AUTH_REF
public static final String COL_SENDER_AUTH_REF
- See Also:
- Constant Field Values
-
COL_SENDER_CONTEXT
public static final String COL_SENDER_CONTEXT
- See Also:
- Constant Field Values
-
COL_READ_BY_INBOX_USER
public static final String COL_READ_BY_INBOX_USER
- See Also:
- Constant Field Values
-
COL_SENDER_PROFILE_ID
@Deprecated public static final String COL_SENDER_PROFILE_ID
Deprecated.- See Also:
- Constant Field Values
-
COL_SENDER_PROFILE_UUID
public static final String COL_SENDER_PROFILE_UUID
- See Also:
- Constant Field Values
-
COL_MESSAGE_ID
public static final String COL_MESSAGE_ID
- See Also:
- Constant Field Values
-
COL_SUBJECT
public static final String COL_SUBJECT
- See Also:
- Constant Field Values
-
COL_CONTENT
public static final String COL_CONTENT
- See Also:
- Constant Field Values
-
COL_SENT_TIMESTAMP
public static final String COL_SENT_TIMESTAMP
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUUID
public String getUUID()
Description copied from interface:IUUIDEntityGets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopesorproject scope.- Specified by:
getUUIDin interfaceIUUIDEntity- Returns:
- The UUID of the entity.
-
setUUID
public void setUUID(String uuid)
Description copied from interface:IUUIDEntitySets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopesorproject scope.- Specified by:
setUUIDin interfaceIUUIDEntity- Parameters:
uuid- The UUID of the entity.
-
getUUIDObject
public UUID getUUIDObject()
Description copied from interface:IUUIDEntityGets the UUID (universal unique identifier) that uniquely identifies this type of entity. Whether the UUID must be globally unique or only with within a context depends on the type of entity. Common contexts are for exampleclient scopesorproject scope.- Specified by:
getUUIDObjectin interfaceIUUIDEntity- Returns:
- The UUID of the entity.
-
setUUIDObject
public void setUUIDObject(UUID uuid)
-
getChat
public FormRecordChat getChat()
-
setChat
public void setChat(FormRecordChat chat)
-
getSenderName
public String getSenderName()
-
setSenderName
public void setSenderName(String senderName)
-
getSenderAuthRef
public String getSenderAuthRef()
-
setSenderAuthRef
public void setSenderAuthRef(String senderAuthRef)
Deprecated.UsesetSender(IUser)instead.- See Also:
setSender(IUser)
-
getSenderContext
public String getSenderContext()
-
setSenderContext
public void setSenderContext(String senderContext)
-
getSenderUserProfileUuid
@Nullable public UUID getSenderUserProfileUuid()
-
setSenderUserProfileUuid
public void setSenderUserProfileUuid(@Nullable UUID senderUserProfileUuid)Deprecated.UsesetSender(IUser)instead.- See Also:
setSender(IUser)
-
getSubject
public String getSubject()
-
setSubject
public void setSubject(String subject)
-
getContent
public String getContent()
-
setContent
public void setContent(String content)
-
getSentInstant
public Instant getSentInstant()
-
setSentInstant
public void setSentInstant(Instant sentInstant)
-
getUploadRequests
public List<FormRecordMessageUploadRequest> getUploadRequests()
-
setUploadRequests
public void setUploadRequests(List<FormRecordMessageUploadRequest> uploadRequests)
-
getUploadRequestAttachments
public List<Attachment> getUploadRequestAttachments()
-
getAttachments
public List<Attachment> getAttachments()
Gets the list of attachments that are linked with this message. When a user sends a message, they can optionally select one or multiple files to attach to the message. These files are stored as attachments, and are referenced by the message. When the receiver reads a chat with a list of messages, they can see the attachments that are linked with each message.- Returns:
- A list of attachments that are linked with this message.
-
setAttachments
public void setAttachments(List<Attachment> attachments)
Sets the list of attachments that are linked with this message. When a user sends a message, they can optionally select one or multiple files to attach to the message. These files are stored as attachments, and are referenced by the message. When the receiver reads a chat with a list of messages, they can see the attachments that are linked with each message.- Parameters:
attachments- A list of attachments that are linked with this message.
-
getReadByUserAuthRefs
public Set<String> getReadByUserAuthRefs()
Gets theuniversal reference IDs of users that have read the message.- Returns:
- the
universal reference IDs of users that have read the message.
-
getReadUserProfiles
public Set<UserProfile> getReadUserProfiles()
Gets the user profiles that have read the message.- Returns:
- the user profiles that have read the message.
-
setReadUserProfiles
public void setReadUserProfiles(Set<UserProfile> readUserProfiles)
-
isReadByInboxUser
public boolean isReadByInboxUser()
-
setReadByInboxUser
public void setReadByInboxUser(boolean readByInboxUser)
-
setSender
public void setSender(IUser user)
-
setExternalMessageResponse
public void setExternalMessageResponse(String extensionName, IPluginSendMessageResponse response)
-
isExternalMessageSuccess
@NotNull public @NotNull Optional<Boolean> isExternalMessageSuccess(String extensionName)
-
setExternalMessageSuccess
public void setExternalMessageSuccess(String extensionName, boolean success)
-
getExternalMessageCustomProperties
public Map<String,String> getExternalMessageCustomProperties(String extensionName)
-
getExternalMessageCustomProperty
public String getExternalMessageCustomProperty(String extensionName, String propertyName)
-
setExternalMessageCustomProperty
public void setExternalMessageCustomProperty(String extensionName, String propertyName, String value)
-
setExternalMessageProperties
public void setExternalMessageProperties(String extensionName, Map<String,String> properties)
-
hasUnfulfilledUploadRequests
public boolean hasUnfulfilledUploadRequests()
Checks if the message has unfulfilled upload requests.- Returns:
trueif the message has unfulfilled upload requests,falseif all upload requests have been fulfilled.- See Also:
FormRecordMessageUploadRequest.isFulfilled()
-
isRead
@Nullable public Boolean isRead(IUser user)
Checks if the message has been read by the given user.- Parameters:
user- the user to check- Returns:
trueif the message has been read by the user andfalseif it has not been read.
-
isRead
public boolean isRead(IUserRef userRef)
Checks if the message has been read by the given user.- Parameters:
userRef- the user reference to check- Returns:
trueif the message has been read by the user andfalseif it has not been read.
-
isSender
public boolean isSender(IUser user)
-
isSender
public boolean isSender(IUserRef userRef)
-
markRead
@Deprecated public void markRead(UserProfile profile)
Deprecated.UsemarkRead(IUser)instead.Marks the message as read by the given user.- Parameters:
profile- the user profile that has read the message
-
markRead
public void markRead(IUser user)
Marks the message as read by the given user.- Parameters:
user- the user that has read the message
-
getExternalMessageIdPropertyKey
public static String getExternalMessageIdPropertyKey(String extensionName)
-
-