View Javadoc

1   /**
2    * Copyright 2005-2011 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.rice.core.mail;
17  
18  import java.io.Serializable;
19  import java.util.HashSet;
20  import java.util.Set;
21  
22  /**
23   * 
24   * 
25   */
26  public class MailMessage implements Serializable {
27      private String fromAddress;
28      private Set toAddresses = new HashSet();
29      private Set ccAddresses = new HashSet();
30      private Set bccAddresses = new HashSet();
31      private String subject = "";
32      private String message = "";
33  
34      public MailMessage() {
35          super();
36      }
37  
38      public String getFromAddress() {
39          return fromAddress;
40      }
41  
42      public void setFromAddress(String fromAddress) {
43          this.fromAddress = fromAddress;
44      }
45  
46      /**
47       * @return Returns the bccAddresses.
48       */
49      public Set getBccAddresses() {
50          return bccAddresses;
51      }
52  
53      public void addBccAddress(String addr) {
54          bccAddresses.add(addr);
55      }
56  
57      public void removeBccAddress(String addr) {
58          bccAddresses.remove(addr);
59      }
60  
61      /**
62       * @param bccAddresses The bccAddresses to set.
63       */
64      public void setBccAddresses(Set bccAddresses) {
65          this.bccAddresses = bccAddresses;
66      }
67  
68      /**
69       * @return Returns the ccAddresses.
70       */
71      public Set getCcAddresses() {
72          return ccAddresses;
73      }
74  
75      public void addCcAddress(String addr) {
76          ccAddresses.add(addr);
77      }
78  
79      public void removeCcAddress(String addr) {
80          ccAddresses.remove(addr);
81      }
82  
83      /**
84       * @param ccAddresses The ccAddresses to set.
85       */
86      public void setCcAddresses(Set ccAddresses) {
87          this.ccAddresses = ccAddresses;
88      }
89  
90      /**
91       * @return Returns the message.
92       */
93      public String getMessage() {
94          return message;
95      }
96  
97      /**
98       * @param message The message to set.
99       */
100     public void setMessage(String message) {
101         this.message = message;
102     }
103 
104     /**
105      * @return Returns the subject.
106      */
107     public String getSubject() {
108         return subject;
109     }
110 
111     /**
112      * @param subject The subject to set.
113      */
114     public void setSubject(String subject) {
115         this.subject = subject;
116     }
117 
118     /**
119      * @return Returns the toAddresses.
120      */
121     public Set getToAddresses() {
122         return toAddresses;
123     }
124 
125     public void addToAddress(String addr) {
126         toAddresses.add(addr);
127     }
128 
129     public void removeToAddress(String addr) {
130         toAddresses.remove(addr);
131     }
132 
133     /**
134      * @param toAddresses The toAddresses to set.
135      */
136     public void setToAddresses(Set toAddresses) {
137         this.toAddresses = toAddresses;
138     }
139 }