java.lang.Object
com.aquima.interactions.expressions.tsl.evaluator.scope.TslTypeScope
All Implemented Interfaces:
IDefinitionSource

public class TslTypeScope extends Object implements IDefinitionSource
Object containing the type definitions for a TSL expression.
Since:
6.4
Author:
O. Kerpershoek
  • Constructor Details

    • TslTypeScope

      public TslTypeScope(IDefinitionSource source)
      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

      public IObjectDefinition getNamedObjectDefinition(String objectName, String instanceName)
      Description copied from interface: IDefinitionSource
      This method returns the object definition for the specified type and instance name.
      Specified by:
      getNamedObjectDefinition in interface IDefinitionSource
      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

      public IObjectDefinition getObjectDefinition(String name)
      Description copied from interface: IDefinitionSource
      This method returns the object definition for the specified type name.
      Specified by:
      getObjectDefinition in interface IDefinitionSource
      Parameters:
      name - The name of the type for which the definition is requested.
      Returns:
      The definition of the object with the specified type name.
    • getSharedAncestor

      public String getSharedAncestor(String expectedType, String receivedType)
      Description copied from interface: IDefinitionSource
      Determines the shared ancestor of two entity types. If no shared ancestor can be found null will be returned
      Specified by:
      getSharedAncestor in interface IDefinitionSource
      Parameters:
      expectedType - The type name of the first entity.
      receivedType - The type name of the second entity.
      Returns:
      The type name of an ancestor which is shared by both types, or null when the two types do not have a common ancestor.
    • getValueDefinition

      public IValueDefinition getValueDefinition(String name)
      Description copied from interface: IDefinitionSource
      This method returns the value definition of a label (or global property?). For example: PI
      Specified by:
      getValueDefinition in interface IDefinitionSource
      Parameters:
      name - The name of the global value that is requested.
      Returns:
      An object containing the value definition for the specified identifier.
    • pushType

      public void pushType(String alias, String typeName)
      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

      protected String getLocalType(String alias)
    • 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

      public String 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.
      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

      public String getCurrentAlias()
      This method returns the alias of the of the current loop.
      Returns:
      the alias of the of the current loop.
    • registerExpressionTemplate

      public void registerExpressionTemplate(String name)
      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 interface IDefinitionSource
      Parameters:
      name - The name of the expression template.