Package io.quarkus.mailer
Class Attachment
- java.lang.Object
-
- io.quarkus.mailer.Attachment
-
public class Attachment extends Object
Defines an attachment.Instances of this class are not thread-safe.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DISPOSITION_ATTACHMENT
Disposition for attachments.static String
DISPOSITION_INLINE
Disposition for inline attachments.
-
Constructor Summary
Constructors Constructor Description Attachment(String name, byte[] data, String contentType)
Creates a newAttachment
.Attachment(String name, byte[] data, String contentType, String contentId)
Creates a newAttachment
.Attachment(String name, byte[] data, String contentType, String description, String disposition)
Creates a newAttachment
.Attachment(String name, File file, String contentType)
Creates a newAttachment
.Attachment(String name, File file, String contentType, String contentId)
Creates a newAttachment
.Attachment(String name, org.reactivestreams.Publisher<Byte> data, String contentType)
Creates a newAttachment
.Attachment(String name, org.reactivestreams.Publisher<Byte> data, String contentType, String contentId)
Creates a newAttachment
.Attachment(String name, org.reactivestreams.Publisher<Byte> data, String contentType, String description, String disposition)
Creates a newAttachment
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getContentId()
String
getContentType()
org.reactivestreams.Publisher<Byte>
getData()
String
getDescription()
String
getDisposition()
File
getFile()
String
getName()
boolean
isInlineAttachment()
Attachment
setContentId(String contentId)
Attachment
setContentType(String contentType)
Attachment
setData(byte[] data)
Attachment
setData(org.reactivestreams.Publisher<Byte> data)
Attachment
setDescription(String description)
Attachment
setDisposition(String disposition)
Attachment
setFile(File file)
Attachment
setName(String name)
-
-
-
Field Detail
-
DISPOSITION_INLINE
public static final String DISPOSITION_INLINE
Disposition for inline attachments.- See Also:
- Constant Field Values
-
DISPOSITION_ATTACHMENT
public static final String DISPOSITION_ATTACHMENT
Disposition for attachments.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Attachment
public Attachment(String name, File file, String contentType)
Creates a newAttachment
. Disposition is set toattachment
.- Parameters:
name
- the namefile
- the filecontentType
- the content type
-
Attachment
public Attachment(String name, File file, String contentType, String contentId)
Creates a newAttachment
. Disposition is set toinline
.- Parameters:
name
- the namefile
- the filecontentType
- the content typecontentId
- the content id
-
Attachment
public Attachment(String name, byte[] data, String contentType)
Creates a newAttachment
. Disposition is set toattachment
.- Parameters:
name
- the namedata
- the datacontentType
- the content type
-
Attachment
public Attachment(String name, org.reactivestreams.Publisher<Byte> data, String contentType)
Creates a newAttachment
. Disposition is set toattachment
.- Parameters:
name
- the namedata
- the data as a stream ofByte
contentType
- the content type
-
Attachment
public Attachment(String name, byte[] data, String contentType, String contentId)
Creates a newAttachment
. Disposition is set toinline
.- Parameters:
name
- the namedata
- the datacontentType
- the content typecontentId
- the content id
-
Attachment
public Attachment(String name, org.reactivestreams.Publisher<Byte> data, String contentType, String contentId)
Creates a newAttachment
. Disposition is set toinline
.- Parameters:
name
- the namedata
- the data as a stream ofByte
contentType
- the content typecontentId
- the content id
-
Attachment
public Attachment(String name, byte[] data, String contentType, String description, String disposition)
Creates a newAttachment
.- Parameters:
name
- the namedata
- the datacontentType
- the content typedescription
- the descriptiondisposition
- the disposition
-
Attachment
public Attachment(String name, org.reactivestreams.Publisher<Byte> data, String contentType, String description, String disposition)
Creates a newAttachment
.- Parameters:
name
- the namedata
- the data as a stream ofByte
contentType
- the content typedescription
- the descriptiondisposition
- the disposition
-
-
Method Detail
-
getName
public String getName()
-
setName
public Attachment setName(String name)
-
getFile
public File getFile()
-
setFile
public Attachment setFile(File file)
-
getDescription
public String getDescription()
-
setDescription
public Attachment setDescription(String description)
-
getDisposition
public String getDisposition()
-
setDisposition
public Attachment setDisposition(String disposition)
-
getData
public org.reactivestreams.Publisher<Byte> getData()
-
setData
public Attachment setData(byte[] data)
-
setData
public Attachment setData(org.reactivestreams.Publisher<Byte> data)
-
getContentType
public String getContentType()
-
setContentType
public Attachment setContentType(String contentType)
-
getContentId
public String getContentId()
-
setContentId
public Attachment setContentId(String contentId)
-
isInlineAttachment
public boolean isInlineAttachment()
- Returns:
true
if the disposition is set toinline
.
-
-