Class FormRecordMessage

java.lang.Object
de.xima.cmn.dao.model.AEntity<Long>
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:
  • Field Details

  • Constructor Details

    • FormRecordMessage

      public FormRecordMessage()
  • Method Details

    • getId

      public Long getId()
      Specified by:
      getId in interface de.xima.cmn.dao.interfaces.IEntity<Long>
    • getUUID

      public String getUUID()
      Description copied from interface: IUUIDEntity
      Gets 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 example client scopes or project scope.
      Specified by:
      getUUID in interface IUUIDEntity
      Returns:
      The UUID of the entity.
    • setUUID

      public void setUUID(String uuid)
      Description copied from interface: IUUIDEntity
      Sets 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 example client scopes or project scope.
      Specified by:
      setUUID in interface IUUIDEntity
      Parameters:
      uuid - The UUID of the entity.
    • getUUIDObject

      public UUID getUUIDObject()
      Description copied from interface: IUUIDEntity
      Gets 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 example client scopes or project scope.
      Specified by:
      getUUIDObject in interface IUUIDEntity
      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.
      Use setSender(IUser) instead.
      See Also:
    • getSenderContext

      public String getSenderContext()
    • setSenderContext

      public void setSenderContext(String senderContext)
    • getSenderUserProfileUuid

      @Nullable public UUID getSenderUserProfileUuid()
    • setSenderUserProfileUuid

      public void setSenderUserProfileUuid(@Nullable UUID senderUserProfileUuid)
      Deprecated.
      Use setSender(IUser) instead.
      See Also:
    • 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 the universal reference IDs of users that have read the message.
      Returns:
      the universal reference IDs of users that have read the message.
    • setReadByUserAuthRefs

      public void setReadByUserAuthRefs(Set<String> readByUserAuthRefs)
    • 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)
    • getAttributes

      public Map<String,String> getAttributes()
    • setAttributes

      public void setAttributes(Map<String,String> properties)
    • setExternalMessageResponse

      public void setExternalMessageResponse(String extensionName, IPluginSendMessageResponse response)
    • getExternalMessageId

      public String getExternalMessageId(String extensionName)
    • setExternalMessageId

      public void setExternalMessageId(String extensionName, String messageRefId)
    • 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:
      true if the message has unfulfilled upload requests, false if all upload requests have been fulfilled.
      See Also:
    • 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:
      true if the message has been read by the user and false if 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:
      true if the message has been read by the user and false if 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.
      Use markRead(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)
    • getExternalMessageCustomPropertyKey

      public static String getExternalMessageCustomPropertyKey(String extensionName, String propertyName)