public class DefaultMessage extends Object implements Serializable
Constructor and Description |
---|
DefaultMessage() |
Modifier and Type | Method and Description |
---|---|
DefaultMessage |
addSubstitutionsEntry(String key,
List<String> value)
Default message substitutions.
|
DefaultMessage |
clearSubstitutionsEntries()
Removes all the entries added into Substitutions.
|
boolean |
equals(Object obj) |
String |
getBody()
The message body of the notification, the email body or the text message.
|
Map<String,List<String>> |
getSubstitutions()
Default message substitutions.
|
int |
hashCode() |
void |
setBody(String body)
The message body of the notification, the email body or the text message.
|
void |
setSubstitutions(Map<String,List<String>> substitutions)
Default message substitutions.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
DefaultMessage |
withBody(String body)
The message body of the notification, the email body or the text message.
|
DefaultMessage |
withSubstitutions(Map<String,List<String>> substitutions)
Default message substitutions.
|
public String getBody()
public void setBody(String body)
body
- The message body of the notification, the email body or the
text message.public DefaultMessage withBody(String body)
Returns a reference to this object so that method calls can be chained together.
body
- The message body of the notification, the email body or the
text message.public Map<String,List<String>> getSubstitutions()
public void setSubstitutions(Map<String,List<String>> substitutions)
substitutions
- Default message substitutions. Can be overridden by
individual address substitutions.public DefaultMessage withSubstitutions(Map<String,List<String>> substitutions)
Returns a reference to this object so that method calls can be chained together.
substitutions
- Default message substitutions. Can be overridden by
individual address substitutions.public DefaultMessage addSubstitutionsEntry(String key, List<String> value)
The method adds a new key-value pair into Substitutions parameter, and returns a reference to this object so that method calls can be chained together.
key
- The key of the entry to be added into Substitutions.value
- The corresponding value of the entry to be added into
Substitutions.public DefaultMessage clearSubstitutionsEntries()
Returns a reference to this object so that method calls can be chained together.
public String toString()
toString
in class Object
Object.toString()
Copyright © 2019. All rights reserved.