Class ImageDefinition
java.lang.Object
com.aquima.interactions.composer.model.definition.ElementDefinition
com.aquima.interactions.composer.model.definition.ImageDefinition
- All Implemented Interfaces:
IElementDefinition
,Serializable
This text node definition is used to include an image from the context in the result of a text element.
- Since:
- 6.0
- Author:
- Jon van Leuven
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ImageDefinition
(IImageDS datasource, IParserFactory parserFactory) Construct an image definition based on a datasource.protected
ImageDefinition
(ImageDefinition other) -
Method Summary
Modifier and TypeMethodDescriptionThis method returns the expression parser assigned to this image definition.This method returns the image content type.byte[]
This method returns the data of the image.This method returns the image type.This method return the QR Code content of the image.getType()
This method returns the type of the element.void
setImageData
(byte[] data) This method assign a new value to the image data.Methods inherited from class com.aquima.interactions.composer.model.definition.ElementDefinition
equals, getName, getPresentationStyles, hashCode, isInternalDefinition, setInternalDefinition, setPresentationStyles
-
Constructor Details
-
ImageDefinition
Construct an image definition based on a datasource.- Parameters:
datasource
- The data source providing the image information.parserFactory
- The factory used for creating an expression factory.- Throws:
InitializationException
- Is throw if the image definition could not be constructed.
-
ImageDefinition
-
-
Method Details
-
getImageData
public byte[] getImageData()This method returns the data of the image.- Returns:
- Byte array containing the image raw data.
-
setImageData
public void setImageData(byte[] data) This method assign a new value to the image data.- Parameters:
data
- A byte array.
-
getImageType
This method returns the image type.- Returns:
- ImageType
-
getImageContentType
This method returns the image content type.- Returns:
- ImageContentType
-
getQRCodeContent
This method return the QR Code content of the image.- Returns:
- String containing the QR Code content.
-
getExpressionParser
This method returns the expression parser assigned to this image definition.- Returns:
- The expression parser.
-
getType
Description copied from interface:IElementDefinition
This method returns the type of the element.- Returns:
- The type of the element the definition represents.
-