java.lang.Object
com.broadleafcommerce.notification.domain.Recipient
All Implemented Interfaces:
Serializable

public class Recipient extends Object implements Serializable
A RecipientInfo provides the information needed to send a notification. One of mobileNumber or emailAddress is required.
Author:
Broadleaf Commerce
See Also:
  • Constructor Details

    • Recipient

      public Recipient()
    • Recipient

      public Recipient(String emailAddress, String mobileNumber, String name, String communicationPreference, boolean cc, boolean bcc)
  • 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

      public String getFormattedEmailAddress()
    • getEmailAddress

      public String getEmailAddress()
      The emailAddress for this recipientInfo. Required when sending some notification delivery types (e.g. EMAIL)
      Returns:
      the emailAddress of the Recipient
    • getMobileNumber

      public String getMobileNumber()
      The mobileNumber for this recipientInfo. Required when sending some notification delivery types (e.g. SMS)
      Returns:
      the mobileNumber of the Recipient
    • getName

      public String 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

      public String 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

      public void setEmailAddress(String emailAddress)
      The emailAddress for this recipientInfo. Required when sending some notification delivery types (e.g. EMAIL)
      Parameters:
      emailAddress -
    • setMobileNumber

      public void setMobileNumber(String mobileNumber)
      The mobileNumber for this recipientInfo. Required when sending some notification delivery types (e.g. SMS)
      Parameters:
      mobileNumber -
    • setName

      public void setName(String name)
      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

      public void setCommunicationPreference(String communicationPreference)
      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

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object