BrightSide Workbench Full Report + Source Code
org.turro.mail.provider.MailRecipient Class Reference

Public Member Functions

String getName ()
 
void setName (String name)
 
String getMail ()
 
void setMail (String mail)
 
boolean isEmpty ()
 
String parse (String text)
 

Static Public Member Functions

static MailRecipient of (String value)
 
static MailRecipient of (String mail, String name)
 
static MailRecipient of (IContact contact)
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 28 of file MailRecipient.java.

Member Function Documentation

◆ getMail()

String org.turro.mail.provider.MailRecipient.getMail ( )

Definition at line 41 of file MailRecipient.java.

41  {
42  return mail;
43  }
Here is the caller graph for this function:

◆ getName()

String org.turro.mail.provider.MailRecipient.getName ( )

Definition at line 33 of file MailRecipient.java.

33  {
34  return name;
35  }
Here is the caller graph for this function:

◆ isEmpty()

boolean org.turro.mail.provider.MailRecipient.isEmpty ( )

Definition at line 51 of file MailRecipient.java.

51  {
52  return Strings.isBlank(mail);
53  }
Here is the caller graph for this function:

◆ of() [1/3]

static MailRecipient org.turro.mail.provider.MailRecipient.of ( IContact  contact)
static

Definition at line 94 of file MailRecipient.java.

94  {
95  MailRecipient recipient = new MailRecipient();
96  recipient.mail = contact.getEmail();
97  recipient.name = contact.getName();
98  recipient.formal = contact.getFormal();
99  recipient.friendly = contact.getFriendly();
100  return recipient;
101  }
Here is the call graph for this function:

◆ of() [2/3]

static MailRecipient org.turro.mail.provider.MailRecipient.of ( String  mail,
String  name 
)
static

Definition at line 85 of file MailRecipient.java.

85  {
86  MailRecipient recipient = new MailRecipient();
87  recipient.mail = mail;
88  recipient.name = name;
89  recipient.formal = name;
90  recipient.friendly = name;
91  return recipient;
92  }

◆ of() [3/3]

static MailRecipient org.turro.mail.provider.MailRecipient.of ( String  value)
static

Definition at line 75 of file MailRecipient.java.

75  {
76  if(value != null) {
77  if(value.contains("|")) {
78  String[] parts = value.split("\\|");
79  return MailRecipient.of(parts[0], parts[1]);
80  }
81  }
82  return MailRecipient.of(value, null);
83  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ parse()

String org.turro.mail.provider.MailRecipient.parse ( String  text)

Definition at line 57 of file MailRecipient.java.

57  {
58  if(!Strings.isBlank(mail)) {
59  text = text.replaceAll("\\{email\\}", mail);
60  }
61  if(!Strings.isBlank(name)) {
62  text = text.replaceAll("\\{name\\}", name);
63  }
64  if(!Strings.isBlank(friendly)) {
65  text = text.replaceAll("\\{friendly\\}", friendly);
66  }
67  if(!Strings.isBlank(formal)) {
68  text = text.replaceAll("\\{formal\\}", formal);
69  }
70  return text;
71  }
Here is the caller graph for this function:

◆ setMail()

void org.turro.mail.provider.MailRecipient.setMail ( String  mail)

Definition at line 45 of file MailRecipient.java.

45  {
46  this.mail = mail;
47  }

◆ setName()

void org.turro.mail.provider.MailRecipient.setName ( String  name)

Definition at line 37 of file MailRecipient.java.

37  {
38  this.name = name;
39  }

The documentation for this class was generated from the following file: