Class HttpUtils.MultipartForm

java.lang.Object
com.erudika.para.server.utils.HttpUtils.MultipartForm
Enclosing class:
HttpUtils

public static class HttpUtils.MultipartForm extends Object
A class for handling the form data from form submissions.
Author:
Alex Bogdanovski [[email protected]]
  • Constructor Details

    • MultipartForm

      public MultipartForm()
      Default constructor.
  • Method Details

    • getName

      public String getName()
      Returns the name of the sender.
      Returns:
      the name
    • setName

      public void setName(String name)
      Sets the name of the sender.
      Parameters:
      name - the name
    • getEmail

      public String getEmail()
      Returns the email of the sender.
      Returns:
      the email
    • setEmail

      public void setEmail(String email)
      Sets the email of the sender.
      Parameters:
      email - the email
    • getToEmails

      public String[] getToEmails()
      Returns the list of recipient emails.
      Returns:
      a list of emails
    • setToEmails

      public void setToEmails(String[] toEmails)
      Sets the list of recipient emails.
      Parameters:
      toEmails - a list of emails
    • getMessage

      public String getMessage()
      Returns the message body.
      Returns:
      the message
    • setMessage

      public void setMessage(String message)
      Sets the message body.
      Parameters:
      message - the message
    • getSubject

      public String getSubject()
      Returns the message subject.
      Returns:
      the subject
    • setSubject

      public void setSubject(String subject)
      Sets the message subject.
      Parameters:
      subject - the subject
    • isPlaintextOnly

      public boolean isPlaintextOnly()
      Checks if the message is plaintext only.
      Returns:
      true if plaintext
    • setPlaintextOnly

      public void setPlaintextOnly(boolean plaintextOnly)
      Sets the plaintext only flag.
      Parameters:
      plaintextOnly - true if plaintext
    • isMarkdownEnabled

      public boolean isMarkdownEnabled()
      Checks if markdown is enabled.
      Returns:
      true if markdown is enabled
    • setMarkdownEnabled

      public void setMarkdownEnabled(boolean markdownEnabled)
      Sets the markdown enabled flag.
      Parameters:
      markdownEnabled - true if markdown is enabled
    • getFile

      public org.springframework.web.multipart.MultipartFile getFile()
      Returns the uploaded file.
      Returns:
      the file
    • setFile

      public void setFile(org.springframework.web.multipart.MultipartFile file)
      Sets the uploaded file.
      Parameters:
      file - the file
    • fromJson

      public static HttpUtils.MultipartForm fromJson(InputStream json)
      Deserializes a MultipartForm from JSON.
      Parameters:
      json - the JSON input stream
      Returns:
      a new instance or null