1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.rice.kew.mail.service.impl;
18 import java.util.List;
19 import javax.mail.Address;
20 import javax.mail.internet.AddressException;
21 import javax.mail.internet.InternetAddress;
22
23
24
25
26
27
28 public class EmailBcList {
29
30 private List<String> bcAddresses;
31
32 public EmailBcList(List<String> bcAddresses) {
33 this.bcAddresses = bcAddresses;
34 }
35
36 public List<String> getBcAddresses() {
37 return bcAddresses;
38 }
39
40 public Address[] getToAddressesAsAddressArray() throws AddressException {
41 Address[] recipientAddresses = new Address[this.bcAddresses.size()];
42 for (int i = 0; i < recipientAddresses.length; i++) {
43 recipientAddresses[i] = new InternetAddress((String) this.bcAddresses.get(i));
44 }
45 return recipientAddresses;
46 }
47
48
49 public void setBcAddress(List<String> bcAddresses) {
50 this.bcAddresses = bcAddresses;
51 }
52
53 }