public class DefaultConversationService extends java.lang.Object implements ConversationService
ConversationService| Constructor and Description |
|---|
DefaultConversationService() |
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<ConversationModel> |
closeConversation(java.lang.String uid,
UserModel user)
Customer closes a given conversation
|
java.util.Optional<ConversationModel> |
createConversation(java.lang.String messages)
Create a ConversationModel
|
java.util.List<ConversationModel> |
getAllConversationsForCustomer(CustomerModel customer)
Gets all conversations of specific customer
|
protected ConversationDao |
getConversationDao() |
java.util.Optional<ConversationModel> |
getConversationForUid(java.lang.String uid)
Gets conversation for given uid
|
protected java.util.Optional<ConversationModel> |
getConversationForUidAndUser(java.lang.String uid,
UserModel user) |
protected KeyGenerator |
getConversationUidGenerator() |
protected ModelService |
getModelService() |
java.util.List<ConversationModel> |
getOpenConversationsForAgent(EmployeeModel agent)
Gets open conversations for agent
|
java.util.List<ConversationModel> |
getUnassignedConversations()
Gets Unassigned conversations of agent
|
protected UserService |
getUserService() |
java.util.Optional<ConversationModel> |
pickConversation(java.lang.String uid,
EmployeeModel agent)
Agent chooses a conversation
|
void |
setConversationDao(ConversationDao conversationDao) |
void |
setConversationUidGenerator(KeyGenerator conversationUidGenerator) |
void |
setModelService(ModelService modelService) |
void |
setUserService(UserService userService) |
java.util.Optional<ConversationModel> |
updateConversation(java.lang.String uid,
java.lang.String messages)
Create Or Update a ConversationModel
|
public java.util.Optional<ConversationModel> createConversation(java.lang.String messages)
ConversationServicecreateConversation in interface ConversationServicemessages - the Messages to be savedpublic java.util.Optional<ConversationModel> getConversationForUid(java.lang.String uid)
ConversationServicegetConversationForUid in interface ConversationServiceuid - the conversation uidpublic java.util.List<ConversationModel> getAllConversationsForCustomer(CustomerModel customer)
ConversationServicegetAllConversationsForCustomer in interface ConversationServicecustomer - the specific customerpublic java.util.List<ConversationModel> getOpenConversationsForAgent(EmployeeModel agent)
ConversationServicegetOpenConversationsForAgent in interface ConversationServiceagent - the specific agentpublic java.util.List<ConversationModel> getUnassignedConversations()
ConversationServicegetUnassignedConversations in interface ConversationServicepublic java.util.Optional<ConversationModel> pickConversation(java.lang.String uid, EmployeeModel agent)
ConversationServicepickConversation in interface ConversationServiceuid - the specific conversation uidagent - the agentpublic java.util.Optional<ConversationModel> closeConversation(java.lang.String uid, UserModel user)
ConversationServicecloseConversation in interface ConversationServiceuid - the specific conversation uiduser - the userpublic java.util.Optional<ConversationModel> updateConversation(java.lang.String uid, java.lang.String messages)
ConversationServiceupdateConversation in interface ConversationServiceuid - the specific conversation uidmessages - the messages to be updatedprotected java.util.Optional<ConversationModel> getConversationForUidAndUser(java.lang.String uid, UserModel user)
protected ConversationDao getConversationDao()
public void setConversationDao(ConversationDao conversationDao)
protected UserService getUserService()
public void setUserService(UserService userService)
protected ModelService getModelService()
public void setModelService(ModelService modelService)
protected KeyGenerator getConversationUidGenerator()
public void setConversationUidGenerator(KeyGenerator conversationUidGenerator)
Copyright © 2018 SAP SE. All Rights Reserved.