Class ForeachContext
java.lang.Object
com.aquima.interactions.expressions.tsl.evaluator.nodes.ForeachContext
- All Implemented Interfaces:
IValueSource
Value source wrapped used by foreach loops.
- Since:
- 6.4
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorsConstructorDescriptionForeachContext
(IValueSource source, String typeName, ICompoundValue compoundValue, int index) Creates the wrapper with the required arguments. -
Method Summary
Modifier and TypeMethodDescriptiongetAllObjects
(String name, boolean includeDerivedObjects) This method can be used to request all objects of a specified type.getNamedObject
(String objectName, 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
-
ForeachContext
public ForeachContext(IValueSource source, String typeName, ICompoundValue compoundValue, int index) Creates the wrapper with the required arguments.- Parameters:
source
- The original value source that should be wrapped.typeName
- The entity type name of the objects that is iterated over.compoundValue
- The entity instance.index
- The index of the instance.
-
-
Method Details
-
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.
-
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.
-
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
- Specified by:
getValue
in interfaceIValueSource
- Parameters:
name
- The name of the global value that is requested.- Returns:
- The value for the specified name.
-
getNamedObject
Description copied from interface:IValueSource
This method will request an object that is a static instance.- Specified by:
getNamedObject
in interfaceIValueSource
- Parameters:
objectName
- The name object the objectinstanceName
- The name of the instance- Returns:
- Object value for the specified type name, null when not known.
-