Package com.consol.citrus.mail.model
Class BodyPart
- java.lang.Object
-
- com.consol.citrus.mail.model.BodyPart
-
- Direct Known Subclasses:
AttachmentPart
public class BodyPart extends Object
Body part representation holds content as String and optional attachment parts.- Since:
- 1.4
- Author:
- Christoph Deppisch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBodyPart.Attachments
-
Field Summary
Fields Modifier and Type Field Description protected BodyPart.Attachmentsattachmentsprotected Stringcontentprotected StringcontentType
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPart(AttachmentPart part)Adds new attachment part.BodyPart.AttachmentsgetAttachments()Gets the attachment list.StringgetContent()Gets the content as string.StringgetContentType()Gets the content type.booleanhasAttachments()Checks 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 Detail
-
contentType
protected String contentType
-
content
protected String content
-
attachments
protected BodyPart.Attachments attachments
-
-
Method Detail
-
addPart
public void addPart(AttachmentPart part)
Adds new attachment part.- Parameters:
part-
-
getContentType
public String getContentType()
Gets the content type.- Returns:
-
setContentType
public void setContentType(String contentType)
Sets the content type.- Parameters:
contentType-
-
getContent
public String getContent()
Gets the content as string.- Returns:
-
setContent
public void setContent(String content)
Sets the content as string.- Parameters:
content-
-
getAttachments
public BodyPart.Attachments getAttachments()
Gets the attachment list.- Returns:
-
setAttachments
public void setAttachments(BodyPart.Attachments attachments)
Sets the attachment list.- Parameters:
attachments-
-
hasAttachments
public boolean hasAttachments()
Checks if attachments are present.- Returns:
-
-