Coverage Report - org.kuali.rice.core.mail.EmailBcList
 
Classes in this File Line Coverage Branch Coverage Complexity
EmailBcList
0%
0/10
0%
0/2
1.25
 
 1  
 /*
 2  
  * Copyright 2005-2010 The Kuali Foundation
 3  
  * 
 4  
  * 
 5  
  * Licensed under the Educational Community License, Version 2.0 (the "License");
 6  
  * you may not use this file except in compliance with the License.
 7  
  * You may obtain a copy of the License at
 8  
  * 
 9  
  * http://www.opensource.org/licenses/ecl2.php
 10  
  * 
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 package org.kuali.rice.core.mail;
 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  
  * The bc addresses of an email message.
 25  
  *
 26  
  * @author Kuali Rice Team (kuali-rice@googlegroups.com)
 27  
  */
 28  
 public class EmailBcList {
 29  
 
 30  
     private List<String> bcAddresses;
 31  
     
 32  0
     public EmailBcList(List<String> bcAddresses) {
 33  0
         this.bcAddresses = bcAddresses;
 34  0
     }
 35  
 
 36  
     public List<String> getBcAddresses() {
 37  0
         return bcAddresses;
 38  
     }
 39  
 
 40  
     public Address[] getToAddressesAsAddressArray() throws AddressException {
 41  0
         Address[] recipientAddresses = new Address[this.bcAddresses.size()];
 42  0
         for (int i = 0; i < recipientAddresses.length; i++) {
 43  0
             recipientAddresses[i] = new InternetAddress((String) this.bcAddresses.get(i));
 44  
          }
 45  0
         return recipientAddresses;
 46  
     }
 47  
 
 48  
     
 49  
     public void setBcAddress(List<String> bcAddresses) {
 50  0
         this.bcAddresses = bcAddresses;
 51  0
     }
 52  
 
 53  
 }