Class TokenMessageBuilder


  • public class TokenMessageBuilder
    extends Object
    To build the body of the message to send for a token.
    Author:
    sandra
    • Field Detail

      • VALIDITY_FOOTER

        public static final String VALIDITY_FOOTER
        Text to set as a footer to inform about the validity of the message
        See Also:
        Constant Field Values
    • Constructor Detail

      • TokenMessageBuilder

        public TokenMessageBuilder​(Token token)
        Constructor
        Parameters:
        token - the token for which we are writing a message
    • Method Detail

      • headTitle

        public TokenMessageBuilder headTitle​(String headTitle)
        Set the message head title
        Parameters:
        headTitle - the head title to set
        Returns:
        this builder
      • picture

        public TokenMessageBuilder picture​(String picture)
        Set the message main picture
        Parameters:
        picture - the main picture to set
        Returns:
        this builder
      • heading

        public TokenMessageBuilder heading​(String heading)
        Set the message heading
        Parameters:
        heading - the heading to set
        Returns:
        this builder
      • subheading

        public TokenMessageBuilder subheading​(String subheading)
        Set the message sub heading
        Parameters:
        subheading - the sub heading to set
        Returns:
        this builder
      • info

        public TokenMessageBuilder info​(String info)
        Set the message additional content
        Parameters:
        info - the additional content to set
        Returns:
        this builder
      • linkHref

        public TokenMessageBuilder linkHref​(String linkHref)
        Set the message link href
        Parameters:
        linkHref - the link href to set
        Returns:
        this builder
      • linkLabel

        public TokenMessageBuilder linkLabel​(String linkLabel)
        Set the message link label
        Parameters:
        linkLabel - the link label to set
        Returns:
        this builder
      • additionalFooter

        public TokenMessageBuilder additionalFooter​(String footer)
        Add a message footer
        Parameters:
        footer - the footer to add
        Returns:
        this builder
      • build

        public String build()
        Build the email body to send with the token
        Returns:
        html email body