Class TokenMessageBuilder
- java.lang.Object
-
- ch.colabproject.colab.api.controller.token.TokenMessageBuilder
-
public class TokenMessageBuilder extends Object
To build the body of the message to send for a token.- Author:
- sandra
-
-
Field Summary
Fields Modifier and Type Field Description static String
VALIDITY_FOOTER
Text to set as a footer to inform about the validity of the message
-
Constructor Summary
Constructors Constructor Description TokenMessageBuilder(Token token)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TokenMessageBuilder
additionalFooter(String footer)
Add a message footerString
build()
Build the email body to send with the tokenTokenMessageBuilder
heading(String heading)
Set the message headingTokenMessageBuilder
headTitle(String headTitle)
Set the message head titleTokenMessageBuilder
info(String info)
Set the message additional contentTokenMessageBuilder
linkHref(String linkHref)
Set the message link hrefTokenMessageBuilder
linkLabel(String linkLabel)
Set the message link labelTokenMessageBuilder
picture(String picture)
Set the message main pictureTokenMessageBuilder
subheading(String subheading)
Set the message sub heading
-
-
-
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
-
-