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:ConversationFacadeGets conversations for customer- Specified by:
getConversationsForCustomerin interfaceConversationFacade- Returns:
- List of the Conversation Data
-
pickConversation
public ConversationData pickConversation(java.lang.String conversationId)
Description copied from interface:ConversationFacadepick Conversation by Customer Support Agent- Specified by:
pickConversationin interfaceConversationFacade- Parameters:
conversationId- id of the conversation- Returns:
- the picked Conversation Data
-
getOpenConversations
public java.util.List<ConversationData> getOpenConversations()
Description copied from interface:ConversationFacadeGets open list of the Customer Support Agent- Specified by:
getOpenConversationsin interfaceConversationFacade- Returns:
- Assigned and Open List of the Customer Support Agent
-
getConversationById
public ConversationData getConversationById(java.lang.String conversationId)
Description copied from interface:ConversationFacadeGets Conversation by Id- Specified by:
getConversationByIdin interfaceConversationFacade- Parameters:
conversationId- id of the conversation- Returns:
- the Conversation Data
-
getUnassignedConversations
public java.util.List<ConversationData> getUnassignedConversations()
Description copied from interface:ConversationFacadeGets Unassigned conversations of agent- Specified by:
getUnassignedConversationsin interfaceConversationFacade- Returns:
- the list of Conversation Data
-
closeConversation
public ConversationData closeConversation(java.lang.String uid)
Description copied from interface:ConversationFacadeCloses a conversation for given uid- Specified by:
closeConversationin interfaceConversationFacade- Parameters:
uid- the conversation's uid- Returns:
- the closed conversation
-
getConversationDataList
public ConversationDataList getConversationDataList(java.util.List<ConversationData> conversations)
Description copied from interface:ConversationFacadeget conversation data list- Specified by:
getConversationDataListin interfaceConversationFacade- Parameters:
conversations- the conversation data list- Returns:
- conversation datas
-
isConversationAccessible
public boolean isConversationAccessible(ConversationData conversation)
Description copied from interface:ConversationFacadeCheck the specific conversation if is accessible- Specified by:
isConversationAccessiblein 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:ConversationFacadeGet all history messages for conversation- Specified by:
getMessagesForConversationin interfaceConversationFacade- Parameters:
conversationId- the specific conversationId- Returns:
- list of history messages
-
getConversationMessageList
public ConversationMessageListData getConversationMessageList(java.util.List<ConversationMessageData> messages)
Description copied from interface:ConversationFacadeGet all history messages for conversation into- Specified by:
getConversationMessageListin interfaceConversationFacade- Parameters:
messages- the messages list- Returns:
- conversation messages list data
-
isCustomer
public boolean isCustomer()
- Specified by:
isCustomerin interfaceConversationFacade- Returns:
- true if current user is customer
-
sendMessage
public ConversationData sendMessage(ConversationMessageListData conversationMessage)
Description copied from interface:ConversationFacadeSend message- Specified by:
sendMessagein 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)
-
-