Class BodyPart

java.lang.Object
org.citrusframework.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
  • Field Details

  • Constructor Details

    • BodyPart

      public BodyPart()
      Default constructor.
    • BodyPart

      public BodyPart(String content, String contentType)
      Default constructor using content and contentType.
      Parameters:
      content -
      contentType -
  • Method Details

    • 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: