Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
EmailContent |
|
| 1.0;1 |
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 | /** | |
19 | * Class representing customizable content of an email message | |
20 | * TODO: supercede this with Spring framework and/or JavaMail mail classes | |
21 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
22 | */ | |
23 | public class EmailContent { | |
24 | private String subject; | |
25 | private String body; | |
26 | private boolean html; | |
27 | ||
28 | 0 | public EmailContent() {} |
29 | ||
30 | 0 | public EmailContent(String subject, String body) { |
31 | 0 | this.subject = subject; |
32 | 0 | this.body = body; |
33 | 0 | } |
34 | ||
35 | 0 | public EmailContent(String subject, String body, boolean html) { |
36 | 0 | this.subject = subject; |
37 | 0 | this.body = body; |
38 | 0 | this.html = html; |
39 | 0 | } |
40 | ||
41 | public void setSubject(String subject) { | |
42 | 0 | this.subject = subject; |
43 | 0 | } |
44 | ||
45 | public String getSubject() { | |
46 | 0 | return subject; |
47 | } | |
48 | ||
49 | public void setBody(String body, boolean html) { | |
50 | 0 | this.body = body; |
51 | 0 | this.html = html; |
52 | 0 | } |
53 | ||
54 | public String getBody() { | |
55 | 0 | return body; |
56 | } | |
57 | ||
58 | public boolean isHtml() { | |
59 | 0 | return html; |
60 | } | |
61 | ||
62 | public String toString() { | |
63 | 0 | return "[EmailContent: subject=" + subject + ", body=" + body + ", html=" + html + "]"; |
64 | } | |
65 | } |