Rule Designer API

ilog.rules.brl.brldf
Interface IlrBRLVariableProvider

All Known Implementing Classes:
IlrBRLCompositeVariableProvider, IlrBRLDefaultVariableProvider, IlrDTVariableManager

public interface IlrBRLVariableProvider

IlrBRLVariableProvider represents a variable provider. A variable provider is a class that allows the rule being edited or parsed to access variables that are defined out of its scope. The variable provider is an interface on a repository of variables. These variables must implement the IlrBRLVariable interface.

For example, a variable provider can be used to access ruleset variables and ruleset parameters in the context of a rule project. The variable provider constitutes the outer scope of variable definition for a rule. It is used through the IlrBRLSemanticContext by the rule parser or the rule editors.

See Also:
IlrBRLVariable, IlrBRLSemanticContext

Nested Class Summary
static interface IlrBRLVariableProvider.Visitor
          This interface specifies a variable visitor.
 
Method Summary
 IlrBRLVariable getVariable(IlrVocabulary vocabulary, String name)
          Returns a variable with that name, or null if there is no variable corresponding to that name.
 boolean visit(IlrVocabulary vocabulary, IlrBRLVariableProvider.Visitor visitor)
          Visits the variable provider by iterating on all variables declared by this provider.
 

Method Detail

getVariable

IlrBRLVariable getVariable(IlrVocabulary vocabulary,
                           String name)
Returns a variable with that name, or null if there is no variable corresponding to that name.

Parameters:
vocabulary - The vocabulary in which this variable is looked up.
name - The name of the variable to look for.

visit

boolean visit(IlrVocabulary vocabulary,
              IlrBRLVariableProvider.Visitor visitor)
Visits the variable provider by iterating on all variables declared by this provider. The visit must be stopped as soon as the given visitor returns false.

Parameters:
vocabulary - The vocabulary in which variables are looked up.
visitor - A variable visitor called for all variables declared in this variable provider.

Rule Designer API

© Copyright IBM Corp. 1987, 2013