Class TslTypeScope
java.lang.Object
com.aquima.interactions.expressions.tsl.evaluator.scope.TslTypeScope
- All Implemented Interfaces:
IDefinitionSource
Object containing the type definitions for a TSL expression.
- Since:
- 6.4
- Author:
- O. Kerpershoek
-
Constructor Summary
ConstructorDescriptionTslTypeScope
(IDefinitionSource source) Constructs a type scope by wrapping the scope passed as argument. -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the alias of the of the current loop.protected String
getLocalType
(String alias) getNamedObjectDefinition
(String objectName, String instanceName) This method returns the object definition for the specified type and instance name.getObjectDefinition
(String name) This method returns the object definition for the specified type name.getSharedAncestor
(String expectedType, String receivedType) Determines the shared ancestor of two entity types.getValueDefinition
(String name) This method returns the value definition of a label (or global property?).boolean
This method returns a boolean indicating if a sequence number is available.void
popType()
This method may be used to remove the last registered type.void
This method may be used to declare a new type.void
This function will be called to register a usage of a reusable expression to the implementor of this interface.replaceSequenceNr
(String expression) This method may be used to replace a sequence number symbol with an identifier that will point to the actual sequence number.
-
Constructor Details
-
TslTypeScope
Constructs a type scope by wrapping the scope passed as argument.- Parameters:
source
- The original scope object that is wrapped by this scope.
-
-
Method Details
-
getNamedObjectDefinition
Description copied from interface:IDefinitionSource
This method returns the object definition for the specified type and instance name.- Specified by:
getNamedObjectDefinition
in interfaceIDefinitionSource
- Parameters:
objectName
- The name of the type for which the definition is requested.instanceName
- The instance name for the specified type for which the definition is requested.- Returns:
- An object definition when available. null otherwise.
-
getObjectDefinition
Description copied from interface:IDefinitionSource
This method returns the object definition for the specified type name.- Specified by:
getObjectDefinition
in interfaceIDefinitionSource
- Parameters:
name
- The name of the type for which the definition is requested.- Returns:
- The definition of the object with the specified type name.
-
getValueDefinition
Description copied from interface:IDefinitionSource
This method returns the value definition of a label (or global property?). For example: PI- Specified by:
getValueDefinition
in interfaceIDefinitionSource
- Parameters:
name
- The name of the global value that is requested.- Returns:
- An object containing the value definition for the specified identifier.
-
pushType
This method may be used to declare a new type.- Parameters:
alias
- The name for which the type is declared.typeName
- The type name that is declared (entity name).
-
popType
public void popType()This method may be used to remove the last registered type. -
getLocalType
-
hasSequenceNr
public boolean hasSequenceNr()This method returns a boolean indicating if a sequence number is available. Sequence numbers are only available inside a foreach loop.- Returns:
- a boolean indicating if a sequence number is available.
-
replaceSequenceNr
This method may be used to replace a sequence number symbol with an identifier that will point to the actual sequence number.- Parameters:
expression
- The expression in which the sequence number symbols should be replaced.- Returns:
- Expression that contains expanded sequence numbers.
- Throws:
ParseException
- This exception is thrown when a sequence number is used outside a foreach loop.
-
getCurrentAlias
This method returns the alias of the of the current loop.- Returns:
- the alias of the of the current loop.
-
registerExpressionTemplate
Description copied from interface:IDefinitionSource
This function will be called to register a usage of a reusable expression to the implementor of this interface. Added for studio 6.x+- Specified by:
registerExpressionTemplate
in interfaceIDefinitionSource
- Parameters:
name
- The name of the expression template.
-