Class EmailData

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    EmailDataResponse

    public class EmailData
    extends Object
    implements Serializable
    Represents the email information of a customer, including the email address, whether it's the primary email, and any associated attributes. This class is used for managing email data, integrating with criteria searches and responses.

    It also includes validation annotations to ensure the proper format and constraints on the email address and primary flag.

    Author:
    tpapad
    See Also:
    Serialized Form
    • Constructor Detail

      • EmailData

        public EmailData()
        Default constructor, required for Jackson serialization/deserialization.
      • EmailData

        public EmailData​(String emailAddress,
                         Boolean isPrimary)
        Constructor to initialize EmailData with the email address and primary status.
        Parameters:
        emailAddress - the customer's email address
        isPrimary - true if this email should be marked as primary
    • Method Detail

      • getEmailAddress

        public String getEmailAddress()
        Retrieves the email address of the customer.
        Returns:
        the email address of the customer
      • setEmailAddress

        public void setEmailAddress​(String emailAddress)
        Sets the email address for the customer.
        Parameters:
        emailAddress - the email address to set
      • getIsPrimary

        public Boolean getIsPrimary()
        Retrieves the primary status of the email address.
        Returns:
        true if this email address is marked as primary, false otherwise
      • setIsPrimary

        public void setIsPrimary​(Boolean isPrimary)
        Sets whether this email address should be treated as the primary communication email.
        Parameters:
        isPrimary - true to mark this email as primary, false otherwise
      • getAttributes

        public List<EntityAttribute> getAttributes()
        Retrieves the list of attributes associated with the email address.
        Returns:
        a list of attributes associated with the email
      • addAtrribute

        public void addAtrribute​(EntityAttribute entityAttribute)
        Adds a new attribute to the list of attributes for the email.
        Parameters:
        entityAttribute - the attribute to add
      • toString

        public String toString()
        Provides a string representation of the EmailData object, including email address, primary flag, and attributes.
        Overrides:
        toString in class Object
        Returns:
        a string representation of the EmailData