Enum Class SmtpType

java.lang.Object
java.lang.Enum<SmtpType>
com.bonitasoft.processbuilder.enums.SmtpType
All Implemented Interfaces:
Serializable, Comparable<SmtpType>, Constable

public enum SmtpType extends Enum<SmtpType>
Defines the valid SMTP configuration attributes for email server settings. This enumeration is typically used as the source for the 'SMTP' master data, containing all necessary parameters to configure email notifications.
Since:
1.0
Author:
Bonitasoft
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The HTML template for email body content.
    The default sender email address for outgoing messages.
    The password for SMTP server authentication.
    The SMTP server hostname or IP address used for sending emails.
    The port number used to connect to the SMTP server.
    Indicates whether SSL encryption is enabled for the SMTP connection.
    Indicates whether STARTTLS encryption is enabled for the SMTP connection.
    Indicates whether to trust the server certificate without validation.
    The username for SMTP server authentication.
  • Method Summary

    Modifier and Type
    Method
    Description
    static Map<String,String>
    Retrieves all SMTP configuration attributes as a read-only Map where the key is the technical key and the value is the description.
    static List<String>
    Retrieves all technical keys as a read-only List of Strings.
    Returns the description of this SMTP configuration attribute.
    Returns the unique string key associated with this SMTP attribute.
    static boolean
    isValid(String input)
    Checks if a given string corresponds to a valid enum constant, ignoring case and leading/trailing spaces.
    static SmtpType
    Returns the enum constant of this class with the specified name.
    static SmtpType[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • SMTP_HOST

      public static final SmtpType SMTP_HOST
      The SMTP server hostname or IP address used for sending emails.
    • SMTP_PORT

      public static final SmtpType SMTP_PORT
      The port number used to connect to the SMTP server.
    • FROM

      public static final SmtpType FROM
      The default sender email address for outgoing messages.
    • SSL

      public static final SmtpType SSL
      Indicates whether SSL encryption is enabled for the SMTP connection.
    • STARTTLS

      public static final SmtpType STARTTLS
      Indicates whether STARTTLS encryption is enabled for the SMTP connection.
    • TRUST_CERTIFICATE

      public static final SmtpType TRUST_CERTIFICATE
      Indicates whether to trust the server certificate without validation.
    • USERNAME

      public static final SmtpType USERNAME
      The username for SMTP server authentication.
    • PASSWORD

      public static final SmtpType PASSWORD
      The password for SMTP server authentication.
    • EMAILTEMPLATE

      public static final SmtpType EMAILTEMPLATE
      The HTML template for email body content.

      This type stores the email template that wraps the actual email content. The template must contain a {{content}} placeholder where the email body will be inserted. Example template:

      
       <p style="text-align: center;">
         <img src="logo-url" style="width: 300px;">
       </p>
       <p>{{content}}</p>
       
  • Method Details

    • values

      public static SmtpType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SmtpType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getKey

      public String getKey()
      Returns the unique string key associated with this SMTP attribute.
      Returns:
      The SMTP attribute key (e.g., "SmtpHost").
    • getDescription

      public String getDescription()
      Returns the description of this SMTP configuration attribute.
      Returns:
      The description.
    • isValid

      public static boolean isValid(String input)
      Checks if a given string corresponds to a valid enum constant, ignoring case and leading/trailing spaces.
      Parameters:
      input - The string to validate.
      Returns:
      true if the string is a valid enum constant, false otherwise.
    • getAllData

      public static Map<String,String> getAllData()
      Retrieves all SMTP configuration attributes as a read-only Map where the key is the technical key and the value is the description.
      Returns:
      A map containing all SMTP attribute data (Key -> Description).
    • getAllKeysList

      public static List<String> getAllKeysList()
      Retrieves all technical keys as a read-only List of Strings.
      Returns:
      A list containing all SMTP attribute keys.