Class FormRecordChat
java.lang.Object
de.xima.cmn.dao.model.AEntity<Long>
de.xima.fc.entities.AbstractEntity
de.xima.fc.entities.AbstractLockableEntity
de.xima.fc.entities.FormRecordChat
- 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 representing a form record scoped chat. The chat belongs to a specific
form record and can
receive messages.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final StringDeprecated.static final StringDeprecated.useATTR_MEMBERSandFormRecordAccess.ATTR_UNIVERSAL_REFERENCE_IDinsteadstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class AbstractLockableEntity
COL_LOCKINGVERSION, lockingVersionFields inherited from class AbstractEntity
COL_ID, idFields inherited from interface de.xima.cmn.dao.interfaces.IEntity
ATTR_IDFields inherited from interface de.xima.cmn.dao.interfaces.ILockableEntity
ATTR_LOCKINGVERSIONFields inherited from interface ITransferableEntity
IMPORT_ID, INVALID_IDFields inherited from interface IUUIDEntity
ATTR_UUID, COL_UUID, INVALID_UUID, INVALID_UUID_OBJECT, NULL_SAFE_UUID_TYPE, NULLABLE_UUID_TYPE, TYPE_NAME_UUID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMessage(FormRecordMessage message) Adds a message to this chat, and set this chat on the message.getDisplayName(Locale locale) Returns the display name of this chat in the context of the given user portal and locale.getId()Returns the instant of the last message in this chat.Deprecated.Returns an empty collection.Deprecated.Returns a collection of member refs.getSenderMessages(IUser sender) Returns all messages sent by the given user.intgetUnreadMessageCount(IUser user) Returns the number of unread messages in the chat for the given user.intgetUnreadMessageCount(IUserRef userRef) Returns the number of unread messages in the chat for the given user.@NotNull List<FormRecordMessage> getUnreadMessages(IUser user) Returns all unread messages in the chat for the given user.@NotNull List<FormRecordMessage> getUnreadMessages(IUserRef userRef) Returns all unread messages in the chat for the given user.getUUID()Gets the UUID of this chat.Gets the UUID of this chat.booleanReturns whether a user is a member of this chat and can therefore receive its messages.booleanReturns whether a user reference is a member of this chat and can therefore receive its messages.booleanisOpen()booleanReturns whether all messages in the chat are read by the given user.booleanReturns whether all messages in the chat are read by the given user.voidMarks all messages in this chat as read by an inbox user.voidmarkRead(UserProfile profile) Deprecated.UsemarkRead(IUser)instead.voidMarks all messages in this chat as read for the given user.voidsetCreatedInstant(Instant createdInstant) voidsetFormRecord(Vorgang formRecord) voidsetMember(FormRecordAccess access) Sets the member to this chatvoidsetMemberProfiles(Set<UserProfile> memberProfiles) Deprecated.Does nothing.voidsetMemberRefs(Set<String> memberRefs) Deprecated.Does nothing.voidsetMembers(Set<FormRecordAccess> members) voidsetMessages(List<FormRecordMessage> messages) voidsetOpen(boolean open) voidSets the UUID of this chat.voidsetUUIDObject(UUID uuid) Sets the UUID of this chat.Methods inherited from class AbstractLockableEntity
entityHasChanged, getLockingVersion, setLockingVersion, toStringMethods inherited from class AbstractEntity
asIntValue, isPersisted, setId, setIdMethods inherited from class de.xima.cmn.dao.model.AEntity
compareTo, equals, getDBTableName, hashCodeMethods inherited from interface Comparable
compareToMethods inherited from interface de.xima.cmn.dao.interfaces.IEntity
isPersisted, setId
-
Field Details
-
ATTR_FORM_RECORD
- See Also:
-
ATTR_CREATED_INSTANT
- See Also:
-
ATTR_OPEN
- See Also:
-
ATTR_MESSAGES
- See Also:
-
ATTR_MEMBERS
- See Also:
-
ATTR_MEMBER_REFS
Deprecated.useATTR_MEMBERSandFormRecordAccess.ATTR_UNIVERSAL_REFERENCE_IDinstead- See Also:
-
ATTR_MEMBER_PROFILES
Deprecated.useATTR_MEMBERSandFormRecordAccess.ATTR_USER_PROFILE_UUIDinstead- See Also:
-
COL_FORM_RECORD_ID
- See Also:
-
-
Constructor Details
-
FormRecordChat
public FormRecordChat()
-
-
Method Details
-
getId
-
getUUID
Gets the UUID of this chat. The UUID must be globally unique among all form records and all clients.- Specified by:
getUUIDin interfaceIUUIDEntity- Returns:
- The UUID of this chat.
-
setUUID
Sets the UUID of this chat. The UUID must be globally unique among all form records and all clients.- Specified by:
setUUIDin interfaceIUUIDEntity- Parameters:
uuid- The UUID of this chat.
-
getUUIDObject
Gets the UUID of this chat. The UUID must be globally unique among all form records and all clients.- Specified by:
getUUIDObjectin interfaceIUUIDEntity- Returns:
- The UUID of this chat.
-
setUUIDObject
Sets the UUID of this chat. The UUID must be globally unique among all form records and all clients.- Parameters:
uuid- The UUID of this chat.
-
getFormRecord
-
setFormRecord
-
getCreatedInstant
-
setCreatedInstant
-
isOpen
public boolean isOpen() -
setOpen
public void setOpen(boolean open) -
getMembers
-
setMembers
-
getMessages
-
setMessages
-
setMember
Sets the member to this chat- Parameters:
access- The access to set.
-
addMessage
Adds a message to this chat, and set this chat on the message.- Parameters:
message- The message to add.
-
getSenderMessages
Returns all messages sent by the given user.- Parameters:
sender- the user that sent the messages.- Returns:
- a list of all the messages sent by the given user ordered by their submit date.
-
getUnreadMessageCount
Returns the number of unread messages in the chat for the given user.- Parameters:
user- The user to get the unread message count for.- Returns:
- The number of unread messages in the chat for the given user.
-
getUnreadMessageCount
Returns the number of unread messages in the chat for the given user.- Parameters:
userRef- The user reference to get the unread message count for.- Returns:
- The number of unread messages in the chat for the given user.
-
getUnreadMessages
Returns all unread messages in the chat for the given user.- Parameters:
user- The user to get the unread messages for.- Returns:
- The unread messages in the chat for the given user.
-
getUnreadMessages
Returns all unread messages in the chat for the given user.- Parameters:
userRef- The user reference to get the unread messages for.- Returns:
- The unread messages in the chat for the given user.
-
getLastMessageInstant
Returns the instant of the last message in this chat.- Returns:
- The instant of the last message in this chat, or
nullif there are no messages.
-
isRead
Returns whether all messages in the chat are read by the given user.- Parameters:
user- The user to check the read state for.- Returns:
trueif all messages in the chat are read by the given user andfalseif there is at least one unread message.
-
isRead
Returns whether all messages in the chat are read by the given user.- Parameters:
userRef- The user reference to check the read state for.- Returns:
trueif all messages in the chat are read by the given user andfalseif there is at least one unread message.
-
getDisplayName
-
isMember
Returns whether a user is a member of this chat and can therefore receive its messages.- Parameters:
user- to check.- Returns:
trueif the given user is a member of this chat andfalseotherwise.
-
isMember
Returns whether a user reference is a member of this chat and can therefore receive its messages.- Parameters:
userRef- to check.- Returns:
trueif the given user reference is a member of this chat andfalseotherwise.
-
markRead
Deprecated.UsemarkRead(IUser)instead.Marks all messages in this chat as read for the given user.- Parameters:
profile- The user profile to mark the messages as read for.
-
markRead
Marks all messages in this chat as read for the given user.- Parameters:
user- The user to mark the messages as read for.
-
markAsReadByInboxUser
public void markAsReadByInboxUser()Marks all messages in this chat as read by an inbox user. -
getMemberRefs
Deprecated.Returns a collection of member refs. UsegetMembers()andFormRecordAccess.getUniversalReferenceId()instead. -
setMemberRefs
Deprecated.Does nothing. UsesetMembers(Set)instead- Parameters:
memberRefs- the member references
-
getMemberProfiles
Deprecated.Returns an empty collection. UsegetMembers()andFormRecordAccess.getUserProfileUuid()instead. -
setMemberProfiles
Deprecated.Does nothing. UsesetMembers(Set)instead- Parameters:
memberProfiles- the member profiles
-
ATTR_MEMBERSandFormRecordAccess.ATTR_USER_PROFILE_UUIDinstead