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() |
String |
getDataKey()
Returns the DataKey
|
String |
getDescription() |
String |
getDescriptionI18nKey()
Returns the DescriptionI18nKey
|
String |
getName() |
int |
getPriority() |
String |
getQuestion(Map<String,String> mapData,
Locale locale)
Returns the Question
|
String |
getQuestionTemplateI18nKey()
Returns the QuestionTemplateI18nKey
|
String |
getResponseComment(Map<String,String> mapData,
Locale locale)
Provides a comment after the user's response
|
String |
getResponseCommentTemplateI18nKey()
Returns the ResponseCommentTemplateI18nKey
|
ResponseProcessor |
getResponseProcessor()
Gets the response processor
|
void |
setDataKey(String strDataKey)
Sets the DataKey
|
void |
setDescription(String strDescription)
Sets the Description
|
void |
setDescriptionI18nKey(String strDescriptionI18nKey)
Sets the DescriptionI18nKey
|
void |
setExecutor(BotExecutor executor)
Define the current executor using the rule
|
void |
setListConditions(List<Condition> listConditions)
Sets the conditions list
|
void |
setName(String strName)
Sets the Name
|
void |
setPriority(int nPriority)
Sets the Priority
|
void |
setQuestionTemplate(String strQuestion)
Sets the Question
|
void |
setQuestionTemplateI18nKey(String strQuestionTemplateI18nKey)
Sets the QuestionTemplateI18nKey
|
void |
setResponseCommentTemplate(String strResponseCommentTemplate)
Define the response comment template
|
void |
setResponseCommentTemplateI18nKey(String strResponseCommentTemplateI18nKey)
Sets the ResponseCommentTemplateI18nKey
|
void |
setResponseProcessor(ResponseProcessor responseProcessor)
Sets the response processor
|
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 getDescriptionI18nKey()
public void setDescriptionI18nKey(String strDescriptionI18nKey)
strDescriptionI18nKey - The DescriptionI18nKeypublic String getQuestionTemplateI18nKey()
public void setQuestionTemplateI18nKey(String strQuestionTemplateI18nKey)
strQuestionTemplateI18nKey - The QuestionTemplateI18nKeypublic String getResponseCommentTemplateI18nKey()
public void setResponseCommentTemplateI18nKey(String strResponseCommentTemplateI18nKey)
strResponseCommentTemplateI18nKey - The ResponseCommentTemplateI18nKeypublic 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 String getQuestion(Map<String,String> mapData, Locale locale)
mapData - The map of datalocale - The localepublic void setQuestionTemplate(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 © 2017 City of Paris. All rights reserved.