Class DefaultConversationService
- java.lang.Object
-
- de.hybris.platform.messagecentercsservices.impl.DefaultConversationService
-
- All Implemented Interfaces:
ConversationService
public class DefaultConversationService extends java.lang.Object implements ConversationService
Default implementation ofConversationService
-
-
Constructor Summary
Constructors Constructor Description DefaultConversationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<ConversationModel>closeConversation(java.lang.String uid, UserModel user)Customer closes a given conversationjava.util.Optional<ConversationModel>createConversation(java.lang.String messages)Create a ConversationModeljava.util.List<ConversationModel>getAllConversationsForCustomer(CustomerModel customer)Gets all conversations of specific customerprotected ConversationDaogetConversationDao()java.util.Optional<ConversationModel>getConversationForUid(java.lang.String uid)Gets conversation for given uidprotected java.util.Optional<ConversationModel>getConversationForUidAndUser(java.lang.String uid, UserModel user)protected KeyGeneratorgetConversationUidGenerator()protected ModelServicegetModelService()java.util.List<ConversationModel>getOpenConversationsForAgent(EmployeeModel agent)Gets open conversations for agentjava.util.List<ConversationModel>getUnassignedConversations()Gets Unassigned conversations of agentprotected UserServicegetUserService()java.util.Optional<ConversationModel>pickConversation(java.lang.String uid, EmployeeModel agent)Agent chooses a conversationvoidsetConversationDao(ConversationDao conversationDao)voidsetConversationUidGenerator(KeyGenerator conversationUidGenerator)voidsetModelService(ModelService modelService)voidsetUserService(UserService userService)java.util.Optional<ConversationModel>updateConversation(java.lang.String uid, java.lang.String messages)Create Or Update a ConversationModel
-
-
-
Method Detail
-
createConversation
public java.util.Optional<ConversationModel> createConversation(java.lang.String messages)
Description copied from interface:ConversationServiceCreate a ConversationModel- Specified by:
createConversationin interfaceConversationService- Parameters:
messages- the Messages to be saved- Returns:
- the created conversation
-
getConversationForUid
public java.util.Optional<ConversationModel> getConversationForUid(java.lang.String uid)
Description copied from interface:ConversationServiceGets conversation for given uid- Specified by:
getConversationForUidin interfaceConversationService- Parameters:
uid- the conversation uid- Returns:
- the created conversation
-
getAllConversationsForCustomer
public java.util.List<ConversationModel> getAllConversationsForCustomer(CustomerModel customer)
Description copied from interface:ConversationServiceGets all conversations of specific customer- Specified by:
getAllConversationsForCustomerin interfaceConversationService- Parameters:
customer- the specific customer- Returns:
- the list of ConversationModel
-
getOpenConversationsForAgent
public java.util.List<ConversationModel> getOpenConversationsForAgent(EmployeeModel agent)
Description copied from interface:ConversationServiceGets open conversations for agent- Specified by:
getOpenConversationsForAgentin interfaceConversationService- Parameters:
agent- the specific agent- Returns:
- the list of ConversationModel
-
getUnassignedConversations
public java.util.List<ConversationModel> getUnassignedConversations()
Description copied from interface:ConversationServiceGets Unassigned conversations of agent- Specified by:
getUnassignedConversationsin interfaceConversationService- Returns:
- the list of ConversationModel
-
pickConversation
public java.util.Optional<ConversationModel> pickConversation(java.lang.String uid, EmployeeModel agent)
Description copied from interface:ConversationServiceAgent chooses a conversation- Specified by:
pickConversationin interfaceConversationService- Parameters:
uid- the specific conversation uidagent- the agent- Returns:
- the optional of picked conversation
-
closeConversation
public java.util.Optional<ConversationModel> closeConversation(java.lang.String uid, UserModel user)
Description copied from interface:ConversationServiceCustomer closes a given conversation- Specified by:
closeConversationin interfaceConversationService- Parameters:
uid- the specific conversation uiduser- the user- Returns:
- the optional of closed conversation
-
updateConversation
public java.util.Optional<ConversationModel> updateConversation(java.lang.String uid, java.lang.String messages)
Description copied from interface:ConversationServiceCreate Or Update a ConversationModel- Specified by:
updateConversationin interfaceConversationService- Parameters:
uid- the specific conversation uidmessages- the messages to be updated- Returns:
- the created conversation
-
getConversationForUidAndUser
protected java.util.Optional<ConversationModel> getConversationForUidAndUser(java.lang.String uid, UserModel user)
-
getConversationDao
protected ConversationDao getConversationDao()
-
setConversationDao
public void setConversationDao(ConversationDao conversationDao)
-
getUserService
protected UserService getUserService()
-
setUserService
public void setUserService(UserService userService)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getConversationUidGenerator
protected KeyGenerator getConversationUidGenerator()
-
setConversationUidGenerator
public void setConversationUidGenerator(KeyGenerator conversationUidGenerator)
-
-