Class ContextDelegate
java.lang.Object
com.aquima.interactions.rule.parser.ContextDelegate
- All Implemented Interfaces:
IValueSource
This class maps the inference context methods to the IValueSource interface.
- Since:
- 5.0
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionContextDelegate
(InferenceContext context) Constructs the context delegate for the specified inference context. -
Method Summary
Modifier and TypeMethodDescriptiongetAllObjects
(String name, boolean includeDerivedObjects) This method can be used to request all objects of a specified type.getNamedObject
(String entityName, String instanceName) This method will request an object that is a static instance.This method will request an object that is either a singleton object or an active object (from the InstanceStack).This method will be used to request a single static value.
-
Constructor Details
-
ContextDelegate
Constructs the context delegate for the specified inference context.- Parameters:
context
- The inference context for which the delegate should be constructed.
-
-
Method Details
-
getValue
Description copied from interface:IValueSource
This method will be used to request a single static value. Examples of such values are Defines like- PI
- TODAY
- VERSION
IF a THEN 10 IF a THEN 10 ELSE UNKNOWN In the example above this method will be called to request the value of a.- Specified by:
getValue
in interfaceIValueSource
- Parameters:
name
- The name of the global value that is requested.- Returns:
- The value for the specified name.
-
getObject
Description copied from interface:IValueSource
This method will request an object that is either a singleton object or an active object (from the InstanceStack).- Specified by:
getObject
in interfaceIValueSource
- Parameters:
name
- The type name for which the object value is requested.- Returns:
- Object value for the specified type name.
-
getAllObjects
Description copied from interface:IValueSource
This method can be used to request all objects of a specified type. When no objects are available for the specified type, an empty array should be returned.- Specified by:
getAllObjects
in interfaceIValueSource
- Parameters:
name
- The type name for which all object are requested.includeDerivedObjects
- Boolean indicating if objects derived from the specified type should also be returned.- Returns:
- Array containing all objects of the specified type.
-
getNamedObject
Description copied from interface:IValueSource
This method will request an object that is a static instance.- Specified by:
getNamedObject
in interfaceIValueSource
- Parameters:
entityName
- The name object the objectinstanceName
- The name of the instance- Returns:
- Object value for the specified type name, null when not known.
-