Class MappingComposer
- java.lang.Object
-
- com.aquima.interactions.mapping.impl.MappingComposer
-
- All Implemented Interfaces:
IMappingComposer
public class MappingComposer extends Object implements IMappingComposer
IMappingComposer implementation used by services.- Since:
- 12.3
- Author:
- S. Wartenberg
-
-
Constructor Summary
Constructors Constructor Description MappingComposer(InferenceContext context, IComposerHandler handler, IComposer composer)
Constructs an mapping composer with the required arguments.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Asset
expandAsset(String assetName, String assetFormat)
looks up a text (asset) for the specified name and returns the expanded content.IMappingComposer
forInstance(IEntityInstance instance)
This method returns a new element composer in which the specified instance is active.AssetDefinition
getAsset(String name)
Looks up the text definition (also called an asset) for the specified name and returns the definition model.
-
-
-
Constructor Detail
-
MappingComposer
public MappingComposer(InferenceContext context, IComposerHandler handler, IComposer composer)
Constructs an mapping composer with the required arguments.- Parameters:
context
- The inference context that should be used.handler
- Handler for container expanders.composer
- Composer.
-
-
Method Detail
-
forInstance
public IMappingComposer forInstance(IEntityInstance instance)
Description copied from interface:IMappingComposer
This method returns a new element composer in which the specified instance is active.- Specified by:
forInstance
in interfaceIMappingComposer
- Parameters:
instance
- The instance that should be active in the new composer.- Returns:
- An element composer in which the provided instance is active.
-
expandAsset
public Asset expandAsset(String assetName, String assetFormat)
Description copied from interface:IMappingComposer
looks up a text (asset) for the specified name and returns the expanded content. In case of an unknown element an exception is thrown- Specified by:
expandAsset
in interfaceIMappingComposer
- Parameters:
assetName
- The name of the text asset as defined in studio.assetFormat
- The asset format that should be used to locate the correct text content.- Returns:
- A asset object which is never null
-
getAsset
public AssetDefinition getAsset(String name)
Description copied from interface:IMappingComposer
Looks up the text definition (also called an asset) for the specified name and returns the definition model.- Specified by:
getAsset
in interfaceIMappingComposer
- Parameters:
name
- The name of the text as defined in studio.- Returns:
- A text definition model which is never null
-
-