@StableMinor(version="12.4", sinceVersion="4.0") public interface IChatManager
Modifier and Type | Method and Description |
---|---|
void |
addConversation(SessionConfig sessionConfig,
ChatConversationConfig conversationConfig,
ITransaction transaction)
Adds a chat conversation.
|
void |
addMessage(SessionConfig sessionConfig,
ChatMessageConfig messageConfig,
ITransaction transaction)
Adds a chat message to a conversation.
|
void |
addUser(SessionConfig sessionConfig,
ChatUserConfig userConfig,
ITransaction transaction)
Adds a chat user
|
void |
closeExpiredConversations(SessionConfig sessionConfig,
ITransaction transaction)
closes expired conversations.
|
void |
deleteConversation(SessionConfig sessionConfig,
String conversationId,
ITransaction transaction)
Deletes the given chat conversation.
|
void |
deleteMessage(SessionConfig sessionConfig,
String messageId,
ITransaction transaction)
Deletes the given message Id from its conversation.
|
void |
deleteUser(SessionConfig sessionConfig,
String userId,
ITransaction transaction)
Deletes the given user.
|
Collection<ChatUserConfig> |
getActiveUsers(SessionConfig sessionConfig,
String conversationId,
ITransaction transaction)
Returns all the active chat users given the conversation id
|
ChatConversationConfig |
getConversation(SessionConfig sessionConfig,
String conversationId,
ITransaction transaction)
Returns a chat conversation config object.
|
List<ChatMessageConfig> |
getLatestMessages(SessionConfig sessionConfig,
String conversationId,
String chatUserId,
int maxMessages,
boolean getMessagesToModerate,
Date greaterThanDate,
ITransaction transaction)
Deprecated.
Since 4.0.11 this method was replaced by
getLatestMessages(SessionConfig, String, String, int, int, boolean, Date, ITransaction) . |
List<ChatMessageConfig> |
getLatestMessages(SessionConfig sessionConfig,
String conversationId,
String chatUserId,
int firstMessageIndex,
int maxMessages,
boolean getMessagesToModerate,
Date greaterThanDate,
ITransaction transaction)
Returns up to maxMessages messageConfigs for a given conversationId.
|
int |
getLatestMessagesCount(SessionConfig sessionConfig,
String conversationId,
String chatUserId,
boolean getMessagesToModerate,
Date greaterThanDate,
ITransaction transaction)
Returns the number of messages that exists and would be available
for the
#getLatestMessages(String, String, int, int, boolean, Date, ITransaction)
method. |
ChatMessageConfig |
getMessage(SessionConfig sessionConfig,
String messageId,
ITransaction transaction)
Returns a message config object.
|
Collection<ChatMessageConfig> |
getMessages(SessionConfig sessionConfig,
String conversationId,
ITransaction transaction)
Returns all the messages for a given conversationId.
|
String |
getMessagesXml(SessionConfig sessionConfig,
Collection<ChatMessageConfig> chatMessageConfigs,
boolean getMessagesToModerate,
List<IResource> resources,
ITransaction transaction)
Returns the xml for the given messages.
|
ChatUserConfig |
getUser(SessionConfig sessionConfig,
String id,
ITransaction transaction)
Returns a chat user given the chat user id
|
ChatUserConfig |
getUser(SessionConfig sessionConfig,
String userId,
String conversationId,
String userSessionId,
ITransaction transaction)
Returns a chat user given the portal user id, conversation id and optionally the user
sessionId
|
Collection<ChatUserConfig> |
getUsers(SessionConfig sessionConfig,
String conversationId,
ITransaction transaction)
Returns all the chat users given the conversation id
|
void |
openStartedConversations(SessionConfig sessionConfig,
ITransaction transaction)
Opens the conversations whose startTime has already been reached.
|
boolean |
reachedUserLimit(SessionConfig sessionConfig,
String conversationId,
ITransaction transaction)
Returns true if the conversation has reached its user limit
|
void |
updateActiveUserState(SessionConfig sessionConfig,
ITransaction transaction)
Checks if any of the active users have not updated their last acces date.
|
void |
updateLastAccess(SessionConfig sessionConfig,
String chatUserId,
ITransaction transaction)
Updates the last access date for the given chat user.
|
void |
userLeftConversation(SessionConfig sessionConfig,
ChatUserConfig chatUserConfig,
ITransaction transaction)
Method to indicate that a user left the conversation
|
void addUser(SessionConfig sessionConfig, ChatUserConfig userConfig, ITransaction transaction) throws PortalException
sessionConfig
- userConfig
- transaction
- PortalException
ChatUserConfig getUser(SessionConfig sessionConfig, String id, ITransaction transaction) throws PortalException
sessionConfig
- userConfig
- transaction
- PortalException
ChatUserConfig getUser(SessionConfig sessionConfig, String userId, String conversationId, String userSessionId, ITransaction transaction) throws PortalException
sessionConfig
- userId
- conversationId
- userSessionId
- transaction
- PortalException
Collection<ChatUserConfig> getUsers(SessionConfig sessionConfig, String conversationId, ITransaction transaction) throws PortalException
sessionConfig
- conversationId
- transaction
- PortalException
Collection<ChatUserConfig> getActiveUsers(SessionConfig sessionConfig, String conversationId, ITransaction transaction) throws PortalException
sessionConfig
- conversationId
- transaction
- PortalException
void updateActiveUserState(SessionConfig sessionConfig, ITransaction transaction) throws PortalException
sessionConfig
- transaction
- PortalException
void deleteUser(SessionConfig sessionConfig, String userId, ITransaction transaction) throws PortalException
sessionConfig
- conversationId
- transaction
- PortalException
boolean reachedUserLimit(SessionConfig sessionConfig, String conversationId, ITransaction transaction) throws PortalException
sessionConfig
- conversationId
- transaction
- PortalException
void addConversation(SessionConfig sessionConfig, ChatConversationConfig conversationConfig, ITransaction transaction) throws PortalException
sessionConfig
- conversationConfig
- transaction
- PortalException
ChatConversationConfig getConversation(SessionConfig sessionConfig, String conversationId, ITransaction transaction) throws PortalException
sessionConfig
- conversationConfig
- transaction
- PortalException
void deleteConversation(SessionConfig sessionConfig, String conversationId, ITransaction transaction) throws PortalException
sessionConfig
- conversationId
- transaction
- PortalException
void openStartedConversations(SessionConfig sessionConfig, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.transaction
- the transaction for persistence access.PortalException
void closeExpiredConversations(SessionConfig sessionConfig, ITransaction transaction) throws PortalException
sessionConfig
- transaction
- PortalException
void addMessage(SessionConfig sessionConfig, ChatMessageConfig messageConfig, ITransaction transaction) throws PortalException
sessionConfig
- messageConfig
- transaction
- PortalException
ChatMessageConfig getMessage(SessionConfig sessionConfig, String messageId, ITransaction transaction) throws PortalException
sessionConfig
- messageConfig
- transaction
- PortalException
Collection<ChatMessageConfig> getMessages(SessionConfig sessionConfig, String conversationId, ITransaction transaction) throws PortalException
sessionConfig
- messageId
- transaction
- PortalException
@Deprecated List<ChatMessageConfig> getLatestMessages(SessionConfig sessionConfig, String conversationId, String chatUserId, int maxMessages, boolean getMessagesToModerate, Date greaterThanDate, ITransaction transaction) throws PortalException
getLatestMessages(SessionConfig, String, String, int, int, boolean, Date, ITransaction)
.sessionConfig
- the user session information.conversationId
- the conversation identifier.chatUserId
- the chat user identifier. If null no private messages are returned. If specified the
private messages for that user are returned.maxMessages
- the maximum number of messages to be returned.getMessagesToModerate
- if true the messages to moderate are also returned.greaterThanDate
- if not null, only the message with sent date-time greater than this argument
are returned.transaction
- the transaction for persistence access.PortalException
List<ChatMessageConfig> getLatestMessages(SessionConfig sessionConfig, String conversationId, String chatUserId, int firstMessageIndex, int maxMessages, boolean getMessagesToModerate, Date greaterThanDate, ITransaction transaction) throws PortalException
firstMessage
zero-based index. The messages are returned ordered by descending sent date-time.sessionConfig
- the user session information.conversationId
- the conversation identifier.chatUserId
- the chat user identifier. If null no private messages are returned. If specified the
private messages for that user are returned.firstMessageIndex
- the index of the first message to be returned. This index is zero based. May be used
for pagination.maxMessages
- the maximum number of messages to be returned.getMessagesToModerate
- if true the messages to moderate are also returned.greaterThanDate
- if not null, only the message with sent date-time greater than this argument
are returned.transaction
- the transaction for persistence access.PortalException
String getMessagesXml(SessionConfig sessionConfig, Collection<ChatMessageConfig> chatMessageConfigs, boolean getMessagesToModerate, List<IResource> resources, ITransaction transaction) throws PortalException
sessionConfig
- the user session information.chatMessageConfigs
- the messages collection.getMessagesToModerate
- if true the messages to moderate are also returned.resources
- resources used for localization.transaction
- the transaction for persistence access.PortalException
int getLatestMessagesCount(SessionConfig sessionConfig, String conversationId, String chatUserId, boolean getMessagesToModerate, Date greaterThanDate, ITransaction transaction) throws PortalException
#getLatestMessages(String, String, int, int, boolean, Date, ITransaction)
method.sessionConfig
- the user session information.conversationId
- the conversation identifier.chatUserId
- the chat user identifier. If null no private messages are returned. If specified the
private messages for that user are returned.getMessagesToModerate
- if true the messages to moderate are also returned.greaterThanDate
- if not null, only the message with sent date-time greater than this argument
are returned.transaction
- the transaction for persistence access.PortalException
void deleteMessage(SessionConfig sessionConfig, String messageId, ITransaction transaction) throws PortalException
sessionConfig
- messageId
- transaction
- PortalException
void updateLastAccess(SessionConfig sessionConfig, String chatUserId, ITransaction transaction) throws PortalException
sessionConfig
- transaction
- PortalException
void userLeftConversation(SessionConfig sessionConfig, ChatUserConfig chatUserConfig, ITransaction transaction) throws PortalException
sessionConfig
- chatUserConfig
- transaction
- PortalException
LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.