Package org.citrusframework.mail.model
Class BodyPart
java.lang.Object
org.citrusframework.mail.model.BodyPart
- Direct Known Subclasses:
AttachmentPart
Body part representation holds content as String and optional attachment parts.
- Since:
- 1.4
- Author:
- Christoph Deppisch
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected BodyPart.Attachmentsprotected Stringprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPart(AttachmentPart part) Adds new attachment part.Gets the attachment list.Gets the content as string.Gets the content type.booleanChecks if attachments are present.voidsetAttachments(BodyPart.Attachments attachments) Sets the attachment list.voidsetContent(String content) Sets the content as string.voidsetContentType(String contentType) Sets the content type.
-
Field Details
-
contentType
-
-
attachments
-
-
Constructor Details
-
BodyPart
public BodyPart()Default constructor. -
BodyPart
Default constructor using content and contentType.- Parameters:
content-contentType-
-
-
Method Details
-
addPart
Adds new attachment part.- Parameters:
part-
-
getContentType
Gets the content type.- Returns:
-
setContentType
Sets the content type.- Parameters:
contentType-
-
getContent
Gets the content as string.- Returns:
-
setContent
Sets the content as string.- Parameters:
content-
-
getAttachments
Gets the attachment list.- Returns:
-
setAttachments
Sets the attachment list.- Parameters:
attachments-
-
hasAttachments
public boolean hasAttachments()Checks if attachments are present.- Returns:
-