public class DialogService extends WatsonService
| Modifier and Type | Field and Description |
|---|---|
static String |
CLIENT_ID
The Constant CLIENT_ID.
|
static String |
CONVERSATION_ID
The Constant CONVERSATION_ID.
|
static String |
DATE_FROM
The Constant DATE_FROM.
|
static String |
DATE_TO
The Constant DATE_TO.
|
static String |
DIALOG_ID
The Constant DIALOG_ID.
|
static String |
INPUT
The Constant INPUT.
|
static String |
LIMIT
The Constant LIMIT.
|
static String |
NAME_VALUES
The Constant NAME_VALUES.
|
static String |
OFFSET
The Constant OFFSET.
|
VERSION| Constructor and Description |
|---|
DialogService()
Instantiates a new Dialog service with the default URL.
|
| Modifier and Type | Method and Description |
|---|---|
Conversation |
converse(Conversation conversation,
String newMessage)
Starts or continue conversations.
|
Conversation |
converse(Map<String,Object> params)
Starts or continue conversations.
|
Conversation |
createConversation(String dialogId)
Starts or continue conversations.
|
Dialog |
createDialog(String name,
File dialogFile)
Creates a dialog.
|
void |
deleteDialog(String dialogId)
Deletes a dialog.
|
List<DialogContent> |
getContent(String dialogId)
Gets content for nodes.
|
List<ConversationData> |
getConversationData(Map<String,Object> params)
Returns chat session data dump for a given date rage.
|
List<Dialog> |
getDialogs()
Retrieves the list of Dialogs for the user.
|
Map<String,String> |
getProfile(String dialogId,
Integer clientId,
String... names)
Returns a list of name-value pars associated with a client id.
|
Dialog |
updateDialog(String dialogId,
File dialogFile)
Updates a dialog.
|
void |
updateProfile(String dialogId,
Integer clientId,
Map<String,String> profile)
Updates a dialog profile with a profile.
|
configureHttpClient, execute, executeRequest, executeWithoutResponse, getApiKey, getEndPoint, getName, getToken, setApiKey, setAuthentication, setDefaultHeaders, setEndPoint, setUsernameAndPassword, toStringpublic static final String CLIENT_ID
public static final String CONVERSATION_ID
public static final String DATE_FROM
public static final String DATE_TO
public static final String DIALOG_ID
public static final String INPUT
public static final String LIMIT
public static final String NAME_VALUES
public static final String OFFSET
public DialogService()
public Conversation converse(Conversation conversation, String newMessage)
conversation - the current conversationnewMessage - the new messageConversation with the responsepublic Conversation converse(Map<String,Object> params)
params - the paramsConversation with the responsepublic Conversation createConversation(String dialogId)
dialogId - the dialog identifierConversationpublic Dialog createDialog(String name, File dialogFile)
name - The dialog namedialogFile - The dialog file created by using the Dialog service Applet.Dialogpublic void deleteDialog(String dialogId)
dialogId - The dialog identifierDialogServicepublic List<DialogContent> getContent(String dialogId)
dialogId - the dialog identifierDialogContent for nodespublic List<ConversationData> getConversationData(Map<String,Object> params)
params - the paramsConversationDatapublic List<Dialog> getDialogs()
Dialog listpublic Map<String,String> getProfile(String dialogId, Integer clientId, String... names)
dialogId - The dialog identifierclientId - the client idnames - the profile variables to returnpublic Dialog updateDialog(String dialogId, File dialogFile)
dialogId - The dialog identifierdialogFile - The dialog fileDialogCopyright © 2015–2016. All rights reserved.