public class BotExecutor extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static String |
DATA_USER_EMAIL |
static String |
DATA_USER_FIRSTNAME |
static String |
DATA_USER_LASTNAME |
| Constructor and Description |
|---|
BotExecutor(Bot bot)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBotPost(String strContent)
Add a post
|
void |
addPost(Post post)
Add a post
|
void |
addUserPost(String strContent)
Add a post
|
void |
fireRules()
Executes rules.
|
Object |
getBotAvatarUrl()
Returns bot avatar URL
|
String |
getBotName()
Returns the bot name
|
Map<String,String> |
getDataMap()
Gets all the data map
|
Locale |
getLocale()
Returns the Locale
|
List<Post> |
getPosts()
The post list
|
String |
getQuestion(javax.servlet.http.HttpServletRequest request)
Gets the question
|
void |
processResponse(String strResponse)
Process the response
|
void |
setCurrentRule(BotRule rule)
Sets the current rule
|
void |
setLocale(Locale locale)
Sets the Locale
|
void |
setLuteceUser(javax.servlet.http.HttpServletRequest request)
Add MyLutece user's info to data map
|
void |
traceData()
Trace utils
|
public static final String DATA_USER_FIRSTNAME
public static final String DATA_USER_LASTNAME
public static final String DATA_USER_EMAIL
public BotExecutor(Bot bot)
bot - The bot to executepublic Locale getLocale()
public void setLocale(Locale locale)
locale - The Localepublic String getQuestion(javax.servlet.http.HttpServletRequest request)
request - The HTTP requestpublic void processResponse(String strResponse) throws ResponseProcessingException
strResponse - The user responseResponseProcessingException - if an exception occurs during processingpublic void setCurrentRule(BotRule rule)
rule - The rulepublic void fireRules()
public void addPost(Post post)
post - The postpublic void addBotPost(String strContent)
strContent - The contentpublic void addUserPost(String strContent)
strContent - The contentpublic void traceData()
public String getBotName()
public void setLuteceUser(javax.servlet.http.HttpServletRequest request)
request - public Object getBotAvatarUrl()
Copyright © 2016 City of Paris. All rights reserved.