Class Recipient
java.lang.Object
com.broadleafcommerce.notification.domain.Recipient
- All Implemented Interfaces:
Serializable
A RecipientInfo provides the information needed to send a notification.
One of mobileNumber or emailAddress is required.
- Author:
- Broadleaf Commerce
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The communication preference of the recipient.The emailAddress for this recipientInfo.The mobileNumber for this recipientInfo.getName()
The name of the recipient.int
hashCode()
boolean
isBcc()
Indicator that this recipient should be BCC'd on the notification.boolean
isCc()
Indicator that this recipient should be CC'd on the notification.void
setBcc
(boolean bcc) Indicator that this recipient should be BCC'd on the notification.void
setCc
(boolean cc) Indicator that this recipient should be CC'd on the notification.void
setCommunicationPreference
(String communicationPreference) The communication preference of the recipient.void
setEmailAddress
(String emailAddress) The emailAddress for this recipientInfo.void
setMobileNumber
(String mobileNumber) The mobileNumber for this recipientInfo.void
The name of the recipient.boolean
to()
Returns true if this user should be part of the "to" list on an email notification.toString()
-
Constructor Details
-
Recipient
public Recipient() -
Recipient
-
-
Method Details
-
to
public boolean to()Returns true if this user should be part of the "to" list on an email notification. Defaults to true. Returns false if either bcc or cc are set.- Returns:
-
getFormattedEmailAddress
-
getEmailAddress
The emailAddress for this recipientInfo. Required when sending some notification delivery types (e.g. EMAIL)- Returns:
- the emailAddress of the Recipient
-
getMobileNumber
The mobileNumber for this recipientInfo. Required when sending some notification delivery types (e.g. SMS)- Returns:
- the mobileNumber of the Recipient
-
getName
The name of the recipient. Optional. Can be used to provide a name in addition to the emailAddress for most EMAIL providers.- Returns:
- the name of the Recipient
-
getCommunicationPreference
The communication preference of the recipient.- Returns:
- the communication preference of the Recipient
-
isCc
public boolean isCc()Indicator that this recipient should be CC'd on the notification.- Returns:
- the cc indicator
-
isBcc
public boolean isBcc()Indicator that this recipient should be BCC'd on the notification.- Returns:
- the bcc indicator
-
setEmailAddress
The emailAddress for this recipientInfo. Required when sending some notification delivery types (e.g. EMAIL)- Parameters:
emailAddress
-
-
setMobileNumber
The mobileNumber for this recipientInfo. Required when sending some notification delivery types (e.g. SMS)- Parameters:
mobileNumber
-
-
setName
The name of the recipient. Optional. Can be used to provide a name in addition to the emailAddress for most EMAIL providers.- Parameters:
name
-
-
setCommunicationPreference
The communication preference of the recipient.- Parameters:
communicationPreference
-
-
setCc
public void setCc(boolean cc) Indicator that this recipient should be CC'd on the notification.- Parameters:
cc
-
-
setBcc
public void setBcc(boolean bcc) Indicator that this recipient should be BCC'd on the notification.- Parameters:
cc
-
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-