public class BotRule extends Object implements org.easyrules.api.Rule, Comparable, Serializable
| Constructor and Description |
|---|
BotRule() |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Object object) |
boolean |
evaluate() |
void |
execute() |
List<YamlButton> |
getButtons()
Returns the Buttons
|
String |
getDataKey()
Returns the DataKey
|
String |
getDescription() |
String |
getMessage(Map<String,String> mapData,
Locale locale)
Returns the Question
|
String |
getMessageType()
Returns the MessageType
|
String |
getName() |
int |
getPriority() |
String |
getResponseComment(Map<String,String> mapData,
Locale locale)
Provides a comment after the user's response
|
ResponseProcessor |
getResponseProcessor()
Gets the response processor
|
void |
setButtons(List<YamlButton> listButtons)
Sets the Buttons
|
void |
setDataKey(String strDataKey)
Sets the DataKey
|
void |
setDescription(String strDescription)
Sets the Description
|
void |
setExecutor(BotExecutor executor)
Define the current executor using the rule
|
void |
setListConditions(List<Condition> listConditions)
Sets the conditions list
|
void |
setMessageTemplate(String strQuestion)
Sets the Question
|
void |
setMessageType(String strMessageType)
Sets the MessageType
|
void |
setName(String strName)
Sets the Name
|
void |
setPriority(int nPriority)
Sets the Priority
|
void |
setResponseCommentTemplate(String strResponseCommentTemplate)
Define the response comment template
|
void |
setResponseProcessor(ResponseProcessor responseProcessor)
Sets the response processor
|
String |
toString() |
public String getName()
getName in interface org.easyrules.api.Rulepublic void setName(String strName)
strName - The Namepublic String getDescription()
getDescription in interface org.easyrules.api.Rulepublic void setDescription(String strDescription)
strDescription - The Descriptionpublic String getMessageType()
public void setMessageType(String strMessageType)
strMessageType - The MessageTypepublic int getPriority()
getPriority in interface org.easyrules.api.Rulepublic void setPriority(int nPriority)
nPriority - The Prioritypublic String getDataKey()
public void setDataKey(String strDataKey)
strDataKey - The DataKeypublic List<YamlButton> getButtons()
public void setButtons(List<YamlButton> listButtons)
listButtons - The Buttonspublic String getMessage(Map<String,String> mapData, Locale locale)
mapData - The map of datalocale - The localepublic void setMessageTemplate(String strQuestion)
strQuestion - The Questionpublic void setExecutor(BotExecutor executor)
executor - The executorpublic void setResponseProcessor(ResponseProcessor responseProcessor)
responseProcessor - the response processorpublic ResponseProcessor getResponseProcessor()
public void setListConditions(List<Condition> listConditions)
listConditions - The list of conditionpublic void setResponseCommentTemplate(String strResponseCommentTemplate)
strResponseCommentTemplate - The templatepublic String getResponseComment(Map<String,String> mapData, Locale locale)
mapData - The datalocale - The localepublic boolean evaluate()
evaluate in interface org.easyrules.api.Rulepublic void execute()
throws Exception
execute in interface org.easyrules.api.RuleExceptionpublic int compareTo(Object object)
compareTo in interface ComparableCopyright © 2018 City of Paris. All rights reserved.