Class Embedding
- java.lang.Object
-
- com.trivago.cluecumber.engine.json.pojo.Embedding
-
public class Embedding extends Object
This class represents scenario attachments.
-
-
Constructor Summary
Constructors Constructor Description Embedding()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecodeData(String data)Encode the data based on its mime type.StringgetData()Get the raw attachment data.StringgetDecodedData()Retrieve the decoded data.StringgetFileEnding()Determine the generated file ending.StringgetFilename()Retrieve the attachment's file name after preprocessing.MimeTypegetMimeType()Retrieve the mime type of this attachment.StringgetName()Get the name of this attachment.booleanisExternalContent()This specifies if it is a link that refers to external data, e.g.booleanisImage()Check if the attachment is an image.booleanisPlainText()Check if the attachment is a plain text.voidsetData(String data)Set the attachment data.voidsetFilename(String filename)Set the filename after preprocessing.voidsetMimeType(MimeType mimeType)Set the attachment's mime type.voidsetName(String name)Set the name of this attachment.
-
-
-
Method Detail
-
getData
public String getData()
Get the raw attachment data.- Returns:
- The data as string.
-
setData
public void setData(String data)
Set the attachment data.- Parameters:
data- The data string.
-
getDecodedData
public String getDecodedData()
Retrieve the decoded data.- Returns:
- The decoded data string.
-
decodeData
public void decodeData(String data)
Encode the data based on its mime type.- Parameters:
data- The data string.
-
getMimeType
public MimeType getMimeType()
Retrieve the mime type of this attachment.- Returns:
- The
MimeTypeinstance.
-
setMimeType
public void setMimeType(MimeType mimeType)
Set the attachment's mime type.- Parameters:
mimeType- TheMimeTypeinstance.
-
getName
public String getName()
Get the name of this attachment.- Returns:
- The name string.
-
setName
public void setName(String name)
Set the name of this attachment.- Parameters:
name- The attachment name string.
-
getFilename
public String getFilename()
Retrieve the attachment's file name after preprocessing.- Returns:
- The file name string.
-
setFilename
public void setFilename(String filename)
Set the filename after preprocessing.- Parameters:
filename- The file name string.
-
isImage
public boolean isImage()
Check if the attachment is an image.- Returns:
- true if this is an image.
-
isPlainText
public boolean isPlainText()
Check if the attachment is a plain text.- Returns:
- true if this is text.
-
getFileEnding
public String getFileEnding()
Determine the generated file ending.- Returns:
- The file ending as string.
-
isExternalContent
public boolean isExternalContent()
This specifies if it is a link that refers to external data, e.g. an externally hosted video file.- Returns:
- true if this is externally hosted.s
-
-