com.backendless.messaging.EmailEnvelope Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons Show documentation
Show all versions of commons Show documentation
Commons lib for both server and client Java/Android SDKs
The newest version!
package com.backendless.messaging;
import lombok.Getter;
import lombok.Setter;
import java.util.HashSet;
import java.util.Set;
@Getter
public class EmailEnvelope
{
@Setter
private String query;
private Set to;
private Set cc;
private Set bcc;
@Setter
private Boolean uniqueEmails;
public void addTo( Set emails )
{
if( this.to == null )
this.to = new HashSet<>();
if( emails != null )
{
for( String email : emails )
{
addTo( email );
}
}
}
public void addTo( String email )
{
if( this.to == null )
this.to = new HashSet<>();
if( email != null )
this.to.add( email );
}
public void setTo( Set emails )
{
this.to = new HashSet<>();
if( emails != null )
{
for( String email : emails )
{
addTo( email );
}
}
}
public void addCc( Set emails )
{
if( this.cc == null )
this.cc = new HashSet<>();
if( emails != null )
{
for( String email : emails )
{
addCc( email );
}
}
}
public void addCc( String email )
{
if( this.cc == null )
this.cc = new HashSet<>();
if( email != null )
this.cc.add( email );
}
public void setCc( Set emails )
{
this.cc = new HashSet<>();
if( emails != null )
{
for( String email : emails )
{
addCc( email );
}
}
}
public void addBcc( Set emails )
{
if( this.bcc == null )
this.bcc = new HashSet<>();
if( emails != null )
{
for( String email : emails )
{
addBcc( email );
}
}
}
public void addBcc( String email )
{
if( this.bcc == null )
this.bcc = new HashSet<>();
if( email != null )
this.bcc.add( email );
}
public void setBcc( Set emails )
{
this.bcc = new HashSet<>();
if( emails != null )
{
for( String email : emails )
{
addBcc( email );
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy