Class DefaultConversationFacade
- java.lang.Object
-
- de.hybris.platform.messagecentercsfacades.impl.DefaultConversationFacade
-
- All Implemented Interfaces:
ConversationFacade
public class DefaultConversationFacade extends java.lang.Object implements ConversationFacade
A default implementation of ConversationFacade
-
-
Constructor Summary
Constructors Constructor Description DefaultConversationFacade()
-
Method Summary
-
-
-
Method Detail
-
getConversationsForCustomer
public java.util.List<ConversationData> getConversationsForCustomer()
Description copied from interface:ConversationFacade
Gets conversations for customer- Specified by:
getConversationsForCustomer
in interfaceConversationFacade
- Returns:
- List of the Conversation Data
-
pickConversation
public ConversationData pickConversation(java.lang.String conversationId)
Description copied from interface:ConversationFacade
pick Conversation by Customer Support Agent- Specified by:
pickConversation
in interfaceConversationFacade
- Parameters:
conversationId
- id of the conversation- Returns:
- the picked Conversation Data
-
getOpenConversations
public java.util.List<ConversationData> getOpenConversations()
Description copied from interface:ConversationFacade
Gets open list of the Customer Support Agent- Specified by:
getOpenConversations
in interfaceConversationFacade
- Returns:
- Assigned and Open List of the Customer Support Agent
-
getConversationById
public ConversationData getConversationById(java.lang.String conversationId)
Description copied from interface:ConversationFacade
Gets Conversation by Id- Specified by:
getConversationById
in interfaceConversationFacade
- Parameters:
conversationId
- id of the conversation- Returns:
- the Conversation Data
-
getUnassignedConversations
public java.util.List<ConversationData> getUnassignedConversations()
Description copied from interface:ConversationFacade
Gets Unassigned conversations of agent- Specified by:
getUnassignedConversations
in interfaceConversationFacade
- Returns:
- the list of Conversation Data
-
closeConversation
public ConversationData closeConversation(java.lang.String uid)
Description copied from interface:ConversationFacade
Closes a conversation for given uid- Specified by:
closeConversation
in interfaceConversationFacade
- Parameters:
uid
- the conversation's uid- Returns:
- the closed conversation
-
getConversationDataList
public ConversationDataList getConversationDataList(java.util.List<ConversationData> conversations)
Description copied from interface:ConversationFacade
get conversation data list- Specified by:
getConversationDataList
in interfaceConversationFacade
- Parameters:
conversations
- the conversation data list- Returns:
- conversation datas
-
isConversationAccessible
public boolean isConversationAccessible(ConversationData conversation)
Description copied from interface:ConversationFacade
Check the specific conversation if is accessible- Specified by:
isConversationAccessible
in interfaceConversationFacade
- Parameters:
conversation
- the specific conversation data- Returns:
- true is accessible or otherwise
-
getMessagesForConversation
public java.util.List<ConversationMessageData> getMessagesForConversation(java.lang.String conversationId)
Description copied from interface:ConversationFacade
Get all history messages for conversation- Specified by:
getMessagesForConversation
in interfaceConversationFacade
- Parameters:
conversationId
- the specific conversationId- Returns:
- list of history messages
-
getConversationMessageList
public ConversationMessageListData getConversationMessageList(java.util.List<ConversationMessageData> messages)
Description copied from interface:ConversationFacade
Get all history messages for conversation into- Specified by:
getConversationMessageList
in interfaceConversationFacade
- Parameters:
messages
- the messages list- Returns:
- conversation messages list data
-
isCustomer
public boolean isCustomer()
- Specified by:
isCustomer
in interfaceConversationFacade
- Returns:
- true if current user is customer
-
sendMessage
public ConversationData sendMessage(ConversationMessageListData conversationMessage)
Description copied from interface:ConversationFacade
Send message- Specified by:
sendMessage
in interfaceConversationFacade
- Parameters:
conversationMessage
- message in content- Returns:
- ConversationModel message sending used conversation
-
updateOrCreateConversationById
protected java.util.Optional<ConversationModel> updateOrCreateConversationById(java.lang.String conversationId, java.util.List<ConversationMessageData> messages)
-
sortMessagesDesc
protected void sortMessagesDesc(java.util.List<ConversationMessageData> messages)
-
addSenderToMessage
protected void addSenderToMessage(java.util.List<ConversationMessageData> messages)
-
getConversationService
protected ConversationService getConversationService()
-
setConversationService
public void setConversationService(ConversationService conversationService)
-
getUserService
protected UserService getUserService()
-
setUserService
public void setUserService(UserService userService)
-
getConversationConverter
protected Converter<ConversationModel,ConversationData> getConversationConverter()
-
setConversationConverter
public void setConversationConverter(Converter<ConversationModel,ConversationData> conversationConverter)
-
getMessageListConverter
protected Converter<java.util.List<ConversationMessageData>,ConversationMessageListData> getMessageListConverter()
-
setMessageListConverter
public void setMessageListConverter(Converter<java.util.List<ConversationMessageData>,ConversationMessageListData> messageListConverter)
-
getConversationListConverter
protected Converter<java.util.List<ConversationData>,ConversationDataList> getConversationListConverter()
-
setConversationListConverter
public void setConversationListConverter(Converter<java.util.List<ConversationData>,ConversationDataList> conversationListConverter)
-
getPrincipalConverter
protected Converter<PrincipalModel,PrincipalData> getPrincipalConverter()
-
setPrincipalConverter
public void setPrincipalConverter(Converter<PrincipalModel,PrincipalData> principalConverter)
-
-