|
Decision Center API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.rules.teamserver.common.IlrBRLParseableRuleElement ilog.rules.webui.IlrWBRLSyntacticRuleElement
public class IlrWBRLSyntacticRuleElement
IlrWBRLSyntacticRuleElement
is an implementation of a BRL rule element to be used in conjunction with the web syntactic editor.
An IlrWBRLSyntacticRuleElement
instance is initialized with a:
IlrWBRLSyntacticRuleElement
offers some convenience methods that you convert the rule to a given locale. You can:
IlrBRLParseableRuleElement.convert(java.util.Locale)
IlrBRLParseableRuleElement.getDefinition(java.util.Locale)
getHTMLText(java.util.Locale)
The following code example shows you how to return the HTML definition of a rule element:
private static String getHTMLDefinition(IlrBusinessRule element) throws IlrApplicationException { IlrWBRLSyntacticRuleElement ruleElement = getRuleElement(element.getSession(), (IlrActionRule) element); if (ruleElement != null) { return ruleElement.getHTMLText(element.getSession().getUserLocale()); } return ""; }
IlrWSyntacticEditor.setBRLRuleElement(IlrWBRLSyntacticRuleElement, java.util.Locale)
,
IlrDTWTableComponent
,
Serialized Form
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ilog.rules.teamserver.common.IlrBRLParseableRuleElement |
---|
ilog.rules.teamserver.common.IlrBRLParseableRuleElement.NoVocabularyException, ilog.rules.teamserver.common.IlrBRLParseableRuleElement.ParserConfiguration |
Constructor Summary | |
---|---|
IlrWBRLSyntacticRuleElement(ilog.rules.vocabulary.model.IlrVocabularyManager vocabularyManager,
ilog.rules.brl.brldf.IlrBRLVariableProvider variableProvider,
String languageDefinitionPath,
Locale locale)
Constructs a new syntactic rule element. |
Method Summary | |
---|---|
void |
convert(Locale targetLocale,
boolean throwSentenceException)
Convert this rule element to the given target locale. |
String |
getDefinition()
|
String |
getHTMLText(Locale targetLocale)
Gets the HTML definition of this rule in the given locale. |
ilog.rules.brl.syntaxtree.IlrSyntaxTree |
getSyntaxTree()
|
static List |
parseTemplateInfo(String templateInfo)
Parses the template info string and returns a list of template info. |
void |
setDefinition(String definition)
|
void |
setSyntaxTree(ilog.rules.brl.syntaxtree.IlrSyntaxTree syntaxTree)
|
void |
tokenAdded(ilog.rules.brl.tokenmodel.TokenAddedEvent event)
|
void |
tokenChanged(ilog.rules.brl.tokenmodel.TokenChangedEvent event)
|
void |
tokenRemoved(ilog.rules.brl.tokenmodel.TokenRemovedEvent event)
|
Methods inherited from class ilog.rules.teamserver.common.IlrBRLParseableRuleElement |
---|
clearParserManager, convert, forceSemanticParser, getBRLParserManager, getCategoryFilter, getDefinition, getDefinitionField, getDefinitionInfo, getDocumentation, getElement, getLanguageDefinition, getLanguageDefinition, getLanguageDefinitionPathField, getLocale, getName, getPackageName, getParser, getParsingErrors, getParsingErrorsField, getPropertyValue, getRootFilter, getRootName, getSyntaxTreeField, getTemplateConsistencyErrors, getTemplateInfo, getTemplateInfoField, getTranslationProperties, getVariableProviderField, getVocabulary, getVocabularyManagerField, hasParsingErrors, isTemplate, parse, setCategoryFilter, setDefinitionfield, setDefinitionInfo, setDocumentation, setElement, setLanguageDefinition, setLanguageDefinitionPathField, setName, setPackageName, setParsingErrorsField, setPropertyValue, setRootFilter, setRootName, setSyntaxTreeField, setTemplate, setTemplateAST, setTemplateInfo, setTemplateInfoField, setTranslationProperties, templateInfoToString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IlrWBRLSyntacticRuleElement(ilog.rules.vocabulary.model.IlrVocabularyManager vocabularyManager, ilog.rules.brl.brldf.IlrBRLVariableProvider variableProvider, String languageDefinitionPath, Locale locale)
vocabularyManager
- The vocabulary manager to be used for this rule.variableProvider
- The variable provider to be used for this rule.languageDefinitionPath
- The path of the language definition, for instance "ilog/rules/brl/bal60/bal"
.locale
- The locale of the rule to be edited.Method Detail |
---|
public String getDefinition()
getDefinition
in interface ilog.rules.brl.IlrBRLParserInput
getDefinition
in class ilog.rules.teamserver.common.IlrBRLParseableRuleElement
public void setDefinition(String definition)
setDefinition
in interface ilog.rules.brl.IlrMutableBRLRuleElement
setDefinition
in class ilog.rules.teamserver.common.IlrBRLParseableRuleElement
public void setSyntaxTree(ilog.rules.brl.syntaxtree.IlrSyntaxTree syntaxTree)
setSyntaxTree
in interface ilog.rules.brl.IlrMutableBRLRuleElement
setSyntaxTree
in class ilog.rules.teamserver.common.IlrBRLParseableRuleElement
public ilog.rules.brl.syntaxtree.IlrSyntaxTree getSyntaxTree()
getSyntaxTree
in interface ilog.rules.brl.IlrBRLRuleElement
getSyntaxTree
in class ilog.rules.teamserver.common.IlrBRLParseableRuleElement
public String getHTMLText(Locale targetLocale)
convert(Locale), this method
does not convert the inner implementation of the rule element.
- Overrides:
getHTMLText
in class ilog.rules.teamserver.common.IlrBRLParseableRuleElement
- Parameters:
targetLocale
- the target locale
- Returns:
- the HTML definition of the rule, in the given locale.
tokenChanged
public void tokenChanged(ilog.rules.brl.tokenmodel.TokenChangedEvent event)
- Specified by:
tokenChanged
in interface ilog.rules.brl.tokenmodel.TokenModelListener
tokenAdded
public void tokenAdded(ilog.rules.brl.tokenmodel.TokenAddedEvent event)
- Specified by:
tokenAdded
in interface ilog.rules.brl.tokenmodel.TokenModelListener
tokenRemoved
public void tokenRemoved(ilog.rules.brl.tokenmodel.TokenRemovedEvent event)
- Specified by:
tokenRemoved
in interface ilog.rules.brl.tokenmodel.TokenModelListener
convert
public void convert(Locale targetLocale,
boolean throwSentenceException)
- Convert this rule element to the given target locale. This will convert the definition and the syntax tree associated to this rule element.
- Overrides:
convert
in class ilog.rules.teamserver.common.IlrBRLParseableRuleElement
- Parameters:
targetLocale
- the target locale.
parseTemplateInfo
public static List parseTemplateInfo(String templateInfo)
- Parses the template info string and returns a list of template info.
- Parameters:
templateInfo
- the template info as a string, as it comes from the database
- Returns:
- the list of template info
Skip navigation links
Overview
Package
Class
Tree
Deprecated
Index
Help
Decision Center API
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
© Copyright IBM Corp. 1987, 2013