use of com.serotonin.m2m2.vo.mailingList.AddressEntry in project ma-modules-public by infiniteautomation.
the class M2MRecipientListEntryBean method createEmailRecipient.
public EmailRecipient createEmailRecipient() {
switch(recipientType) {
case EmailRecipient.TYPE_MAILING_LIST:
MailingList ml = new MailingList();
ml.setId(referenceId);
return ml;
case EmailRecipient.TYPE_USER:
UserEntry u = new UserEntry();
u.setUserId(referenceId);
return u;
case EmailRecipient.TYPE_ADDRESS:
AddressEntry a = new AddressEntry();
a.setAddress(referenceAddress);
return a;
}
throw new ShouldNeverHappenException("Unknown email recipient type: " + recipientType);
}
use of com.serotonin.m2m2.vo.mailingList.AddressEntry in project ma-core-public by infiniteautomation.
the class RecipientListEntryBean method createEmailRecipient.
public EmailRecipient createEmailRecipient() {
switch(recipientType) {
case EmailRecipient.TYPE_MAILING_LIST:
MailingList ml = new MailingList();
ml.setId(referenceId);
return ml;
case EmailRecipient.TYPE_USER:
UserEntry u = new UserEntry();
u.setUserId(referenceId);
return u;
case EmailRecipient.TYPE_ADDRESS:
AddressEntry a = new AddressEntry();
a.setAddress(referenceAddress);
return a;
}
throw new ShouldNeverHappenException("Unknown email recipient type: " + recipientType);
}
Aggregations